blob: 466d9aaa07cf24dfd943ea7b896589c8d08782ea (
plain) (
tree)
|
|
macro(find lib)
find_package(${lib} REQUIRED ${ARGN})
string(TOUPPER ${lib} LIB)
# ignore case (at least Boost uses mixed-case prefix)
if(DEFINED ${lib}_INCLUDE_DIRS)
set(${LIB}_INCLUDE_DIR ${${lib}_INCLUDE_DIRS})
endif()
if(DEFINED ${lib}_LIBRARIES)
set(${LIB}_LIBRARY ${${lib}_LIBRARIES})
endif()
include_directories(${${LIB}_INCLUDE_DIRS})
endmacro()
macro(require lib)
find(${ARGV})
set(LIBS ${LIBS} ${${LIB}_LIBRARY})
endmacro()
macro(require_test lib)
find(${ARGV})
set(TEST_LIBS ${TEST_LIBS} ${${LIB}_LIBRARY})
endmacro()
|