Skip to content

Commit

Permalink
various fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
Mizux committed Sep 13, 2023
1 parent eff4414 commit 0355245
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
8 changes: 5 additions & 3 deletions ci/samples/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,11 @@ set_target_properties(sample PROPERTIES
CXX_STANDARD_REQUIRED ON
VERSION ${PROJECT_VERSION})
target_link_libraries(sample PRIVATE
CMakeCpp::Foo
CMakeCpp::Bar
CMakeCpp::FooBar)
CMakeCpp::Full
#CMakeCpp::Foo
#CMakeCpp::Bar
#CMakeCpp::FooBar
)

if(BUILD_TESTING)
add_test(NAME sample_UT COMMAND sample)
Expand Down
10 changes: 9 additions & 1 deletion cmake/cpp.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,14 @@ target_sources(Full PRIVATE
$<TARGET_OBJECTS:Foo>
$<TARGET_OBJECTS:FooBar>
)
add_library(${PROJECT_NAMESPACE}::Full ALIAS Full)
install(TARGETS Full
EXPORT ${PROJECT_NAME}Targets
PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/foobar
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
#RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
)

add_subdirectory(FooBarApp)

Expand Down Expand Up @@ -153,7 +161,7 @@ function(add_cpp_example FILE_NAME)
target_include_directories(${EXAMPLE_NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
target_compile_features(${EXAMPLE_NAME} PRIVATE cxx_std_20)
target_link_libraries(${EXAMPLE_NAME} PRIVATE
Full
${PROJECT_NAMESPACE}::Full
#${PROJECT_NAMESPACE}::Foo
#${PROJECT_NAMESPACE}::Bar
#${PROJECT_NAMESPACE}::FooBar
Expand Down

0 comments on commit 0355245

Please sign in to comment.