2021-03-25 20:28:41 +00:00
|
|
|
macro(mapnik_print_version)
|
|
|
|
string(TOUPPER ${ARGV0} TLNUP)
|
|
|
|
set(TLN ${ARGV0})
|
|
|
|
if(${TLN}_VERSION_STRING)
|
|
|
|
message(STATUS "Using ${ARGV0} version: ${${TLN}_VERSION_STRING}")
|
|
|
|
elseif(${TLN}_VERSION)
|
|
|
|
message(STATUS "Using ${ARGV0} version: ${${TLN}_VERSION}")
|
|
|
|
elseif(${TLNUP}_VERSION_STRING)
|
|
|
|
message(STATUS "Using ${ARGV0} version: ${${TLNUP}_VERSION_STRING}")
|
|
|
|
elseif(${TLNUP}_VERSION)
|
|
|
|
message(STATUS "Using ${ARGV0} version: ${${TLNUP}_VERSION}")
|
|
|
|
else()
|
|
|
|
message(STATUS "Using ${ARGV0}")
|
|
|
|
endif()
|
|
|
|
endmacro()
|
|
|
|
|
2021-03-17 21:18:21 +00:00
|
|
|
macro(mapnik_find_package)
|
|
|
|
find_package(${ARGN})
|
2021-07-21 18:08:22 +00:00
|
|
|
if(${ARGV0}_FOUND)
|
|
|
|
set(MAPNIK_TMP_DEP ${ARGN})
|
|
|
|
list(JOIN MAPNIK_TMP_DEP " " MAPNIK_TMP_DEP)
|
|
|
|
list(APPEND MAPNIK_DEPENDENCIES "find_dependency(${MAPNIK_TMP_DEP})")
|
|
|
|
mapnik_print_version(${ARGV0})
|
|
|
|
else()
|
|
|
|
message(STATUS "not found: ${ARGV0}")
|
|
|
|
endif()
|
2021-03-17 21:18:21 +00:00
|
|
|
endmacro()
|
2021-03-26 14:45:15 +00:00
|
|
|
|
|
|
|
macro(mapnik_find_threads)
|
|
|
|
find_package(Threads REQUIRED)
|
|
|
|
if(CMAKE_THREAD_LIBS_INIT)
|
|
|
|
message(STATUS "Using Threads (system libraries)")
|
|
|
|
elseif(CMAKE_USE_WIN32_THREADS_INIT)
|
|
|
|
message(STATUS "Using Threads (win32 threads)")
|
|
|
|
elseif(CMAKE_USE_PTHREADS_INIT)
|
|
|
|
message(STATUS "Using Threads (pthread)")
|
|
|
|
elseif(CMAKE_HP_PTHREADS_INIT)
|
|
|
|
message(STATUS "Using Threads (HP thread)")
|
|
|
|
else()
|
|
|
|
message(STATUS "Using Threads (unknown backend)")
|
|
|
|
endif()
|
|
|
|
endmacro()
|