OpenDroneMap-ODM/SuperBuild/cmake/ExternalProject-Setup.cmake

27 wiersze
761 B
CMake
Czysty Zwykły widok Historia

2015-11-16 11:10:16 +00:00
set(ADD_INTERNAL_LIB_MSG "--- Adding internal version")
set(FORCE_BUILD_LIB_MSG "force build ${ADD_INTERNAL_LIB_MSG}")
2015-11-16 11:10:16 +00:00
macro(SETUP_EXTERNAL_PROJECT name version force_build)
if(NOT ${force_build})
2015-11-12 12:07:57 +00:00
find_package(${name} ${version} EXACT QUIET)
if(${${name}_FOUND})
message(STATUS "${name} ${${name}_VERSION} found")
set(${name}_DIR ${${name}_DIR})
else()
2015-11-16 11:10:16 +00:00
message(STATUS "${name} ${version} not found ${ADD_INTERNAL_LIB_MSG}")
include(External-${name})
endif()
else()
2015-11-16 11:10:16 +00:00
message(STATUS "${name} ${version} ${FORCE_BUILD_LIB_MSG}")
include(External-${name})
endif()
2015-11-13 09:11:23 +00:00
endmacro()
2015-11-12 12:07:57 +00:00
macro(SETUP_EXTERNAL_PROJECT_CUSTOM name)
2015-11-16 11:10:16 +00:00
message(STATUS "${name} ${FORCE_BUILD_LIB_MSG}")
2015-11-12 12:07:57 +00:00
include(External-${name})
endmacro()