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-11 23:10:41 +00:00
|
|
|
|
2015-11-16 11:10:16 +00:00
|
|
|
macro(SETUP_EXTERNAL_PROJECT name version force_build)
|
2015-11-11 23:10:41 +00:00
|
|
|
|
|
|
|
if(NOT ${force_build})
|
|
|
|
|
2015-11-12 12:07:57 +00:00
|
|
|
find_package(${name} ${version} EXACT QUIET)
|
2015-11-11 23:10:41 +00:00
|
|
|
|
|
|
|
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}")
|
2015-11-11 23:10:41 +00:00
|
|
|
include(External-${name})
|
|
|
|
endif()
|
|
|
|
else()
|
2015-11-16 11:10:16 +00:00
|
|
|
message(STATUS "${name} ${version} ${FORCE_BUILD_LIB_MSG}")
|
2015-11-11 23:10:41 +00:00
|
|
|
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()
|