Skip to content

Commit 9cc76ac

Browse files
authored
BUG: Fix installing targets in Debug mode (#865)
Fixes #864
1 parent ec22c69 commit 9cc76ac

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

CMake/PlusLibMacros.cmake

+10-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,15 @@
11
MACRO(PlusLibInstallLibrary _target_name _variable_root)
2+
IF(CMAKE_CONFIGURATION_TYPES)
3+
SET(CONFIG ${CMAKE_CONFIGURATION_TYPES})
4+
ELSEIF(CMAKE_BUILD_TYPE)
5+
SET(CONFIG ${CMAKE_BUILD_TYPE})
6+
ELSE()
7+
SET(CONFIG Release)
8+
ENDIF()
29
INSTALL(TARGETS ${_target_name} EXPORT PlusLib
3-
RUNTIME DESTINATION "${PLUSLIB_BINARY_INSTALL}" CONFIGURATIONS Release COMPONENT RuntimeLibraries
4-
LIBRARY DESTINATION "${PLUSLIB_LIBRARY_INSTALL}" CONFIGURATIONS Release COMPONENT RuntimeLibraries
5-
ARCHIVE DESTINATION "${PLUSLIB_ARCHIVE_INSTALL}" CONFIGURATIONS Release COMPONENT Development
10+
RUNTIME DESTINATION "${PLUSLIB_BINARY_INSTALL}" CONFIGURATIONS ${CONFIG} COMPONENT RuntimeLibraries
11+
LIBRARY DESTINATION "${PLUSLIB_LIBRARY_INSTALL}" CONFIGURATIONS ${CONFIG} COMPONENT RuntimeLibraries
12+
ARCHIVE DESTINATION "${PLUSLIB_ARCHIVE_INSTALL}" CONFIGURATIONS ${CONFIG} COMPONENT Development
613
)
714
INSTALL(FILES ${${_variable_root}_HDRS}
815
DESTINATION "${PLUSLIB_INCLUDE_INSTALL}" COMPONENT Development

0 commit comments

Comments
 (0)