Skip to content
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

Show how to fetch-content dependencies which are not in CMake #4

Open
bast opened this issue Sep 1, 2024 · 0 comments
Open

Show how to fetch-content dependencies which are not in CMake #4

bast opened this issue Sep 1, 2024 · 0 comments

Comments

@bast
Copy link
Member

bast commented Sep 1, 2024

From #3

An example of how to fetch a content that doesn't support Cmake:

FetchContent_Declare(
the_x_package
GIT_REPOSITORY https://github.com/thepackage.git
)

FetchContent_GetProperties(the_x_package)
if(NOT the_x_package_POPULATED)
FetchContent_Populate(the_x_package)
# Let say it is a header only lib:
add_library(the_x_lib INTERFACE)
target_include_directories(the_x_lib INTERFACE ${the_x_package_SOURCE_DIR})
endif()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant