aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt6
-rw-r--r--src/CMakeLists.txt6
2 files changed, 12 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index f30b1a6b..6b3734b0 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -52,6 +52,12 @@ if (NOT CMAKE_CONFIGURATION_TYPES AND NOT CMAKE_BUILD_TYPE)
set (CMAKE_BUILD_TYPE Release)
endif ()
+if (MSVC OR CMAKE_CONFIGURATION_TYPES)
+ # For multi-config systems and for Visual Studio, the debug version of
+ # the library has _d appended.
+ set (CMAKE_DEBUG_POSTFIX _d)
+endif ()
+
option(PROJ4_TESTS "Enable build of collection of PROJ4 tests" ON)
boost_report_value(PROJ4_TESTS)
if(PROJ4_TESTS)
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 7c84fabc..aba5b4c4 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -37,3 +37,9 @@ endif(BUILD_GEOD)
if(BUILD_NAD2BIN)
include(bin_nad2bin.cmake)
endif(BUILD_NAD2BIN)
+
+if (MSVC OR CMAKE_CONFIGURATION_TYPES)
+ # Add _d suffix for your debug versions of the tools
+ set_target_properties (cs2cs binproj geod nad2bin PROPERTIES
+ DEBUG_POSTFIX ${CMAKE_DEBUG_POSTFIX})
+endif ()