Skip to content

Commit

Permalink
Add imported config map.
Browse files Browse the repository at this point in the history
  • Loading branch information
Holt59 committed Jul 11, 2024
1 parent 68e1ae7 commit 0c0b4cd
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions cmake/config.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,20 @@
find_package(7zip CONFIG REQUIRED)

include ( "${CMAKE_CURRENT_LIST_DIR}/mo2-archive-targets.cmake" )

list(FIND _ARCHIVE_CONFIGURATIONS "RELEASE" _ARCHIVE_HAS_RELEASE)
if (_ARCHIVE_HAS_RELEASE EQUAL -1)
set_target_properties(mo2::archive PROPERTIES
MAP_IMPORTED_CONFIG_MINSIZEREL RelWithDebInfo
MAP_IMPORTED_CONFIG_RELEASE RelWithDebInfo
)
set_property(TARGET mo2::archive APPEND PROPERTY IMPORTED_CONFIGURATIONS MINSIZEREL)
set_property(TARGET mo2::archive APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE)
else()
set_target_properties(mo2::archive PROPERTIES
MAP_IMPORTED_CONFIG_MINSIZEREL Release
MAP_IMPORTED_CONFIG_RELWITHDEBINFO Release
)
set_property(TARGET mo2::archive APPEND PROPERTY IMPORTED_CONFIGURATIONS MINSIZEREL)
set_property(TARGET mo2::archive APPEND PROPERTY IMPORTED_CONFIGURATIONS RELWITHDEBINFO)
endif()

0 comments on commit 0c0b4cd

Please sign in to comment.