diff options
author | Marc Chevrier <marc.chevrier@gmail.com> | 2023-02-01 16:58:30 (GMT) |
---|---|---|
committer | Marc Chevrier <marc.chevrier@gmail.com> | 2023-03-01 11:23:28 (GMT) |
commit | ede33f30cfef9e03ecccdb9ce4c7fdf1e8208d75 (patch) | |
tree | 338052612b36c9394f6f0ad71bab57109cf60957 /Modules/Platform | |
parent | fcbd723a5085c11c57ec966f8aea605a55d0bdd5 (diff) | |
download | CMake-ede33f30cfef9e03ecccdb9ce4c7fdf1e8208d75.zip CMake-ede33f30cfef9e03ecccdb9ce4c7fdf1e8208d75.tar.gz CMake-ede33f30cfef9e03ecccdb9ce4c7fdf1e8208d75.tar.bz2 |
Apple: Handle generation and comsuption of text-based stubs (.tbd files)
Fixes: #24123
Diffstat (limited to 'Modules/Platform')
-rw-r--r-- | Modules/Platform/Darwin.cmake | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Modules/Platform/Darwin.cmake b/Modules/Platform/Darwin.cmake index ac2478b..a6c86f1 100644 --- a/Modules/Platform/Darwin.cmake +++ b/Modules/Platform/Darwin.cmake @@ -45,6 +45,8 @@ set(CMAKE_SHARED_LIBRARY_SUFFIX ".dylib") set(CMAKE_EXTRA_SHARED_LIBRARY_SUFFIXES ".tbd" ".so") set(CMAKE_SHARED_MODULE_PREFIX "lib") set(CMAKE_SHARED_MODULE_SUFFIX ".so") +set(CMAKE_APPLE_IMPORT_FILE_PREFIX "lib") +set(CMAKE_APPLE_IMPORT_FILE_SUFFIX ".tbd") set(CMAKE_MODULE_EXISTS 1) set(CMAKE_DL_LIBS "") if(NOT "${_CURRENT_OSX_VERSION}" VERSION_LESS "10.5") @@ -108,6 +110,9 @@ foreach(lang C CXX Fortran OBJC OBJCXX) set(CMAKE_${lang}_FRAMEWORK_SEARCH_FLAG -F) endforeach() +# To generate text-based stubs +set(CMAKE_CREATE_TEXT_STUBS "<CMAKE_TAPI> stubify -isysroot <CMAKE_OSX_SYSROOT> -o <TARGET_IMPLIB> <TARGET>") + # Defines LINK_LIBRARY features for frameworks set(CMAKE_LINK_LIBRARY_USING_FRAMEWORK "LINKER:-framework,<LIBRARY>") set(CMAKE_LINK_LIBRARY_USING_FRAMEWORK_SUPPORTED TRUE) |