浏览代码

BUG: Fix OS X dylib version flags for more linkers

Some OS X linkers want a 'dylib_' prefix on the -compatiblity_version
and -current_version flags while others do not.  This passes the flags
through gcc instead since it never wants the prefix and translates the
flags for the linker correctly.
Brad King 17 年之前
父节点
当前提交
7ca59f1724
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      Modules/Platform/Darwin.cmake

+ 2 - 2
Modules/Platform/Darwin.cmake

@@ -27,8 +27,8 @@ SET(CMAKE_SHARED_MODULE_SUFFIX ".so")
 SET(CMAKE_MODULE_EXISTS 1)
 SET(CMAKE_MODULE_EXISTS 1)
 SET(CMAKE_DL_LIBS "")
 SET(CMAKE_DL_LIBS "")
 
 
-SET(CMAKE_C_OSX_COMPATIBILITY_VERSION_FLAG -Wl,-compatibility_version,)
-SET(CMAKE_C_OSX_CURRENT_VERSION_FLAG -Wl,-current_version,)
+SET(CMAKE_C_OSX_COMPATIBILITY_VERSION_FLAG "-compatibility_version ")
+SET(CMAKE_C_OSX_CURRENT_VERSION_FLAG "-current_version ")
 SET(CMAKE_CXX_OSX_COMPATIBILITY_VERSION_FLAG "${CMAKE_C_OSX_COMPATIBILITY_VERSION_FLAG}")
 SET(CMAKE_CXX_OSX_COMPATIBILITY_VERSION_FLAG "${CMAKE_C_OSX_COMPATIBILITY_VERSION_FLAG}")
 SET(CMAKE_CXX_OSX_CURRENT_VERSION_FLAG "${CMAKE_C_OSX_CURRENT_VERSION_FLAG}")
 SET(CMAKE_CXX_OSX_CURRENT_VERSION_FLAG "${CMAKE_C_OSX_CURRENT_VERSION_FLAG}")