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

How to determine CPM download path? #621

Open
artiomn opened this issue Nov 21, 2024 · 0 comments
Open

How to determine CPM download path? #621

artiomn opened this issue Nov 21, 2024 · 0 comments

Comments

@artiomn
Copy link

artiomn commented Nov 21, 2024

I have code like this:

if (CPM_SOURCE_CACHE)
    file(GLOB THIRD_PARTY_INCLUDES LIST_DIRECTORIES true "${CPM_SOURCE_CACHE}/**/include")
    include_directories("${CPM_SOURCE_CACHE}" ${THIRD_PARTY_INCLUDES})
endif()

Yes, this is a sort of a hack, but some third-party libraries can't be built without it.
But if my project used as third-party (via add_subdirectory()), I don't set CPM_SOURCE_CACHE and build fails.

How to get always correct real path where CPM saves third-party?

[
Probably: CPM_PACKAGE_${PACKAGE}_SOURCE_DIR?
]

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