aboutsummaryrefslogtreecommitdiff
path: root/src/lib_proj.cmake
diff options
context:
space:
mode:
authorMike Taves <mwtoews@gmail.com>2020-02-20 12:37:37 +1300
committerKristian Evers <kristianevers@gmail.com>2020-02-21 11:23:15 +0100
commit3eac8d5694cfd1049f613cc5c638097976244768 (patch)
tree58d7a7e56840d4c90338c58d53d698ec8409a383 /src/lib_proj.cmake
parent86530f3146ec091c26652e60067088dc3e067fae (diff)
downloadPROJ-3eac8d5694cfd1049f613cc5c638097976244768.tar.gz
PROJ-3eac8d5694cfd1049f613cc5c638097976244768.zip
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
Diffstat (limited to 'src/lib_proj.cmake')
-rw-r--r--src/lib_proj.cmake6
1 files changed, 4 insertions, 2 deletions
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()