mirror of
https://github.com/triqs/dft_tools
synced 2024-06-25 22:52:20 +02:00
[cmake] When searching dependency sources, check both current dir and CMAKE_SOURCE_DIR/deps
This commit is contained in:
parent
81096e417e
commit
dd33a61cc6
3
deps/CMakeLists.txt
vendored
3
deps/CMakeLists.txt
vendored
|
@ -17,7 +17,8 @@ include(external_dependency.cmake)
|
|||
# to locate the package in the system.
|
||||
# Skip this step if Build_Deps option is set.
|
||||
# 2. Try to find a directory containing the sources
|
||||
# at ${PROJECT_SOURCE_DIR}/deps/name. If found
|
||||
# at ${CMAKE_CURRENT_SOURCE_DIR}/name and
|
||||
# ${CMAKE_SOURCE_DIR}/deps/name. If found
|
||||
# build it as a cmake sub-project.
|
||||
# 3. If GIT_REPO is provided, git clone the sources,
|
||||
# and build them as a cmake sub-project.
|
||||
|
|
3
deps/external_dependency.cmake
vendored
3
deps/external_dependency.cmake
vendored
|
@ -51,6 +51,9 @@ function(external_dependency)
|
|||
if(IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/${ARGV0})
|
||||
message(STATUS "Found sources for dependency ${ARGV0} at ${CMAKE_CURRENT_SOURCE_DIR}/${ARGV0}")
|
||||
add_subdirectory(${ARGV0} ${subdir_opts})
|
||||
elseif(IS_DIRECTORY ${CMAKE_SOURCE_DIR}/deps/${ARGV0})
|
||||
message(STATUS "Found sources for dependency ${ARGV0} at ${CMAKE_SOURCE_DIR}/deps/${ARGV0}")
|
||||
add_subdirectory(${ARGV0} ${subdir_opts})
|
||||
elseif(ARG_GIT_REPO)
|
||||
set(bin_dir ${CMAKE_CURRENT_BINARY_DIR}/${ARGV0})
|
||||
set(src_dir ${bin_dir}_src)
|
||||
|
|
Loading…
Reference in New Issue
Block a user