2012-10-30 20:31:27 +08:00
|
|
|
# Locate ASIO-headers (http://think-async.com/Asio)
|
|
|
|
# This module defines
|
2015-08-11 16:43:40 +08:00
|
|
|
# ASIO_FOUND, if false, do not try to link to gdal
|
2012-10-30 20:31:27 +08:00
|
|
|
# ASIO_INCLUDE_DIR, where to find the headers
|
|
|
|
#
|
2015-08-11 16:43:40 +08:00
|
|
|
# Created by Stephan Maximilian Huber
|
2012-10-30 20:31:27 +08:00
|
|
|
|
|
|
|
FIND_PATH(ASIO_INCLUDE_DIR
|
|
|
|
NAMES
|
|
|
|
asio.hpp
|
|
|
|
PATHS
|
|
|
|
/usr/include
|
|
|
|
/usr/local/include
|
|
|
|
)
|
|
|
|
|
|
|
|
SET(ASIO_FOUND "NO")
|
2015-08-11 16:43:40 +08:00
|
|
|
IF(ASIO_INCLUDE_DIR)
|
2021-12-08 22:27:23 +08:00
|
|
|
|
|
|
|
set(ASIO_VERSION_H ${ASIO_INCLUDE_DIR}/asio/version.hpp)
|
|
|
|
file(STRINGS ${ASIO_VERSION_H} AsioVersionLine REGEX "^#define ASIO_VERSION ")
|
|
|
|
string(REGEX MATCHALL "[0-9]+" AsioHeaderVersionMatches "${AsioVersionLine}")
|
|
|
|
list(GET AsioHeaderVersionMatches 0 AsioHeaderVersion)
|
|
|
|
|
|
|
|
# check version is less than 1.14.0 otherwise API changes break build
|
|
|
|
if (${AsioHeaderVersion} LESS "101400")
|
|
|
|
FIND_PACKAGE( Boost 1.37 )
|
|
|
|
IF(Boost_FOUND)
|
|
|
|
SET(ASIO_FOUND "YES")
|
|
|
|
ENDIF()
|
|
|
|
else()
|
|
|
|
message("ASIO not compatible")
|
|
|
|
endif()
|
|
|
|
|
2012-10-30 20:31:27 +08:00
|
|
|
ENDIF()
|