diff options
author | Rechi <Rechi@users.noreply.github.com> | 2018-03-18 20:05:00 +0100 |
---|---|---|
committer | Rechi <Rechi@users.noreply.github.com> | 2018-03-18 20:05:00 +0100 |
commit | 7f79587bf74c039651fce16a4c960a61dc1175f6 (patch) | |
tree | ab9b180762b1c368fca387bc207d86d203f6f679 /cmake/scripts/common | |
parent | 277d75c11c90b05dfd9cbef4817c72afc74b8721 (diff) |
[cmake][addons] make pdb installation multi config aware
Diffstat (limited to 'cmake/scripts/common')
-rw-r--r-- | cmake/scripts/common/AddonHelpers.cmake | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/cmake/scripts/common/AddonHelpers.cmake b/cmake/scripts/common/AddonHelpers.cmake index 0249e6aed8..f6d79a40c0 100644 --- a/cmake/scripts/common/AddonHelpers.cmake +++ b/cmake/scripts/common/AddonHelpers.cmake @@ -247,21 +247,15 @@ macro (build_addon target prefix libs) endif() endif() - # in case of a VC++ project the installation location contains a $(Configuration) VS variable - # we replace it with ${CMAKE_BUILD_TYPE} (which doesn't cover the case when the build configuration - # is changed within Visual Studio) - string(REPLACE "$(Configuration)" "${CMAKE_BUILD_TYPE}" LIBRARY_LOCATION "${LIBRARY_LOCATION}") - if(${prefix}_SOURCES) # install the generated DLL file install(PROGRAMS ${LIBRARY_LOCATION} DESTINATION ${target} COMPONENT ${target}-${${prefix}_VERSION}) - if(CMAKE_BUILD_TYPE MATCHES Debug) - # for debug builds also install the PDB file - install(FILES $<TARGET_PDB_FILE:${target}> DESTINATION ${target} - COMPONENT ${target}-${${prefix}_VERSION}) - endif() + # for debug builds also install the PDB file + install(FILES $<TARGET_PDB_FILE:${target}> DESTINATION ${target} + CONFIGURATIONS Debug RelWithDebInfo + COMPONENT ${target}-${${prefix}_VERSION}) endif() if(${prefix}_CUSTOM_BINARY) install(FILES ${LIBRARY_LOCATION} DESTINATION ${target} RENAME ${LIBRARY_FILENAME}) |