diff --git a/CMakeLists.txt b/CMakeLists.txt index 2f063fb3c..eee0cbc42 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -42,6 +42,8 @@ SET( INCLUDE_INSTALL_DIR "include" CACHE PATH SET( BIN_INSTALL_DIR "bin" CACHE PATH "Path the tool executables are installed to." ) +SET(DEBUG_POSTFIX "D" CACHE STRING "Debug Postfitx for lib, samples and tools") + # Generate a pkg-config .pc for the Assimp library. CONFIGURE_FILE( "${PROJECT_SOURCE_DIR}/assimp.pc.in" "${PROJECT_BINARY_DIR}/assimp.pc" @ONLY ) INSTALL( FILES "${PROJECT_BINARY_DIR}/assimp.pc" DESTINATION ${LIB_INSTALL_DIR}/pkgconfig/ COMPONENT assimp-dev) diff --git a/code/CMakeLists.txt b/code/CMakeLists.txt index 82afc5234..32bcb28c7 100644 --- a/code/CMakeLists.txt +++ b/code/CMakeLists.txt @@ -699,6 +699,8 @@ ADD_LIBRARY( assimp SHARED ) ENDIF ( BUILD_STATIC_LIB ) +SET_PROPERTY(TARGET assimp PROPERTY DEBUG_POSTFIX ${DEBUG_POSTFIX}) + TARGET_LINK_LIBRARIES(assimp ${ZLIB_LIBRARIES}) SET_TARGET_PROPERTIES( assimp PROPERTIES VERSION ${LIBRARY_VERSION} diff --git a/samples/SimpleOpenGL/CMakeLists.txt b/samples/SimpleOpenGL/CMakeLists.txt index d25ec62bf..9b2ae5402 100644 --- a/samples/SimpleOpenGL/CMakeLists.txt +++ b/samples/SimpleOpenGL/CMakeLists.txt @@ -14,6 +14,8 @@ ADD_EXECUTABLE( assimp_simpleogl Sample_SimpleOpenGL.c ) +SET_PROPERTY(TARGET assimp_simpleogl PROPERTY DEBUG_POSTFIX ${DEBUG_POSTFIX}) + TARGET_LINK_LIBRARIES( assimp_simpleogl assimp ) SET_TARGET_PROPERTIES( assimp_simpleogl PROPERTIES OUTPUT_NAME assimp_simpleogl diff --git a/samples/SimpleTexturedOpenGL/CMakeLists.txt b/samples/SimpleTexturedOpenGL/CMakeLists.txt index 57e5df069..736e45e2c 100644 --- a/samples/SimpleTexturedOpenGL/CMakeLists.txt +++ b/samples/SimpleTexturedOpenGL/CMakeLists.txt @@ -17,6 +17,8 @@ ADD_EXECUTABLE( assimp_simpletexturedogl WIN32 SimpleTexturedOpenGL/src/model_loading.cpp ) +SET_PROPERTY(TARGET assimp_simpletexturedogl PROPERTY DEBUG_POSTFIX ${DEBUG_POSTFIX}) + IF( WIN32 ) SET( PSDK_PATH "C:/Program Files/Microsoft Platform SDK/Bin" ) SET( PSDK_INC "C:/Program Files/Microsoft Platform SDK/Include" ) diff --git a/tools/assimp_cmd/CMakeLists.txt b/tools/assimp_cmd/CMakeLists.txt index 637a5592b..f5758ece4 100644 --- a/tools/assimp_cmd/CMakeLists.txt +++ b/tools/assimp_cmd/CMakeLists.txt @@ -17,6 +17,8 @@ ADD_EXECUTABLE( assimp_cmd Export.cpp ) +SET_PROPERTY(TARGET assimp_cmd PROPERTY DEBUG_POSTFIX ${DEBUG_POSTFIX}) + TARGET_LINK_LIBRARIES( assimp_cmd assimp ${ZLIB_LIBRARIES}) SET_TARGET_PROPERTIES( assimp_cmd PROPERTIES OUTPUT_NAME assimp diff --git a/tools/assimp_view/CMakeLists.txt b/tools/assimp_view/CMakeLists.txt index a194e14a2..a45713ae6 100644 --- a/tools/assimp_view/CMakeLists.txt +++ b/tools/assimp_view/CMakeLists.txt @@ -41,6 +41,8 @@ add_executable( assimp_viewer WIN32 txi.bmp ) +SET_PROPERTY(TARGET assimp_viewer PROPERTY DEBUG_POSTFIX ${DEBUG_POSTFIX}) + IF( WIN32 ) SET( PSDK_PATH "C:/Program Files/Microsoft Platform SDK/Bin" ) SET( PSDK_INC "C:/Program Files/Microsoft Platform SDK/Include" ) @@ -76,3 +78,6 @@ ENDIF( WIN32 ) # Link the executable to the Hello library. target_link_libraries ( assimp_viewer assimp ${DX9_LIBRARIES} comctl32.lib Winmm.lib ) +INSTALL( TARGETS assimp_viewer + DESTINATION "${BIN_INSTALL_DIR}" COMPONENT assimp-dev +)