Skip to content

CMake: add CURL_ENABLE_EXPORT_TARGET option.#7060

Closed
lemourin wants to merge 1 commit intocurl:masterfrom
lemourin:cmake-fix
Closed

CMake: add CURL_ENABLE_EXPORT_TARGET option.#7060
lemourin wants to merge 1 commit intocurl:masterfrom
lemourin:cmake-fix

Conversation

@lemourin
Copy link
Contributor

install(EXPORT ...) causes trouble when embedding curl dependencies which
don't provide install(EXPORT ...) targets (e.g libressl and nghttp2) with
cmake's add_subdirectory.

install(EXPORT ...) causes trouble when embedding curl dependencies which
don't provide install(EXPORT ...) targets (e.g libressl and nghttp2) with
cmake's add_subdirectory.
@bagder bagder added the cmake label May 14, 2021
@bagder bagder requested a review from jzakrzewski May 24, 2021 14:44
Copy link
Contributor

@jzakrzewski jzakrzewski left a comment

Choose a reason for hiding this comment

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

I see no harm in adding this.

@bagder
Copy link
Member

bagder commented May 25, 2021

Thanks!

@bagder bagder closed this in 643ec29 May 25, 2021
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.

3 participants