-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Labels
OS:macosIssues specific to Apple Operating Systems like MacOS and iOSIssues specific to Apple Operating Systems like MacOS and iOSdependency:cmakeIssues related to `dependency` with the `cmake` methodIssues related to `dependency` with the `cmake` methodsubprojects/wraps
Milestone
Description
I'm attempting to compile cURL as a subproject and getting linker errors for the final executable. The issue appears to be the following snippet in the final linker call:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.0.sdk/System/Library/Frameworks/CoreFoundation.framework /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.0.sdk/System/Library/Frameworks/Security.framework
This should instead just be -framework CoreFoundation -framework Security
, and substituting appropriately causes the build to succeed.
This appears to come from the generated meson files. In subprojects/curl/meson.build
:
link_args : ['/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.0.sdk/System/Library/Frameworks/CoreFoundation.framework', '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.0.sdk/System/Library/Frameworks/Security.framework', '/usr/local/lib/libssh2.dylib', '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.0.sdk/usr/lib/libz.tbd'],
The equivalent CMake appears to just be something like:
find_library(COREFOUNDATION_FRAMEWORK "CoreFoundation")
list(APPEND CURL_LIBS "${COREFOUNDATION_FRAMEWORK}")
I assume that macOS frameworks need to be special-cased for this to work.
Meson version: 0.56.0
CMake version: 3.19.0
MacOS version: 11.0.1
How I'm invoking the CMake module: https://github.com/TypesettingTools/ffi-experiments/blob/3b9efd7a8b4e93386e0bcbe84acf33a7a9ef8615/meson.build#L16-L41
Metadata
Metadata
Assignees
Labels
OS:macosIssues specific to Apple Operating Systems like MacOS and iOSIssues specific to Apple Operating Systems like MacOS and iOSdependency:cmakeIssues related to `dependency` with the `cmake` methodIssues related to `dependency` with the `cmake` methodsubprojects/wraps