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

-DCMAKE_PROJECT_INCLUDE argument is not passed to source subproject #479

Closed
leleliu008 opened this issue Sep 4, 2022 · 2 comments · Fixed by #480
Closed

-DCMAKE_PROJECT_INCLUDE argument is not passed to source subproject #479

leleliu008 opened this issue Sep 4, 2022 · 2 comments · Fixed by #480

Comments

@leleliu008
Copy link
Contributor

leleliu008 commented Sep 4, 2022

Hi there, I wanna build a statically linked bear execuable, I wanna use -DCMAKE_PROJECT_INCLUDE=xx.cmake to inject follwoing code:

set(CMAKE_FIND_LIBRARY_SUFFIXES ".a")

but I find that -DCMAKE_PROJECT_INCLUDE argument is not passed to source subproject. Although I can edit code directly, but I think it would be better if you could support this argument. maybe someone else want this feature too.

Reference: https://cmake.org/cmake/help/latest/variable/CMAKE_PROJECT_INCLUDE.html

@leleliu008
Copy link
Contributor Author

temporary solution:

sed -i '/-DPKG_CONFIG_EXECUTABLE/a -DCMAKE_PROJECT_INCLUDE=${CMAKE_PROJECT_INCLUDE}' CMakeLists.txt

@rizsotto
Copy link
Owner

rizsotto commented Sep 6, 2022

Hey @leleliu008 could you please raise a PR for this?

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

Successfully merging a pull request may close this issue.

2 participants