macro(mapnik_print_version) string(TOUPPER ${ARGV0} m_package_name_upc) set(m_package_name ${ARGV0}) if(${m_package_name}_VERSION_STRING) message(STATUS "Using ${m_package_name} version: ${${m_package_name}_VERSION_STRING}") elseif(${m_package_name}_VERSION) message(STATUS "Using ${m_package_name} version: ${${m_package_name}_VERSION}") elseif(${m_package_name_upc}_VERSION_STRING) message(STATUS "Using ${m_package_name} version: ${${m_package_name_upc}_VERSION_STRING}") elseif(${m_package_name_upc}_VERSION) message(STATUS "Using ${m_package_name} version: ${${m_package_name_upc}_VERSION}") else() message(STATUS "Using ${m_package_name}") endif() endmacro() macro(mapnik_find_package) find_package(${ARGN}) 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() endmacro() 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()