linamh/dev-util/cmake/files/cmake-2.6.3-darwin-bundle.patch

24 lines
952 B
Diff
Raw Normal View History

Don't use .so for modules on darwin/macos. Use .bundle instead.
Patch by Heiko Przybyl
--- Modules/Platform/Darwin.cmake
+++ Modules/Platform/Darwin.cmake
@@ -23,7 +23,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 "")
@@ -45,7 +45,7 @@
SET(CMAKE_SHARED_MODULE_CREATE_C_FLAGS "-bundle -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 ".dylib" ".so" ".a")
+SET(CMAKE_FIND_LIBRARY_SUFFIXES ".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