Browse Source

CMake build: fix debug postfix, will now be d only for debug builds.

Kim Kulling 10 years ago
parent
commit
a78e3708d2
1 changed files with 5 additions and 1 deletions
  1. 5 1
      CMakeLists.txt

+ 5 - 1
CMakeLists.txt

@@ -94,7 +94,11 @@ SET( ASSIMP_INCLUDE_INSTALL_DIR "include" CACHE PATH
 SET( ASSIMP_BIN_INSTALL_DIR "bin" CACHE PATH
 SET( ASSIMP_BIN_INSTALL_DIR "bin" CACHE PATH
   "Path the tool executables are installed to." )
   "Path the tool executables are installed to." )
 
 
-SET(CMAKE_DEBUG_POSTFIX "d" CACHE STRING "Debug Postfix for lib, samples and tools")
+IF (CMAKE_BUILD_TYPE STREQUAL "Release")
+  SET(CMAKE_DEBUG_POSTFIX "" CACHE STRING "Debug Postfix for lib, samples and tools")
+ELSE()
+  SET(CMAKE_DEBUG_POSTFIX "d" CACHE STRING "Debug Postfix for lib, samples and tools")
+ENDIF()
 
 
 # Only generate this target if no higher-level project already has
 # Only generate this target if no higher-level project already has
 IF (NOT TARGET uninstall)
 IF (NOT TARGET uninstall)