diff options
| author | Mike Taves <mwtoews@gmail.com> | 2019-03-18 23:58:41 +1300 |
|---|---|---|
| committer | Mike Taves <mwtoews@gmail.com> | 2019-03-19 20:04:48 +1300 |
| commit | 2622d3851573cd44fc7b36bfd15f07215f434d4b (patch) | |
| tree | 0bd797dc0c66c52b494c7b5dfe7b45f32fecc459 /src/CMakeLists.txt | |
| parent | 8cf492acb3840eff5064a2da421c143e1fd1646c (diff) | |
| download | PROJ-2622d3851573cd44fc7b36bfd15f07215f434d4b.tar.gz PROJ-2622d3851573cd44fc7b36bfd15f07215f434d4b.zip | |
Normalize CMake with cmakelint, 2-space indent
Diffstat (limited to 'src/CMakeLists.txt')
| -rw-r--r-- | src/CMakeLists.txt | 64 |
1 files changed, 35 insertions, 29 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 122227bf..48c785a5 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -3,71 +3,77 @@ include(lib_proj.cmake) # configure executable build -option(BUILD_CCT "Build cct (coordinate conversion and transformation tool)" ON) -option(BUILD_CS2CS "Build cs2cs (coordinate systems to coordinate systems translation tool)" ON) -option(BUILD_GEOD "Build geod (computation of geodesic lines)" ON) -option(BUILD_GIE "Build gie (geospatial integrity investigation environment - a PROJ.4 test tool)" ON) -option(BUILD_PROJ "Build proj (cartographic projection tool : latlong <-> projected coordinates)" ON) -option(BUILD_PROJINFO "Build projinfo (SRS and coordinate operation metadata/query tool)" ON) +option(BUILD_CCT + "Build cct (coordinate conversion and transformation tool)" ON) +option(BUILD_CS2CS + "Build cs2cs (coordinate systems to coordinate systems translation tool)" ON) +option(BUILD_GEOD + "Build geod (computation of geodesic lines)" ON) +option(BUILD_GIE + "Build gie (geospatial integrity investigation environment)" ON) +option(BUILD_PROJ + "Build proj (cartographic projection tool)" ON) +option(BUILD_PROJINFO + "Build projinfo (SRS and coordinate operation metadata/query tool)" ON) if(NOT MSVC) - if (NOT APPLE) + if(NOT APPLE) # Use relative path so that package is relocatable set(CMAKE_INSTALL_RPATH "\$ORIGIN/../${LIBDIR}") - else () - set (CMAKE_INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/${LIBDIR}") + else() + set(CMAKE_INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/${LIBDIR}") # TO DO: cmake 2.8.12 introduces a way to make the install tree # relocatable with OSX via # (1) set(CMAKE_MACOSX_RPATH ON) and # (2) setting the INSTALL_RPATH property on the executables to # "@loader_path/../${LIBDIR}" - endif () + endif() -else () +else() # Linking to setargv.obj enables wildcard globbing for the # command line utilities, when compiling with MSVC - # https://docs.microsoft.com/da-dk/cpp/c-language/expanding-wildcard-arguments + # https://docs.microsoft.com/cpp/c-language/expanding-wildcard-arguments set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} setargv.obj") -endif () +endif() if(BUILD_CCT) - include(bin_cct.cmake) - set(BIN_TARGETS ${BIN_TARGETS} cct) -endif(BUILD_CCT) + include(bin_cct.cmake) + set(BIN_TARGETS ${BIN_TARGETS} cct) +endif() if(BUILD_CS2CS) - include(bin_cs2cs.cmake) - set(BIN_TARGETS ${BIN_TARGETS} cs2cs) -endif(BUILD_CS2CS) + include(bin_cs2cs.cmake) + set(BIN_TARGETS ${BIN_TARGETS} cs2cs) +endif() if(BUILD_GEOD) include(bin_geod.cmake) include(bin_geodtest.cmake) set(BIN_TARGETS ${BIN_TARGETS} geod) -endif(BUILD_GEOD) +endif() if(BUILD_PROJ) include(bin_proj.cmake) set(BIN_TARGETS ${BIN_TARGETS} binproj) -endif(BUILD_PROJ) +endif() if(BUILD_PROJINFO) include(bin_projinfo.cmake) set(BIN_TARGETS ${BIN_TARGETS} binprojinfo) -endif(BUILD_PROJINFO) +endif() if(BUILD_GIE) - include(bin_gie.cmake) - set(BIN_TARGETS ${BIN_TARGETS} gie) -endif(BUILD_GIE) + include(bin_gie.cmake) + set(BIN_TARGETS ${BIN_TARGETS} gie) +endif() -if (MSVC OR CMAKE_CONFIGURATION_TYPES) +if(MSVC OR CMAKE_CONFIGURATION_TYPES) if(BIN_TARGETS) # Add _d suffix for your debug versions of the tools - set_target_properties (${BIN_TARGETS} PROPERTIES + set_target_properties(${BIN_TARGETS} PROPERTIES DEBUG_POSTFIX ${CMAKE_DEBUG_POSTFIX}) - endif(BIN_TARGETS) -endif () + endif() +endif() |
