Skip to content

Commit

Permalink
Add 'FILE_SET CXX_MODULES' to install conditionally
Browse files Browse the repository at this point in the history
Close #388

The old cmake can't recognize 'FILE_SET CXX_MODULES'.
  • Loading branch information
ChuanqiXu9 committed Sep 2, 2024
1 parent c409576 commit 32597cd
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions async_simple/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,13 @@ if(${UTHREAD} OR ${ASYNC_SIMPLE_BUILD_MODULES})

target_link_libraries(async_simple PUBLIC async_simple_header_only)
target_link_libraries(async_simple_static PUBLIC async_simple_header_only)
install(TARGETS async_simple EXPORT async_simple_targets FILE_SET CXX_MODULES DESTINATION lib/)
install(TARGETS async_simple_static EXPORT async_simple_targets FILE_SET CXX_MODULES DESTINATION lib/)
if (${ASYNC_SIMPLE_BUILD_MODULES})
install(TARGETS async_simple EXPORT async_simple_targets FILE_SET CXX_MODULES DESTINATION lib/)
install(TARGETS async_simple_static EXPORT async_simple_targets FILE_SET CXX_MODULES DESTINATION lib/)
else()
install(TARGETS async_simple EXPORT async_simple_targets DESTINATION lib/)
install(TARGETS async_simple_static EXPORT async_simple_targets DESTINATION lib/)
endif()
else()
add_library(async_simple_static INTERFACE)
target_link_libraries(async_simple_static INTERFACE async_simple_header_only)
Expand Down

0 comments on commit 32597cd

Please sign in to comment.