mirror of
https://github.com/triqs/dft_tools
synced 2024-09-16 17:35:31 +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.
|
# to locate the package in the system.
|
||||||
# Skip this step if Build_Deps option is set.
|
# Skip this step if Build_Deps option is set.
|
||||||
# 2. Try to find a directory containing the sources
|
# 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.
|
# build it as a cmake sub-project.
|
||||||
# 3. If GIT_REPO is provided, git clone the sources,
|
# 3. If GIT_REPO is provided, git clone the sources,
|
||||||
# and build them as a cmake sub-project.
|
# 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})
|
if(IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/${ARGV0})
|
||||||
message(STATUS "Found sources for dependency ${ARGV0} at ${CMAKE_CURRENT_SOURCE_DIR}/${ARGV0}")
|
message(STATUS "Found sources for dependency ${ARGV0} at ${CMAKE_CURRENT_SOURCE_DIR}/${ARGV0}")
|
||||||
add_subdirectory(${ARGV0} ${subdir_opts})
|
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)
|
elseif(ARG_GIT_REPO)
|
||||||
set(bin_dir ${CMAKE_CURRENT_BINARY_DIR}/${ARGV0})
|
set(bin_dir ${CMAKE_CURRENT_BINARY_DIR}/${ARGV0})
|
||||||
set(src_dir ${bin_dir}_src)
|
set(src_dir ${bin_dir}_src)
|
||||||
|
Loading…
Reference in New Issue
Block a user