-
Notifications
You must be signed in to change notification settings - Fork 76
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
cmake: Add install export set #164
Conversation
aa661bd
to
84e038d
Compare
Side note, the version is set in Line 33 in 550ddfe
|
84e038d
to
7f8b494
Compare
7f8b494
to
bdda4c4
Compare
bdda4c4
to
a4c878c
Compare
@bwrsandman Please resolve the conflicts and update your branch, I will have a look then, thanks in advance. |
Set convert_utf as private as it is statically linked. Specify libunshield include directory in install interface Add unshield:: namespace export set Set all targets to the unshieldConfig export set
5b2b501
to
917f3e1
Compare
917f3e1
to
439d605
Compare
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.
I have tested it locally, looks good.
The only nitpick I have: Please use all uppercase for CMake variables.
439d605
to
376a93e
Compare
Switched to UPPER |
Thank you @bwrsandman and @kratz00 ! |
convert_utf
as private as it is statically linked so we don't want to export it or its headers.libunshield
include directory in install interface because it is different than in build-timeunshield::
cmake namespace export set namedunshieldConfig
unshieldConfig
export setCMake config sets generate the following files:
${install_dir}/lib/cmake/unshieldunshieldConfig.cmake
${install_dir}/lib/cmake/unshieldunshieldConfig-${build-config}.cmake
An export set allows CMake users to more easily link with a cmake library which unshield now is.
They can now in CMake do the following:
Using
add_custom_target(... unshield::unshield...)
can be used as a dependency for another target to generate (extract) filesAlso added artifact upload to the cmake tests.
Resulting tree
ref: https://cmake.org/cmake/help/latest/guide/importing-exporting/index.html#exporting-targets