gentoo/dev-util/cmake/files/cmake-3.4.0_rc1-darwin-bundle.patch
Danny Robson 13a00c171d dev-util/cmake: add 3.15.0-rc1
Copied directly from the Gentoo tree. Disabled patches that don't apply
cleanly without investigating why they did not; Darwin and BLAS may
experience some difficulties.
2019-06-07 09:40:15 +10:00

26 lines
1.0 KiB
Diff

Don't use .so for modules on darwin/macos. Use .bundle instead.
Patch by Heiko Przybyl
Forward-ported from 2.8.10 to 3.4.0-rc1
--- cmake-3.4.0-rc1/Modules/Platform/Darwin.cmake
+++ cmake-3.4.0-rc1/Modules/Platform/Darwin.cmake
@@ -26,7 +26,7 @@
set(CMAKE_SHARED_LIBRARY_PREFIX "lib")
set(CMAKE_SHARED_LIBRARY_SUFFIX ".dylib")
set(CMAKE_SHARED_MODULE_PREFIX "lib")
-set(CMAKE_SHARED_MODULE_SUFFIX ".so")
+set(CMAKE_SHARED_MODULE_SUFFIX ".bundle")
set(CMAKE_MODULE_EXISTS 1)
set(CMAKE_DL_LIBS "")
@@ -53,7 +53,7 @@
set(CMAKE_SHARED_MODULE_CREATE_C_FLAGS "-bundle -Wl,-headerpad_max_install_names")
set(CMAKE_SHARED_MODULE_LOADER_C_FLAG "-Wl,-bundle_loader,")
set(CMAKE_SHARED_MODULE_LOADER_CXX_FLAG "-Wl,-bundle_loader,")
-set(CMAKE_FIND_LIBRARY_SUFFIXES ".tbd" ".dylib" ".so" ".a")
+set(CMAKE_FIND_LIBRARY_SUFFIXES ".tbd" ".dylib" ".bundle" ".a")
# hack: if a new cmake (which uses CMAKE_INSTALL_NAME_TOOL) runs on an old build tree
# (where install_name_tool was hardcoded) and where CMAKE_INSTALL_NAME_TOOL isn't in the cache