Skip to content

Commit 3bc6f5b

Browse files
committed
Address Tim's comment
1 parent 0ecdaa7 commit 3bc6f5b

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

xpti/CMakeLists.txt

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,13 +74,18 @@ set(CMAKE_BINARY_DIR ${CMAKE_SOURCE_DIR}/lib/${CMAKE_BUILD_TYPE})
7474
set(EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR})
7575
set(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR})
7676

77+
add_subdirectory(src)
78+
7779
if (LLVM_BINARY_DIR)
78-
file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/include/xpti
79-
DESTINATION ${LLVM_BINARY_DIR}/include)
80+
add_custom_target(xpti-headers ALL
81+
COMMAND ${CMAKE_COMMAND} -E copy_directory
82+
${CMAKE_CURRENT_SOURCE_DIR}/include/xpti
83+
${LLVM_BINARY_DIR}/include/xpti
84+
COMMENT "Copying XPTI headers..."
85+
)
86+
add_dependencies(xpti xpti-headers)
8087
endif()
8188

82-
add_subdirectory(src)
83-
8489
include(GNUInstallDirs)
8590
install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/include/xpti
8691
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}

0 commit comments

Comments
 (0)