diff --git a/FindBoost.cmake b/FindBoost.cmake index e382dd22d0b1f94acd4bfd6189a50ec05fdcc964..b85d6f0b320b49c7de00c81d768a32f131291494 100644 --- a/FindBoost.cmake +++ b/FindBoost.cmake @@ -45,6 +45,8 @@ find_path( if(NOT BOOST_INCLUDEDIR) message(FATAL_ERROR "Boost include directory was not found! Please, set variable BOOST_INCLUDEDIR to the correct path.") +else() + include_directories("${Boost_INCLUDE_DIRS}") endif() # Create a list of requested Boost libraries with "system" names @@ -76,7 +78,6 @@ endif() # Set Boost_FOUND if(Boost_INCLUDE_DIRS AND Boost_LIBRARY_DIRS) - include_directories("${Boost_INCLUDE_DIRS}") set(Boost_FOUND TRUE) else() message(FATAL_ERROR "Boost library was NOT found!")