r188759 - [autotools->cmake] Added support for creating the clang driver plist for OS X.

Michael Gottesman mgottesman at apple.com
Tue Aug 20 00:09:51 PDT 2013


Author: mgottesman
Date: Tue Aug 20 02:09:51 2013
New Revision: 188759

URL: http://llvm.org/viewvc/llvm-project?rev=188759&view=rev
Log:
[autotools->cmake] Added support for creating the clang driver plist for OS X.

Modified:
    cfe/trunk/tools/driver/CMakeLists.txt

Modified: cfe/trunk/tools/driver/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/driver/CMakeLists.txt?rev=188759&r1=188758&r2=188759&view=diff
==============================================================================
--- cfe/trunk/tools/driver/CMakeLists.txt (original)
+++ cfe/trunk/tools/driver/CMakeLists.txt Tue Aug 20 02:09:51 2013
@@ -89,3 +89,30 @@ install(TARGETS clang
 
 # Create the clang++ and clang-cl symlinks at installation time.
 install(SCRIPT clang_symlink.cmake -DCMAKE_INSTALL_PREFIX=\"${CMAKE_INSTALL_PREFIX}\")
+
+# Configure plist creation for OS X.
+set (TOOL_INFO_PLIST "Info.plist" CACHE STRING "Plist name")
+if (APPLE)  
+  if (CLANG_VENDOR)
+    set(TOOL_INFO_NAME "${CLANG_VENDOR} clang")
+  else()
+    set(TOOL_INFO_NAME "clang")
+  endif()
+
+  set(TOOL_INFO_UTI "${CLANG_VENDOR_UTI}")
+  set(TOOL_INFO_VERSION "${CLANG_VERSION}")
+  if (LLVM_SUBMIT_VERSION)
+    set(TOOL_INFO_BUILD_VERSION
+      "${LLVM_SUBMIT_VERSION}.${LLVM_SUBMIT_SUBVERSION}")
+  endif()
+  
+  set(TOOL_INFO_PLIST_OUT "${CMAKE_CURRENT_BINARY_DIR}/${TOOL_INFO_PLIST}")
+  target_link_libraries(clang
+    "-Wl,-sectcreate,__TEXT,__info_plist,${TOOL_INFO_PLIST_OUT}")
+  configure_file("${TOOL_INFO_PLIST}.in" "${TOOL_INFO_PLIST_OUT}" @ONLY)
+  
+  set(TOOL_INFO_UTI)
+  set(TOOL_INFO_NAME)
+  set(TOOL_INFO_VERSION)
+  set(TOOL_INFO_BUILD_VERSION)
+endif()





More information about the cfe-commits mailing list