3
0
mirror of https://github.com/triqs/dft_tools synced 2024-11-18 12:03:50 +01:00

[cmake] In external_project, print dependency location if found in system

This commit is contained in:
Nils Wentzell 2020-05-28 10:56:57 -04:00
parent 610f4a2430
commit 278dc7ef44

View File

@ -34,7 +34,7 @@ function(external_dependency)
if(NOT ARG_BUILD_ALWAYS AND NOT Build_Deps STREQUAL "Always") if(NOT ARG_BUILD_ALWAYS AND NOT Build_Deps STREQUAL "Always")
find_package(${ARGV0} ${ARG_VERSION} QUIET HINTS ${CMAKE_INSTALL_PREFIX}) find_package(${ARGV0} ${ARG_VERSION} QUIET HINTS ${CMAKE_INSTALL_PREFIX})
if(${ARGV0}_FOUND) if(${ARGV0}_FOUND)
message(STATUS "Found dependency ${ARGV0} in system") message(STATUS "Found dependency ${ARGV0} in system ${${ARGV0}_ROOT}")
return() return()
elseif(Build_Deps STREQUAL "Never") elseif(Build_Deps STREQUAL "Never")
message(FATAL_ERROR "Could not find dependency ${ARGV0} in system. Please install the dependency manually or use -DBuild_Deps=IfNotFound during cmake configuration to automatically build all dependencies that are not found.") message(FATAL_ERROR "Could not find dependency ${ARGV0} in system. Please install the dependency manually or use -DBuild_Deps=IfNotFound during cmake configuration to automatically build all dependencies that are not found.")