Skip to content

[macOS] Some ports reference hardcoded library paths #16259

@davidebeatrici

Description

@davidebeatrici

After relocating a vcpkg build environment to another machine, I encountered the following error when building my application:

ninja: error: '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/CoreFoundation.framework', needed by 'murmurd', missing and no known rule to make it

Searching for /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk in the environment's directory yields the following results:

In installed/x64-osx/share/absl/abslTargets.cmake:

set_target_properties(absl::time_zone PROPERTIES
  INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include"
  INTERFACE_LINK_LIBRARIES "\$<\$<PLATFORM_ID:Darwin>:/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/CoreFoundation.framework>"
)

In installed/x64-osx/share/unofficial-angle/unofficial-angle-config.cmake:

set_target_properties(unofficial::angle::angle_gpu_info_util PROPERTIES
  INTERFACE_LINK_LIBRARIES "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/IOKit.framework;/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/CoreFoundation.framework;/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/CoreGraphics.framework;\$<LINK_ONLY:unofficial::angle::angle_common>"
)

The correct content is as follows:

set_target_properties(absl::time_zone PROPERTIES
  INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include"
  INTERFACE_LINK_LIBRARIES "\$<\$<PLATFORM_ID:Darwin>:-framework CoreFoundation>"
)
set_target_properties(unofficial::angle::angle_gpu_info_util PROPERTIES
  INTERFACE_LINK_LIBRARIES "-framework IOKit;-framework CoreFoundation;-framework CoreGraphics;\$<LINK_ONLY:unofficial::angle::angle_common>"
)

Metadata

Metadata

Assignees

Labels

category:tool-updateThe issue is with build tool or build script, which requires update or should be executed correctly

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions