diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2013-03-29 21:51:40 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2013-03-29 21:51:40 +0000 |
commit | 16e0f19415a37edf2aef8a3d99fd1b18be7762d9 (patch) | |
tree | d10cf29c1307222b4497d31c962b4f5a2e3a8f2c | |
parent | 52b2e7085f09bf7834b41f6e807aff5ac97bd3a5 (diff) |
[cmake] Add clang-headers as a dependency of libclang and if we have to copy them
for the IDE case, also create a symlink inside the libclang.dylib directory.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178372 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Headers/CMakeLists.txt | 7 | ||||
-rw-r--r-- | tools/libclang/CMakeLists.txt | 4 |
2 files changed, 9 insertions, 2 deletions
diff --git a/lib/Headers/CMakeLists.txt b/lib/Headers/CMakeLists.txt index ebc92e784b..5e727a7b2e 100644 --- a/lib/Headers/CMakeLists.txt +++ b/lib/Headers/CMakeLists.txt @@ -95,6 +95,13 @@ endif () add_custom_target(clang-headers ALL DEPENDS ${out_files}) set_target_properties(clang-headers PROPERTIES FOLDER "Misc") +if (other_output_dir) + if(UNIX) + add_custom_command(TARGET clang-headers POST_BUILD + COMMAND ${CMAKE_COMMAND} -E create_symlink "${LLVM_BINARY_DIR}/bin/lib/clang" "${LLVM_BINARY_DIR}/lib/${CMAKE_CFG_INTDIR}/clang") + endif() +endif () + install(FILES ${files} ${output_dir}/arm_neon.h PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ DESTINATION lib${LLVM_LIBDIR_SUFFIX}/clang/${CLANG_VERSION}/include) diff --git a/tools/libclang/CMakeLists.txt b/tools/libclang/CMakeLists.txt index dd4eccf8dc..c5a975b637 100644 --- a/tools/libclang/CMakeLists.txt +++ b/tools/libclang/CMakeLists.txt @@ -74,7 +74,7 @@ if( LLVM_ENABLE_PIC ) set(SHARED_LIBRARY TRUE) add_clang_library(libclang ${SOURCES}) target_link_libraries(libclang ${LIBRARIES}) - add_dependencies(libclang ${GENERATED_HEADERS}) + add_dependencies(libclang ${GENERATED_HEADERS} clang-headers) if(WIN32) set_target_properties(libclang @@ -108,7 +108,7 @@ endif() if( NOT BUILD_SHARED_LIBS AND NOT WIN32 ) add_clang_library(${LIBCLANG_STATIC_TARGET_NAME} STATIC ${SOURCES}) target_link_libraries(${LIBCLANG_STATIC_TARGET_NAME} ${LIBRARIES}) - add_dependencies(${LIBCLANG_STATIC_TARGET_NAME} ${GENERATED_HEADERS}) + add_dependencies(${LIBCLANG_STATIC_TARGET_NAME} ${GENERATED_HEADERS} clang-headers) set_target_properties(${LIBCLANG_STATIC_TARGET_NAME} PROPERTIES |