浏览代码

Merge pull request #226 from i8degrees/feature-upstream/cmake-policy

Toggle CMake policy CMP0042 on by default
David Wimsey 11 年之前
父节点
当前提交
b7de27a202
共有 1 个文件被更改,包括 12 次插入0 次删除
  1. 12 0
      Build/CMakeLists.txt

+ 12 - 0
Build/CMakeLists.txt

@@ -37,6 +37,18 @@ if(COMMAND cmake_policy)
   cmake_policy(SET CMP0015 NEW)
 endif(COMMAND cmake_policy)
 
+# Enable the use of MACOSX_RPATH by default for CMake v3.0+; this effectively 
+# allows plug 'n' play functionality, so to speak -- the resulting shared 
+# library files can simply be copied over into the end-user's application 
+# bundle or framework bundle. No mucking around with install_name_tool.
+#
+# 	See also: 
+# cmake --help-policy cmp0042
+# http://www.kitware.com/blog/home/post/510
+if(POLICY CMP0042)
+  cmake_policy(SET CMP0042 NEW)
+endif(POLICY CMP0042)
+
 project(libRocket C CXX)
 
 # paths