From 3eac8d5694cfd1049f613cc5c638097976244768 Mon Sep 17 00:00:00 2001 From: Mike Taves Date: Thu, 20 Feb 2020 12:37:37 +1300 Subject: Switch build configuration logic from DISABLE_TIFF to ENABLE_TIFF * Autotools interface should be the same, but different ./configure --help * For CMake, the option should be -DENABLE_TIFF=NO (default is YES) * Use TIFF_ENABLED and CURL_ENABLED variables, based on option and outcome * Reword some messages and add hints * Move -DTIFF_ENABLED and -DCURL_ENABLED from global add_definitions() to target_compile_definitions(), which is recommended practice * Minor spelling and style consistency around SQLITE_VERSION check --- src/lib_proj.cmake | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/lib_proj.cmake') diff --git a/src/lib_proj.cmake b/src/lib_proj.cmake index 9200baba..e764aeee 100644 --- a/src/lib_proj.cmake +++ b/src/lib_proj.cmake @@ -406,12 +406,14 @@ endif() target_include_directories(${PROJ_CORE_TARGET} PRIVATE ${SQLITE3_INCLUDE_DIR}) target_link_libraries(${PROJ_CORE_TARGET} ${SQLITE3_LIBRARY}) -if(NOT DISABLE_TIFF) +if(TIFF_ENABLED) + target_compile_definitions(${PROJ_CORE_TARGET} PRIVATE -DTIFF_ENABLED) target_include_directories(${PROJ_CORE_TARGET} PRIVATE ${TIFF_INCLUDE_DIR}) target_link_libraries(${PROJ_CORE_TARGET} ${TIFF_LIBRARY}) endif() -if(CURL_FOUND) +if(CURL_ENABLED) + target_compile_definitions(${PROJ_CORE_TARGET} PRIVATE -DCURL_ENABLED) target_include_directories(${PROJ_CORE_TARGET} PRIVATE ${CURL_INCLUDE_DIR}) target_link_libraries(${PROJ_CORE_TARGET} ${CURL_LIBRARY}) endif() -- cgit v1.2.3