diff options
author | Kyle Edwards <kyle.edwards@kitware.com> | 2023-11-06 17:40:13 (GMT) |
---|---|---|
committer | Kyle Edwards <kyle.edwards@kitware.com> | 2023-11-06 22:40:00 (GMT) |
commit | 7d1924613858ec15d7d628306ea0e3156a1a6ddd (patch) | |
tree | a7a88f607d5275e973e3d9d31a306c61a0d7af4f /Tests/RunCMake/XcFramework | |
parent | 1e7489e3acac6aace240a62e4c38eefcf306a9e4 (diff) | |
download | CMake-7d1924613858ec15d7d628306ea0e3156a1a6ddd.zip CMake-7d1924613858ec15d7d628306ea0e3156a1a6ddd.tar.gz CMake-7d1924613858ec15d7d628306ea0e3156a1a6ddd.tar.bz2 |
Xcode: Fix linking against .xcframework from static libraries
Issue: #21752
Diffstat (limited to 'Tests/RunCMake/XcFramework')
3 files changed, 12 insertions, 0 deletions
diff --git a/Tests/RunCMake/XcFramework/create-executable-target.cmake b/Tests/RunCMake/XcFramework/create-executable-target.cmake index 0cc356c..1bc091f 100644 --- a/Tests/RunCMake/XcFramework/create-executable-target.cmake +++ b/Tests/RunCMake/XcFramework/create-executable-target.cmake @@ -19,3 +19,6 @@ set_property(TARGET mylib PROPERTY IMPORTED_LOCATION ${MYLIB_LIBRARY}) add_executable(myexe myexe/myexe.c) target_link_libraries(myexe PRIVATE mylib) + +add_library(myconsuminglib STATIC myconsuminglib/myconsuminglib.c) +target_link_libraries(myconsuminglib PRIVATE mylib) diff --git a/Tests/RunCMake/XcFramework/create-executable.cmake b/Tests/RunCMake/XcFramework/create-executable.cmake index 6706b9f..eaad890 100644 --- a/Tests/RunCMake/XcFramework/create-executable.cmake +++ b/Tests/RunCMake/XcFramework/create-executable.cmake @@ -16,3 +16,6 @@ endif() add_executable(myexe myexe/myexe.c) target_link_libraries(myexe PRIVATE ${MYLIB_LIBRARY}) + +add_library(myconsuminglib STATIC myconsuminglib/myconsuminglib.c) +target_link_libraries(myconsuminglib PRIVATE ${MYLIB_LIBRARY}) diff --git a/Tests/RunCMake/XcFramework/myconsuminglib/myconsuminglib.c b/Tests/RunCMake/XcFramework/myconsuminglib/myconsuminglib.c new file mode 100644 index 0000000..83c0789 --- /dev/null +++ b/Tests/RunCMake/XcFramework/myconsuminglib/myconsuminglib.c @@ -0,0 +1,6 @@ +#include <mylib/mylib.h> + +void myconsuminglib(void) +{ + mylib(); +} |