From 216e489e5aba0f43f87d435d0c005c705a53e826 Mon Sep 17 00:00:00 2001 From: Peter Csajtai Date: Thu, 22 Aug 2024 14:37:54 +0200 Subject: [PATCH] Update cmake --- CMakeLists.txt | 7 +------ module/CMakeLists.txt | 7 ++++++- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ca3165f..036a20e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -78,12 +78,7 @@ if (SEMVER_INSTALL) NAMESPACE ${PROJECT_NAME}:: FILE ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}-targets.cmake) - if(SEMVER_BUILD_MODULE) - install(TARGETS ${PROJECT_NAME} - EXPORT ${PROJECT_NAME}-targets - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} - FILE_SET CXX_MODULES DESTINATION ${CMAKE_INSTALL_LIBDIR}/miu) - else() + if(NOT SEMVER_BUILD_MODULE) install(TARGETS ${PROJECT_NAME} EXPORT ${PROJECT_NAME}-targets INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) diff --git a/module/CMakeLists.txt b/module/CMakeLists.txt index 50f11ac..7f611d2 100644 --- a/module/CMakeLists.txt +++ b/module/CMakeLists.txt @@ -7,4 +7,9 @@ target_sources(${PROJECT_NAME} PUBLIC target_include_directories(${PROJECT_NAME} PUBLIC $ $) -target_compile_features(${PROJECT_NAME} PUBLIC cxx_std_20) \ No newline at end of file +target_compile_features(${PROJECT_NAME} PUBLIC cxx_std_20) + +install(TARGETS ${PROJECT_NAME} + EXPORT ${PROJECT_NAME}-targets + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + FILE_SET CXX_MODULES DESTINATION ${CMAKE_INSTALL_LIBDIR}/miu) \ No newline at end of file