diff options
author | Jordan Rose <jordan_rose@apple.com> | 2019-10-11 01:23:56 +0000 |
---|---|---|
committer | Jordan Rose <jordan_rose@apple.com> | 2019-10-11 01:23:56 +0000 |
commit | 7b5c8792431f547248598321e88c6018c2a2097b (patch) | |
tree | 4bb07d5f40c5954441633a0a81e0d027d2c4b3c5 | |
parent | adb203feda9036d39ffecc21f5a9c463a20ef115 (diff) | |
download | bcm5719-llvm-7b5c8792431f547248598321e88c6018c2a2097b.tar.gz bcm5719-llvm-7b5c8792431f547248598321e88c6018c2a2097b.zip |
Get ClangdXPC.framework building (barely) with CMake's Xcode generator
The output directories for CMake's Xcode project generator are
specific to the configuration, and so looking in
CMAKE_LIBRARY_OUTPUT_DIRECTORY isn't going to work. Fortunately, CMake
already provides generator expressions to find the output of a given
target.
I call this "barely" building because the built framework isn't going
to respect the configuration; that is, I can't have both Debug and
RelWithDebInfo variants of ClangdXPC.framework at the same time like I
can with normal library or executable targets. To do that we'd have to
put the framework in a configuration-specific output directory or use
CMake's native support for frameworks instead.
https://reviews.llvm.org/D68846
llvm-svn: 374494
-rw-r--r-- | clang-tools-extra/clangd/xpc/cmake/modules/CreateClangdXPCFramework.cmake | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clang-tools-extra/clangd/xpc/cmake/modules/CreateClangdXPCFramework.cmake b/clang-tools-extra/clangd/xpc/cmake/modules/CreateClangdXPCFramework.cmake index fad58660df0..46738a204ac 100644 --- a/clang-tools-extra/clangd/xpc/cmake/modules/CreateClangdXPCFramework.cmake +++ b/clang-tools-extra/clangd/xpc/cmake/modules/CreateClangdXPCFramework.cmake @@ -28,7 +28,7 @@ macro(create_clangd_xpc_framework target name) # Copy the framework binary. COMMAND ${CMAKE_COMMAND} -E copy - "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/lib${target}.dylib" + "$<TARGET_FILE:${target}>" "${CLANGD_FRAMEWORK_OUT_LOCATION}/${name}" # Copy the XPC Service PLIST. @@ -38,7 +38,7 @@ macro(create_clangd_xpc_framework target name) # Copy the Clangd binary. COMMAND ${CMAKE_COMMAND} -E copy - "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/clangd" + "$<TARGET_FILE:clangd>" "${CLANGD_XPC_SERVICE_OUT_LOCATION}/MacOS/clangd" COMMAND ${CMAKE_COMMAND} -E create_symlink "A" |