diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt index cdfbf554..00c07a80 100644 --- a/python/CMakeLists.txt +++ b/python/CMakeLists.txt @@ -16,7 +16,7 @@ FetchContent_MakeAvailable(dlpack) find_package(Python 3.8 COMPONENTS Interpreter Development.Module REQUIRED) # Find cudnn -include(${CMAKE_SOURCE_DIR}/cmake/cuDNN.cmake) +include(${PROJECT_SOURCE_DIR}/cmake/cuDNN.cmake) option(CUDNN_FRONTEND_FETCH_PYBINDS_IN_CMAKE "Whether cmake build system should fetch pybinds." ON) if(CUDNN_FRONTEND_FETCH_PYBINDS_IN_CMAKE) @@ -81,7 +81,7 @@ set_target_properties( _compiled_module PROPERTIES - LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/cudnn + LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/cudnn ) - file(COPY ${CMAKE_SOURCE_DIR}/python/cudnn DESTINATION ${CMAKE_BINARY_DIR}) + file(COPY ${PROJECT_SOURCE_DIR}/python/cudnn DESTINATION ${PROJECT_BINARY_DIR}) endif() diff --git a/samples/CMakeLists.txt b/samples/CMakeLists.txt index ca7962a3..100c2451 100644 --- a/samples/CMakeLists.txt +++ b/samples/CMakeLists.txt @@ -17,7 +17,7 @@ if(NOT Catch2_FOUND) endif() # Find cudnn -include(${CMAKE_SOURCE_DIR}/cmake/cuDNN.cmake) +include(${PROJECT_SOURCE_DIR}/cmake/cuDNN.cmake) add_executable( samples @@ -107,7 +107,7 @@ set_target_properties( samples PROPERTIES LINK_WHAT_YOU_USE TRUE - RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin + RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin ) set_source_files_properties( diff --git a/test/unit_tests/CMakeLists.txt b/test/unit_tests/CMakeLists.txt index 2c58f437..4d1676d0 100644 --- a/test/unit_tests/CMakeLists.txt +++ b/test/unit_tests/CMakeLists.txt @@ -60,5 +60,5 @@ set_target_properties( unit_tests PROPERTIES LINK_WHAT_YOU_USE TRUE - RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin + RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin )