Author: jrose Date: Thu Oct 10 18:23:56 2019 New Revision: 374494 URL: http://llvm.org/viewvc/llvm-project?rev=374494&view=rev Log: 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 Modified: clang-tools-extra/trunk/clangd/xpc/cmake/modules/CreateClangdXPCFramework.cmake Modified: clang-tools-extra/trunk/clangd/xpc/cmake/modules/CreateClangdXPCFramework.cmake URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clangd/xpc/cmake/modules/CreateClangdXPCFramework.cmake?rev=374494&r1=374493&r2=374494&view=diff ============================================================================== --- clang-tools-extra/trunk/clangd/xpc/cmake/modules/CreateClangdXPCFramework.cmake (original) +++ clang-tools-extra/trunk/clangd/xpc/cmake/modules/CreateClangdXPCFramework.cmake Thu Oct 10 18:23:56 2019 @@ -28,7 +28,7 @@ macro(create_clangd_xpc_framework target # 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 # 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" _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits