From 6c548d517e4a2dcd4d3acd8e8feb1886141f971d Mon Sep 17 00:00:00 2001 From: Antoine Villeret Date: Tue, 13 Nov 2018 11:42:50 +0100 Subject: [PATCH] Replace CHECK_INCLUDE_FILE_CXX() with CMake find_file() the former doesn't work when cross-compiling --- CMakeLists.txt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 950184a..bd60733 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -22,9 +22,8 @@ target_link_libraries(simple-web-server INTERFACE ${CMAKE_THREAD_LIBS_INIT}) # Remove Boost system, thread, regex components; use Boost:: aliases; remove Boost target_include_directories if(USE_STANDALONE_ASIO) target_compile_definitions(simple-web-server INTERFACE USE_STANDALONE_ASIO) - include(CheckIncludeFileCXX) - CHECK_INCLUDE_FILE_CXX(asio.hpp HAVE_ASIO) - if(NOT HAVE_ASIO) + find_file(ASIO_HEADER asio.hpp) + if(NOT ASIO_HEADER) message(FATAL_ERROR "Standalone Asio not found") endif() else()