diff --git a/CMakeLists.txt b/CMakeLists.txt index 74493b8c5b..e633add549 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1140,7 +1140,9 @@ if (OCE_AUTOINSTALL_DEPENDENT_LIBS) if (OCE_VISU_DEP AND OCE_WITH_GL2PS) get_filename_component(GL2PS_BIN_DIR ${GL2PS_LIBRARY} PATH) - get_filename_component(GL2PS_BIN_DIR_DBG ${GL2PS_LIBRARY_DEBUG} PATH) + if(CMAKE_CONFIGURATION_TYPES OR NMAKE) + get_filename_component(GL2PS_BIN_DIR_DBG ${GL2PS_LIBRARY_DEBUG} PATH) + endif(CMAKE_CONFIGURATION_TYPES OR NMAKE) install(FILES ${GL2PS_BIN_DIR_DBG}/${CMAKE_SHARED_LIBRARY_PREFIX}gl2psd.dll DESTINATION ${OCE_INSTALL_BIN_DIR} CONFIGURATIONS Debug OPTIONAL) install(FILES ${GL2PS_BIN_DIR}/${CMAKE_SHARED_LIBRARY_PREFIX}gl2ps.dll DESTINATION ${OCE_INSTALL_BIN_DIR} CONFIGURATIONS Release RelWithDebInfo MinSizeRel OPTIONAL) install(FILES ${GL2PS_BIN_DIR_DBG}/${CMAKE_STATIC_LIBRARY_PREFIX}gl2psd.${OCE_LIB_EXTENSION} DESTINATION ${OCE_INSTALL_LIB_DIR} CONFIGURATIONS Debug OPTIONAL) @@ -1153,16 +1155,18 @@ if (OCE_AUTOINSTALL_DEPENDENT_LIBS) if (OCE_VISU_DEP AND OCE_WITH_FREEIMAGE) get_filename_component(FREEIMAGE_BIN_DIR ${FREEIMAGE_LIBRARY} PATH) - get_filename_component(FREEIMAGE_BIN_DIR_DBG ${FREEIMAGE_LIBRARY_DEBUG} PATH) get_filename_component(FREEIMAGEPLUS_BIN_DIR ${FREEIMAGE_LIBRARY} PATH) - get_filename_component(FREEIMAGEPLUS_BIN_DIR_DBG ${FREEIMAGE_LIBRARY_DEBUG} PATH) - install(FILES ${FREEIMAGE_BIN_DIR_DBG}/${CMAKE_SHARED_LIBRARY_PREFIX}freeimaged.dll DESTINATION ${OCE_INSTALL_BIN_DIR} CONFIGURATIONS Debug OPTIONAL) - install(FILES ${FREEIMAGE_BIN_DIR}/${CMAKE_SHARED_LIBRARY_PREFIX}freeimage.dll DESTINATION ${OCE_INSTALL_BIN_DIR} CONFIGURATIONS Release RelWithDebInfo MinSizeRel OPTIONAL) + if(CMAKE_CONFIGURATION_TYPES OR NMAKE) + get_filename_component(FREEIMAGE_BIN_DIR_DBG ${FREEIMAGE_LIBRARY_DEBUG} PATH) + get_filename_component(FREEIMAGEPLUS_BIN_DIR_DBG ${FREEIMAGE_LIBRARY_DEBUG} PATH) + install(FILES ${FREEIMAGE_BIN_DIR_DBG}/${CMAKE_SHARED_LIBRARY_PREFIX}freeimaged.dll DESTINATION ${OCE_INSTALL_BIN_DIR} CONFIGURATIONS Debug OPTIONAL) + install(FILES ${FREEIMAGEPLUS_BIN_DIR_DBG}/${CMAKE_SHARED_LIBRARY_PREFIX}freeimageplusd.dll DESTINATION ${OCE_INSTALL_BIN_DIR} CONFIGURATIONS Debug OPTIONAL) + install(FILES ${FREEIMAGEPLUS_BIN_DIR_DBG}/${CMAKE_STATIC_LIBRARY_PREFIX}freeimageplusd.${OCE_LIB_EXTENSION} DESTINATION ${OCE_INSTALL_LIB_DIR} CONFIGURATIONS Debug OPTIONAL) + endif(CMAKE_CONFIGURATION_TYPES OR NMAKE) + install(FILES ${FREEIMAGE_BIN_DIR}/${CMAKE_SHARED_LIBRARY_PREFIX}freeimage.dll DESTINATION ${OCE_INSTALL_BIN_DIR} CONFIGURATIONS Release RelWithDebInfo MinSizeRel OPTIONAL) install(FILES ${FREEIMAGE_BIN_DIR_DBG}/${CMAKE_STATIC_LIBRARY_PREFIX}freeimaged.${OCE_LIB_EXTENSION} DESTINATION ${OCE_INSTALL_LIB_DIR} CONFIGURATIONS Debug OPTIONAL) install(FILES ${FREEIMAGE_BIN_DIR}/${CMAKE_STATIC_LIBRARY_PREFIX}freeimage.${OCE_LIB_EXTENSION} DESTINATION ${OCE_INSTALL_LIB_DIR} CONFIGURATIONS Release RelWithDebInfo MinSizeRel OPTIONAL) - install(FILES ${FREEIMAGEPLUS_BIN_DIR_DBG}/${CMAKE_SHARED_LIBRARY_PREFIX}freeimageplusd.dll DESTINATION ${OCE_INSTALL_BIN_DIR} CONFIGURATIONS Debug OPTIONAL) - install(FILES ${FREEIMAGEPLUS_BIN_DIR}/${CMAKE_SHARED_LIBRARY_PREFIX}freeimageplus.dll DESTINATION ${OCE_INSTALL_BIN_DIR} CONFIGURATIONS Release RelWithDebInfo MinSizeRel OPTIONAL) - install(FILES ${FREEIMAGEPLUS_BIN_DIR_DBG}/${CMAKE_STATIC_LIBRARY_PREFIX}freeimageplusd.${OCE_LIB_EXTENSION} DESTINATION ${OCE_INSTALL_LIB_DIR} CONFIGURATIONS Debug OPTIONAL) + install(FILES ${FREEIMAGEPLUS_BIN_DIR}/${CMAKE_SHARED_LIBRARY_PREFIX}freeimageplus.dll DESTINATION ${OCE_INSTALL_BIN_DIR} CONFIGURATIONS Release RelWithDebInfo MinSizeRel OPTIONAL) install(FILES ${FREEIMAGEPLUS_BIN_DIR}/${CMAKE_STATIC_LIBRARY_PREFIX}freeimageplus.${OCE_LIB_EXTENSION} DESTINATION ${OCE_INSTALL_LIB_DIR} CONFIGURATIONS Release RelWithDebInfo MinSizeRel OPTIONAL) if(OCE_INSTALL_PDB_FILES) @@ -1185,15 +1189,19 @@ if (OCE_AUTOINSTALL_DEPENDENT_LIBS) if(OCE_MULTITHREAD_LIBRARY STREQUAL "TBB") IF(NOT DEFINED TBB_BIN_DIR) get_filename_component(TBB_BIN_DIR ${TBB_LIBRARY} PATH) - get_filename_component(TBB_BIN_DIR_DBG ${TBB_LIBRARY_DEBUG} PATH) + if(CMAKE_CONFIGURATION_TYPES OR NMAKE) + get_filename_component(TBB_BIN_DIR_DBG ${TBB_LIBRARY_DEBUG} PATH) + endif(CMAKE_CONFIGURATION_TYPES OR NMAKE) ENDIF() if(NOT OCE_BUILD_SHARED_LIB) set(tbb_prefix "_static") endif() install(FILES "${TBB_BIN_DIR}/tbb${tbb_prefix}.dll" DESTINATION ${OCE_INSTALL_BIN_DIR} CONFIGURATIONS Release RelWithDebInfo MinSizeRel OPTIONAL) install(FILES "${TBB_BIN_DIR}/tbb${tbb_prefix}.${OCE_LIB_EXTENSION}" DESTINATION ${OCE_INSTALL_LIB_DIR} CONFIGURATIONS Release RelWithDebInfo MinSizeRel OPTIONAL) - install(FILES "${TBB_BIN_DIR_DBG}/tbb_debug${tbb_prefix}.dll" DESTINATION ${OCE_INSTALL_BIN_DIR} CONFIGURATIONS Debug OPTIONAL) - install(FILES "${TBB_BIN_DIR_DBG}/tbb_debug${tbb_prefix}.${OCE_LIB_EXTENSION}" DESTINATION ${OCE_INSTALL_LIB_DIR} CONFIGURATIONS Debug OPTIONAL) + if(CMAKE_CONFIGURATION_TYPES OR NMAKE) + install(FILES "${TBB_BIN_DIR_DBG}/tbb_debug${tbb_prefix}.dll" DESTINATION ${OCE_INSTALL_BIN_DIR} CONFIGURATIONS Debug OPTIONAL) + install(FILES "${TBB_BIN_DIR_DBG}/tbb_debug${tbb_prefix}.${OCE_LIB_EXTENSION}" DESTINATION ${OCE_INSTALL_LIB_DIR} CONFIGURATIONS Debug OPTIONAL) + endif(CMAKE_CONFIGURATION_TYPES OR NMAKE) if(OCE_INSTALL_PDB_FILES) install(FILES "${TBB_BIN_DIR_DBG}/tbb_debug${tbb_prefix}.pdb" DESTINATION ${OCE_INSTALL_LIB_DIR} CONFIGURATIONS Debug OPTIONAL) install(FILES "${TBB_BIN_DIR}/tbb${tbb_prefix}.pdb" DESTINATION ${OCE_INSTALL_LIB_DIR} CONFIGURATIONS Release RelWithDebInfo MinSizeRel OPTIONAL) @@ -1203,18 +1211,26 @@ if (OCE_AUTOINSTALL_DEPENDENT_LIBS) if(OCE_TBB_MALLOC_SUPPORT) if(NOT DEFINED TBB_BIN_DIR) get_filename_component(TBB_MALLOC_BIN_DIR ${TBB_MALLOC_LIBRARY} PATH) - get_filename_component(TBB_MALLOC_BIN_DIR_DBG ${TBB_MALLOC_LIBRARY_DEBUG} PATH) + if(CMAKE_CONFIGURATION_TYPES OR NMAKE) + get_filename_component(TBB_MALLOC_BIN_DIR_DBG ${TBB_MALLOC_LIBRARY_DEBUG} PATH) + endif(CMAKE_CONFIGURATION_TYPES OR NMAKE) else() SET(TBB_MALLOC_BIN_DIR ${TBB_BIN_DIR}) - SET(TBB_MALLOC_BIN_DIR_DBG ${TBB_BIN_DIR}) + if(CMAKE_CONFIGURATION_TYPES OR NMAKE) + SET(TBB_MALLOC_BIN_DIR_DBG ${TBB_BIN_DIR}) + endif(CMAKE_CONFIGURATION_TYPES OR NMAKE) endif() install(FILES "${TBB_MALLOC_BIN_DIR}/tbbmalloc.dll" DESTINATION ${OCE_INSTALL_BIN_DIR} CONFIGURATIONS Release RelWithDebInfo MinSizeRel OPTIONAL) - install(FILES "${TBB_MALLOC_BIN_DIR_DBG}/tbbmalloc_debug.dll" DESTINATION ${OCE_INSTALL_BIN_DIR} CONFIGURATIONS Debug OPTIONAL) install(FILES "${TBB_MALLOC_BIN_DIR}/tbbmalloc.${OCE_LIB_EXTENSION}" DESTINATION ${OCE_INSTALL_LIB_DIR} CONFIGURATIONS Release RelWithDebInfo MinSizeRel OPTIONAL) - install(FILES "${TBB_MALLOC_BIN_DIR_DBG}/tbbmalloc_debug.${OCE_LIB_EXTENSION}" DESTINATION ${OCE_INSTALL_LIB_DIR} CONFIGURATIONS Debug OPTIONAL) + if(CMAKE_CONFIGURATION_TYPES OR NMAKE) + install(FILES "${TBB_MALLOC_BIN_DIR_DBG}/tbbmalloc_debug.dll" DESTINATION ${OCE_INSTALL_BIN_DIR} CONFIGURATIONS Debug OPTIONAL) + install(FILES "${TBB_MALLOC_BIN_DIR_DBG}/tbbmalloc_debug.${OCE_LIB_EXTENSION}" DESTINATION ${OCE_INSTALL_LIB_DIR} CONFIGURATIONS Debug OPTIONAL) + endif(CMAKE_CONFIGURATION_TYPES OR NMAKE) if(OCE_INSTALL_PDB_FILES) - install(FILES "${TBB_MALLOC_BIN_DIR_DBG}/tbbmalloc_debug.pdb" DESTINATION ${OCE_INSTALL_LIB_DIR} CONFIGURATIONS Debug OPTIONAL) + if(CMAKE_CONFIGURATION_TYPES OR NMAKE) + install(FILES "${TBB_MALLOC_BIN_DIR_DBG}/tbbmalloc_debug.pdb" DESTINATION ${OCE_INSTALL_LIB_DIR} CONFIGURATIONS Debug OPTIONAL) + endif(CMAKE_CONFIGURATION_TYPES OR NMAKE) install(FILES "${TBB_MALLOC_BIN_DIR}/tbbmalloc.pdb" DESTINATION ${OCE_INSTALL_LIB_DIR} CONFIGURATIONS Release RelWithDebInfo MinSizeRel OPTIONAL) endif() endif(OCE_TBB_MALLOC_SUPPORT)