Skip to content

Improve usability of CMake build as a sub-project - #9638

Closed
jbms wants to merge 1 commit into
curl:masterfrom
jbms:cmake-subproject-fix
Closed

jbms wants to merge 1 commit into
curl:masterfrom
jbms:cmake-subproject-fix

Conversation

@jbms

@jbms jbms commented Oct 4, 2022

Copy link
Copy Markdown
Contributor
  • Renames uninstall -> curl_uninstall
  • Ensures all export rules are guarded by CURL_ENABLE_EXPORT_TARGET

Comment thread CMakeLists.txt Resolved
Comment thread CMakeLists.txt Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All the other cmake checks for HAVE_* options use if()/if(NOT) without DEFINED. I think we should not introduce this inconsistency.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added an explanatory comment at the top. I am checking for DEFINED rather than for the boolean value, because someone could define it to OFF, and in that case we still want to skip the symbol detection.

@bagder bagder added the cmake label Oct 4, 2022
- Renames `uninstall` -> `curl_uninstall`
- Ensures all export rules are guarded by CURL_ENABLE_EXPORT_TARGET
@jbms
jbms force-pushed the cmake-subproject-fix branch from ac18f77 to f05b3b9 Compare October 4, 2022 16:49
@bagder
bagder requested a review from jzakrzewski October 7, 2022 08:34

@jzakrzewski jzakrzewski left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't know if it's complete but looks like a step in the right direction.

@bagder bagder closed this in 8698825 Oct 21, 2022
@bagder

bagder commented Oct 21, 2022

Copy link
Copy Markdown
Member

Thanks!

vszakats added a commit that referenced this pull request Nov 19, 2025
…n lib and src

Based on existing code and commit history it appears
`CURL_DISABLE_INSTALL` means to prevent calling `install()`;
`CURL_ENABLE_EXPORT_TARGET` means to prevent calling `export()` and
`install()`s with `EXPORT` in them.

Fix them to also apply to the lib and src directories in that vain:
- lib: honor `CURL_DISABLE_INSTALL`
- src: honor `CURL_DISABLE_INSTALL`
- src: honor `CURL_ENABLE_EXPORT_TARGET`

https://cmake.org/cmake/help/v4.2/command/install.html
https://cmake.org/cmake/help/v4.2/command/export.html

- `CURL_DISABLE_INSTALL` follow-up to:
  aace27b #12287
- `CURL_ENABLE_EXPORT_TARGET` follow-up to:
  8698825 #9638
  643ec29 #7060

Closes #19144
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

4 participants