Skip to content

Commit

Permalink
Win32 fix in CMakeLists.txt - Find dbg library for gl2ps/freeimage/tbb
Browse files Browse the repository at this point in the history
  • Loading branch information
tpaviot committed Mar 1, 2017
1 parent 77737d8 commit 5cac8bd
Showing 1 changed file with 32 additions and 16 deletions.
48 changes: 32 additions & 16 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand All @@ -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)
Expand All @@ -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)
Expand Down

0 comments on commit 5cac8bd

Please sign in to comment.