Repository navigation
Conversation
vszakats
marked this pull request as draft
April 6, 2025 11:46
cmake 3.7 (_may_ be 3.11 or lower) does not accept it ``` -- Found Libpsl: /usr/local/include (found version "0.21.5") CMake Error at CMake/FindLibpsl.cmake:90 (set_target_properties): INTERFACE_LIBRARY targets may only have whitelisted properties. The property "VERSION" is not allowed. Call Stack (most recent call first): CMakeLists.txt:1252 (find_package) ```
This reverts commit d6487d6. Ah, needs more work, also to be done in PowerShell, so I'm passing.
vszakats
force-pushed
the
cm-iface-refix-for-old
branch
from
April 10, 2025 12:44
d6487d6 to
c9d884d
Compare
vszakats
marked this pull request as ready for review
April 10, 2025 12:47
This was referenced Apr 25, 2025
vszakats
added a commit
that referenced
this pull request
Apr 27, 2025
- fix `add_subdirectory` builds for old CMake versions. - libssh2-config.cmake: fix to set CMP0099 for CMake 3.17+ only. - libssh2-config.cmake: generalize code to support any number of deps. (mainly to sync with curl.) - libssh2-config.cmake: bind dependencies to the static libssh2 only. Follow-up to a0d8529 #1571 Follow-up to df0563a #1535 Closes #1581
vszakats
added a commit
to curl/curl
that referenced
this pull request
Nov 29, 2025
Rework the way curl's custom Find modules advertise their properties. Before this patch, Find modules returned detected dependency properties (header dirs, libs, libdirs, C flags, etc.) via global variables. curl's main `CMakeLists.txt` copied their values into global lists, which it later applied to targets. This solution worked internally, but it was unsuited for the public, distributed `CURLConfig.cmake` and publishing curl's Find modules with it, due to polluting the namespace of consumer projects. It's also impractical to apply the many individual variables to every targets depending on libcurl. To allow using Find modules in consumer projects, this patch makes them define as imported interface targets, named `CURL::<dependency>`. Then store dependency information as target properties. It avoids namespace pollution and makes the dependency information apply automatically to all targets using `CURL::libcurl_static`. Find modules continue to return `*_FOUND` and `*_VERSION` variables. For dependencies detected via `pkg-config`, CMake 3.16+ is recommended. Older CMake versions have a varying degree of support for propagating/handling library directories. This may cause issues in envs where dependencies reside in non-system locations and detected via `pkg-config` (e.g. macOS + Homebrew). Use `CURL_USE_PKGCONFIG=OFF` to fix these issues. Or upgrade to newer CMake, or link libcurl dynamically. Also: - re-enable `pkg-config` for old cmake `find_library()` integration tests. - make `curlinfo` build after these changes. - distribute local Find modules. - export the raw list of lib dependencies via `CURL_LIBRARIES_PRIVATE`. - `CURLconfig.cmake`: use curl's Find modules to detect dependencies in the consumer env. - add custom property to target property debug function. - the curl build process no longer modifies `CMAKE_C_FLAGS`. Follow-up to e865420 #17047 Ref: #14930 Ref: libssh2/libssh2#1535 Ref: libssh2/libssh2#1571 Ref: libssh2/libssh2#1581 Ref: libssh2/libssh2#1623 Closes #16973
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
VERSIONtarget property for cmake <3.19 compatibilityINTERFACE_namespacefor cmake <3.19 compatibility. (To avoid same error as above)
CFLAGS, when detected viapkg-config.-frameworkand raw libs when processingthe internal lib list for generating
libssh2.pc. For good measure,at the moment libssh2 doesn't depend on a Framework.
libssh2_dumptargetprops()to cmake 3.19+. It doesn't work witholder versions.
Issues found while applying this change to curl. They did not surface in
libssh2 CI.
Follow-up to df0563a #1535