File tree Expand file tree Collapse file tree 1 file changed +16
-4
lines changed Expand file tree Collapse file tree 1 file changed +16
-4
lines changed Original file line number Diff line number Diff line change @@ -15,8 +15,20 @@ FIND_PATH(ASIO_INCLUDE_DIR
1515
1616SET (ASIO_FOUND "NO" )
1717IF (ASIO_INCLUDE_DIR)
18- FIND_PACKAGE ( Boost 1.37 )
19- IF (Boost_FOUND)
20- SET (ASIO_FOUND "YES" )
21- ENDIF ()
18+
19+ set (ASIO_VERSION_H ${ASIO_INCLUDE_DIR} /asio/version .hpp)
20+ file (STRINGS ${ASIO_VERSION_H} AsioVersionLine REGEX "^#define ASIO_VERSION " )
21+ 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+
2234ENDIF ()
You can’t perform that action at this time.
0 commit comments