diff --git a/cmake/bornagain/modules/SearchInstalledSoftware.cmake b/cmake/bornagain/modules/SearchInstalledSoftware.cmake index 24295575035d8aaab37b268f5d836ba5844393bc..2681c7427818dfc4bf0c93a046342f6e4fab411b 100644 --- a/cmake/bornagain/modules/SearchInstalledSoftware.cmake +++ b/cmake/bornagain/modules/SearchInstalledSoftware.cmake @@ -17,16 +17,17 @@ set(Boost_USE_STATIC_LIBS OFF) set(Boost_USE_MULTITHREADED ON) set(Boost_USE_STATIC_RUNTIME OFF) add_definitions(-DBOOST_ALL_DYN_LINK) # line is needed for MSVC -#add_definitions(-DBOOST_LIB_DIAGNOSTIC) # shows during compilation auto-linked libraries -set(boost_libraries_required program_options iostreams regex system filesystem) + +# Boost component libraries (do not list headers here) +set(boost_libraries_required filesystem iostreams program_options) if(WIN32) - set(boost_libraries_required ${boost_libraries_required} zlib bzip2) + # system seems to be indirectly required + list(APPEND boost_libraries_required bzip2 system zlib) endif() - -find_package(Boost 1.48.0 COMPONENTS ${boost_libraries_required} REQUIRED) -# In spite of the "REQUIRED" flag, FindBoost will not terminate if some components are missing. +find_package(Boost 1.65.1 COMPONENTS ${boost_libraries_required} REQUIRED) +# In spite of the "REQUIRED" flag, FindBoost will not terminate if some components are missing if(NOT Boost_FOUND) - message(FATAL_ERROR "Not all required Boost components were found") + message(FATAL_ERROR "Not all required Boost component libraries were found") endif() message(STATUS "Found Boost includes at ${Boost_INCLUDE_DIRS}, libraries at ${Boost_LIBRARY_DIRS}")