-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/export config package #82
base: main
Are you sure you want to change the base?
Feature/export config package #82
Conversation
830a464
to
4868fe2
Compare
Add the verify headers target to the build presets for each compiler.
db86d5a
to
73fde6b
Compare
Update README Bump minimum cmake version
8e074d7
to
fb64c34
Compare
CMakeLists.txt
Outdated
add_library(beman_optional26 INTERFACE) | ||
add_library(Beman::Optional26::beman_optional26 ALIAS beman_optional26) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: needs to be consistent with namespace argument install below!
install( | ||
TARGETS beman_optional26 | ||
FILE_SET beman_optional26_headers | ||
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} | ||
COMPONENT beman_optional26_development | ||
) | ||
|
||
install( | ||
TARGETS beman_optional26 | ||
EXPORT beman_optional26_export | ||
DESTINATION | ||
${CMAKE_INSTALL_LIBDIR} | ||
FILE_SET beman_optional26_headers | ||
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} | ||
COMPONENT beman_optional26_development | ||
) | ||
|
||
install( | ||
EXPORT beman_optional26_export | ||
DESTINATION ${INSTALL_CONFIGDIR} | ||
NAMESPACE Beman::Optional26:: | ||
FILE beman_optional26-config-targets.cmake | ||
EXPORT_LINK_INTERFACE_LIBRARIES | ||
COMPONENT beman_optional26_development | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NOTE: the target
name and the namespace
name must be constant to the intern used alias
and config package name
!
@@ -59,23 +69,24 @@ add_subdirectory(include/beman/optional26) | |||
|
|||
add_subdirectory(examples) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO: examples should be optional with an option(OPTIONAL26_ENABLE_EXAMLPES ...)
The installed
cmake config packages
will be checked too if it is usable in anothercmake project.
see 73fde6b