Files
cmake/Tests/RunCMake/ExportPackageInfo/LinkDependentLibraries.cmake
Matthew Woehlke 92a0abd164 CPS: Support exporting "link dependent libraries".
Teach CPS export to fill the `dyld_requires` attribute based on the
equivalent of the `IMPORTED_LINK_DEPENDENT_LIBRARIES` CMake property.
(Note that, in practice, I don't believe this can ever contain
non-targets, and CPS does not anyway support the `dyld_libraries`
attribute that those would require at this time.

Issue: #27501
2026-02-09 16:59:46 -05:00

17 lines
461 B
CMake

project(dyld CXX)
get_property(_isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
if(_isMultiConfig)
set(CMAKE_CONFIGURATION_TYPES "generic" CACHE STRING "" FORCE)
else()
set(CMAKE_BUILD_TYPE "generic" CACHE STRING "" FORCE)
endif()
add_library(private SHARED foo.cxx)
add_library(public SHARED foo.cxx)
target_link_libraries(public PRIVATE private)
install(TARGETS private public EXPORT dyld DESTINATION .)
export(PACKAGE_INFO dyld EXPORT dyld)