We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent aee5267 commit 21f5a0aCopy full SHA for 21f5a0a
CMakeModules/FindAsio.cmake
@@ -15,8 +15,20 @@ FIND_PATH(ASIO_INCLUDE_DIR
15
16
SET(ASIO_FOUND "NO")
17
IF(ASIO_INCLUDE_DIR)
18
- FIND_PACKAGE( Boost 1.37 )
19
- IF(Boost_FOUND)
20
- SET(ASIO_FOUND "YES")
21
- ENDIF()
+
+ 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}")
22
+ list(GET AsioHeaderVersionMatches 0 AsioHeaderVersion)
23
24
+ # check version is less than 1.14.0 otherwise API changes break build
25
+ if (${AsioHeaderVersion} LESS "101400")
26
+ FIND_PACKAGE( Boost 1.37 )
27
+ IF(Boost_FOUND)
28
+ SET(ASIO_FOUND "YES")
29
+ ENDIF()
30
+ else()
31
+ message("ASIO not compatible")
32
+ endif()
33
34
ENDIF()
0 commit comments