aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/CMakeLists.txt20
-rw-r--r--src/bin_gie.cmake6
2 files changed, 16 insertions, 10 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 534bc311..311cdbac 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -3,20 +3,23 @@
include(lib_proj.cmake)
# configure executable build
+option(BUILD_APPS
+ "Build PROJ applications (default value for BUILD_CCT, BUILD_CS2CS, etc.)" ON)
+
option(BUILD_CCT
- "Build cct (coordinate conversion and transformation tool)" ON)
+ "Build cct (coordinate conversion and transformation tool)" "${BUILD_APPS}")
option(BUILD_CS2CS
- "Build cs2cs (coordinate systems to coordinate systems translation tool)" ON)
+ "Build cs2cs (coordinate systems to coordinate systems translation tool)" "${BUILD_APPS}")
option(BUILD_GEOD
- "Build geod (computation of geodesic lines)" ON)
+ "Build geod (computation of geodesic lines)" "${BUILD_APPS}")
option(BUILD_GIE
- "Build gie (geospatial integrity investigation environment)" ON)
+ "Build gie (geospatial integrity investigation environment)" "${BUILD_APPS}")
option(BUILD_PROJ
- "Build proj (cartographic projection tool)" ON)
+ "Build proj (cartographic projection tool)" "${BUILD_APPS}")
option(BUILD_PROJINFO
- "Build projinfo (SRS and coordinate operation metadata/query tool)" ON)
+ "Build projinfo (SRS and coordinate operation metadata/query tool)" "${BUILD_APPS}")
option(BUILD_PROJSYNC
- "Build projsync (synchronize transformation support data)" ON)
+ "Build projsync (synchronize transformation support data)" "${BUILD_APPS}")
if(NOT MSVC)
@@ -69,7 +72,8 @@ if(BUILD_PROJINFO)
set(BIN_TARGETS ${BIN_TARGETS} binprojinfo)
endif()
-if(BUILD_GIE)
+# Always build gie if testing is requested
+if(BUILD_GIE OR BUILD_TESTING)
include(bin_gie.cmake)
set(BIN_TARGETS ${BIN_TARGETS} gie)
endif()
diff --git a/src/bin_gie.cmake b/src/bin_gie.cmake
index a26ead3e..6ad7d4ab 100644
--- a/src/bin_gie.cmake
+++ b/src/bin_gie.cmake
@@ -11,8 +11,10 @@ add_executable(gie ${GIE_SRC} ${GIE_INCLUDE})
target_link_libraries(gie PRIVATE ${PROJ_LIBRARIES})
target_compile_options(gie PRIVATE ${PROJ_CXX_WARN_FLAGS})
-install(TARGETS gie
- DESTINATION ${BINDIR})
+if(BUILD_GIE)
+ install(TARGETS gie
+ DESTINATION ${BINDIR})
+endif()
if(MSVC AND BUILD_SHARED_LIBS)
target_compile_definitions(gie PRIVATE PROJ_MSVC_DLL_IMPORT=1)