From e16bca653fbc400d1c5426393232b326d25a8501 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mika=C3=ABl=20Capelle?= Date: Thu, 11 Jul 2024 16:59:12 +0200 Subject: [PATCH] Fix config.cmake.in. --- cmake/config.cmake.in | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/cmake/config.cmake.in b/cmake/config.cmake.in index 57a1af7..05a5ce0 100644 --- a/cmake/config.cmake.in +++ b/cmake/config.cmake.in @@ -2,7 +2,7 @@ include ( "${CMAKE_CURRENT_LIST_DIR}/mo2-libbsarch-targets.cmake" ) -target_link_libraries(mo2::libbsarch PUBLIC mo2::libbsarch_OOP) +target_link_libraries(mo2::libbsarch INTERFACE mo2::libbsarch_OOP) # libbsarch is usually be build in Debug or Release/RelWithDebInfo, so we need to map # missing configurations to avoid issue with CMP0111 @@ -14,6 +14,12 @@ if (_LIBBSARCH_HAS_RELEASE EQUAL -1) ) set_property(TARGET mo2::libbsarch APPEND PROPERTY IMPORTED_CONFIGURATIONS MINSIZEREL) set_property(TARGET mo2::libbsarch APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE) + set_target_properties(mo2::libbsarch_OOP PROPERTIES + MAP_IMPORTED_CONFIG_MINSIZEREL RelWithDebInfo + MAP_IMPORTED_CONFIG_RELEASE RelWithDebInfo + ) + set_property(TARGET mo2::libbsarch_OOP APPEND PROPERTY IMPORTED_CONFIGURATIONS MINSIZEREL) + set_property(TARGET mo2::libbsarch_OOP APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE) else() set_target_properties(mo2::libbsarch PROPERTIES MAP_IMPORTED_CONFIG_MINSIZEREL Release @@ -21,4 +27,10 @@ else() ) set_property(TARGET mo2::libbsarch APPEND PROPERTY IMPORTED_CONFIGURATIONS MINSIZEREL) set_property(TARGET mo2::libbsarch APPEND PROPERTY IMPORTED_CONFIGURATIONS RELWITHDEBINFO) + set_target_properties(mo2::libbsarch_OOP PROPERTIES + MAP_IMPORTED_CONFIG_MINSIZEREL Release + MAP_IMPORTED_CONFIG_RELWITHDEBINFO Release + ) + set_property(TARGET mo2::libbsarch_OOP APPEND PROPERTY IMPORTED_CONFIGURATIONS MINSIZEREL) + set_property(TARGET mo2::libbsarch_OOP APPEND PROPERTY IMPORTED_CONFIGURATIONS RELWITHDEBINFO) endif()