From 7aaaec233af582e0fd6f3dbd628de2c98f08ccc0 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Jun 30 2016 01:09:11 +0000 Subject: CMake: find module formatting Split find_path, find_library across multiple lines makes it easier to read and diff against. --- diff --git a/toonz/cmake/FindLZO.cmake b/toonz/cmake/FindLZO.cmake index 5be2221..81172ea 100644 --- a/toonz/cmake/FindLZO.cmake +++ b/toonz/cmake/FindLZO.cmake @@ -1,5 +1,25 @@ -find_path(LZO_INCLUDE_DIR NAMES lzoconf.h HINTS ${THIRDPARTY_LIBS_HINTS} PATH_SUFFIXES lzo/2.09/include/lzo lzo/2.03/include/lzo) -find_library(LZO_LIBRARY NAMES liblzo2.a lzo2_64.lib HINTS ${THIRDPARTY_LIBS_HINTS} PATH_SUFFIXES lzo/2.09/lib lzo/2.03/lib/LZO_lib) +find_path( + LZO_INCLUDE_DIR + NAMES + lzoconf.h + HINTS + ${THIRDPARTY_LIBS_HINTS} + PATH_SUFFIXES + lzo/2.09/include/lzo + lzo/2.03/include/lzo +) + +find_library( + LZO_LIBRARY + NAMES + liblzo2.a + lzo2_64.lib + HINTS + ${THIRDPARTY_LIBS_HINTS} + PATH_SUFFIXES + lzo/2.09/lib + lzo/2.03/lib/LZO_lib +) message("***** LZO Header path:" ${LZO_INCLUDE_DIR}) message("***** LZO Library path:" ${LZO_LIBRARY}) @@ -7,10 +27,14 @@ message("***** LZO Library path:" ${LZO_LIBRARY}) set(LZO_NAMES ${LZO_NAMES} LZO) include(FindPackageHandleStandardArgs) -FIND_PACKAGE_HANDLE_STANDARD_ARGS(LZO DEFAULT_MSG LZO_LIBRARY LZO_INCLUDE_DIR) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(LZO + DEFAULT_MSG LZO_LIBRARY LZO_INCLUDE_DIR) if(LZO_FOUND) set(LZO_LIBRARIES ${LZO_LIBRARY}) endif() -mark_as_advanced(LZO_LIBRARY LZO_INCLUDE_DIR) +mark_as_advanced( + LZO_LIBRARY + LZO_INCLUDE_DIR +) diff --git a/toonz/cmake/FindSuperLU.cmake b/toonz/cmake/FindSuperLU.cmake index 5b8bb74..79c5507 100644 --- a/toonz/cmake/FindSuperLU.cmake +++ b/toonz/cmake/FindSuperLU.cmake @@ -1,6 +1,26 @@ # preferred homebrew's directories. -find_path(SUPERLU_INCLUDE_DIR NAMES slu_Cnames.h HINTS ${THIRDPARTY_LIBS_HINTS} PATH_SUFFIXES superlu43/4.3_1/include/superlu superlu/SuperLU_4.1/include) -find_library(SUPERLU_LIBRARY NAMES libsuperlu.a libsuperlu_4.1.a HINTS ${THIRDPARTY_LIBS_HINTS} PATH_SUFFIXES superlu43/4.3_1/lib superlu) +find_path( + SUPERLU_INCLUDE_DIR + NAMES + slu_Cnames.h + HINTS + ${THIRDPARTY_LIBS_HINTS} + PATH_SUFFIXES + superlu43/4.3_1/include/superlu + superlu/SuperLU_4.1/include +) + +find_library( + SUPERLU_LIBRARY + NAMES + libsuperlu.a + libsuperlu_4.1.a + HINTS + ${THIRDPARTY_LIBS_HINTS} + PATH_SUFFIXES + superlu43/4.3_1/lib + superlu +) message("***** SuperLU Header path:" ${SUPERLU_INCLUDE_DIR}) message("***** SuperLU Library path:" ${SUPERLU_LIBRARY}) @@ -8,10 +28,14 @@ message("***** SuperLU Library path:" ${SUPERLU_LIBRARY}) set(SUPERLU_NAMES ${SUPERLU_NAMES} SuperLU) include(FindPackageHandleStandardArgs) -FIND_PACKAGE_HANDLE_STANDARD_ARGS(SuperLU DEFAULT_MSG SUPERLU_LIBRARY SUPERLU_INCLUDE_DIR) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(SuperLU + DEFAULT_MSG SUPERLU_LIBRARY SUPERLU_INCLUDE_DIR) if(SUPERLU_FOUND) set(SUPERLU_LIBRARIES ${SUPERLU_LIBRARY}) endif() -mark_as_advanced(SUPERLU_LIBRARY SUPERLU_INCLUDE_DIR) +mark_as_advanced( + SUPERLU_LIBRARY + SUPERLU_INCLUDE_DIR +) diff --git a/toonz/cmake/FindTIFF.cmake b/toonz/cmake/FindTIFF.cmake index ac27fb3..ee75f0c 100644 --- a/toonz/cmake/FindTIFF.cmake +++ b/toonz/cmake/FindTIFF.cmake @@ -1,6 +1,24 @@ # looks for libtiff(4.0.3 modified) -find_path(TIFF_INCLUDE_DIR NAMES tiffio.h HINTS ${SDKROOT} PATH_SUFFIXES tiff-4.0.3/libtiff/) -find_library(TIFF_LIBRARY NAMES libtiff.a HINTS ${SDKROOT} PATH_SUFFIXES tiff-4.0.3/libtiff/.libs NO_DEFAULT_PATH) +find_path( + TIFF_INCLUDE_DIR + NAMES + tiffio.h + HINTS + ${SDKROOT} + PATH_SUFFIXES + tiff-4.0.3/libtiff/ +) + +find_library( + TIFF_LIBRARY + NAMES + libtiff.a + HINTS + ${SDKROOT} + PATH_SUFFIXES + tiff-4.0.3/libtiff/.libs + NO_DEFAULT_PATH +) message("***** libtiff Header path:" ${TIFF_INCLUDE_DIR}) message("***** libtiff Library path:" ${TIFF_LIBRARY}) @@ -8,10 +26,14 @@ message("***** libtiff Library path:" ${TIFF_LIBRARY}) set(TIFF_NAMES ${TIFF_NAMES} TIFF) include(FindPackageHandleStandardArgs) -FIND_PACKAGE_HANDLE_STANDARD_ARGS(TIFF DEFAULT_MSG TIFF_LIBRARY TIFF_INCLUDE_DIR) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(TIFF + DEFAULT_MSG TIFF_LIBRARY TIFF_INCLUDE_DIR) if(TIFF_FOUND) set(TIFF_LIBRARIES ${TIFF_LIBRARY}) endif() -mark_as_advanced(TIFF_LIBRARY TIFF_INCLUDE_DIR) +mark_as_advanced( + TIFF_LIBRARY + TIFF_INCLUDE_DIR +)