|
6 | 6 | ) |
7 | 7 |
|
8 | 8 | # Load our CMake modules to search for DPCPP and Level Zero |
9 | | -set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/modules/") |
| 9 | +set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules/") |
10 | 10 | find_package(Git REQUIRED) |
11 | 11 |
|
12 | 12 | option(DPCTL_DPCPP_HOME_DIR |
@@ -69,8 +69,8 @@ if(DPCTL_ENABLE_LO_PROGRAM_CREATION) |
69 | 69 | endif() |
70 | 70 |
|
71 | 71 | configure_file( |
72 | | - ${CMAKE_SOURCE_DIR}/include/Config/dpctl_config.h.in |
73 | | - ${CMAKE_SOURCE_DIR}/include/Config/dpctl_config.h |
| 72 | + ${CMAKE_CURRENT_SOURCE_DIR}/include/Config/dpctl_config.h.in |
| 73 | + ${CMAKE_CURRENT_SOURCE_DIR}/include/Config/dpctl_config.h |
74 | 74 | ) |
75 | 75 |
|
76 | 76 | # Set the C++ standard to C++17 |
@@ -158,8 +158,8 @@ add_library(DPCTLSyclInterface |
158 | 158 |
|
159 | 159 | target_include_directories(DPCTLSyclInterface |
160 | 160 | PRIVATE |
161 | | - ${CMAKE_SOURCE_DIR}/include/ |
162 | | - ${CMAKE_SOURCE_DIR}/helper/include/ |
| 161 | + ${CMAKE_CURRENT_SOURCE_DIR}/include/ |
| 162 | + ${CMAKE_CURRENT_SOURCE_DIR}/helper/include/ |
163 | 163 | ${IntelSycl_SYCL_INCLUDE_DIR} |
164 | 164 | ) |
165 | 165 |
|
@@ -193,19 +193,19 @@ install(TARGETS |
193 | 193 | ) |
194 | 194 |
|
195 | 195 | # Install all headers |
196 | | -file(GLOB HEADERS "${CMAKE_SOURCE_DIR}/include/*.h") |
| 196 | +file(GLOB HEADERS "${CMAKE_CURRENT_SOURCE_DIR}/include/*.h") |
197 | 197 | foreach(HEADER ${HEADERS}) |
198 | 198 | install(FILES "${HEADER}" DESTINATION include) |
199 | 199 | endforeach() |
200 | 200 |
|
201 | 201 | # Install all headers in include/Support |
202 | | -file(GLOB HEADERS "${CMAKE_SOURCE_DIR}/include/Support/*.h") |
| 202 | +file(GLOB HEADERS "${CMAKE_CURRENT_SOURCE_DIR}/include/Support/*.h") |
203 | 203 | foreach(HEADER ${HEADERS}) |
204 | 204 | install(FILES "${HEADER}" DESTINATION include/Support) |
205 | 205 | endforeach() |
206 | 206 |
|
207 | 207 | # Install all headers in include/Config |
208 | | -file(GLOB HEADERS "${CMAKE_SOURCE_DIR}/include/Config/*.h") |
| 208 | +file(GLOB HEADERS "${CMAKE_CURRENT_SOURCE_DIR}/include/Config/*.h") |
209 | 209 | foreach(HEADER ${HEADERS}) |
210 | 210 | install(FILES "${HEADER}" DESTINATION include/Config) |
211 | 211 | endforeach() |
|
0 commit comments