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