ClickHouse/cmake/find_boost.cmake
2016-12-12 07:17:16 +03:00

23 lines
1.0 KiB
CMake

if (${USE_INTERNAL_BOOST_LIBRARY})
set (Boost_PROGRAM_OPTIONS_LIBRARY libboost_program_options_internal.a)
set (Boost_SYSTEM_LIBRARY libboost_system_internal.a)
set (Boost_FILESYSTEM_LIBRARY libboost_filesystem_internal.a)
else ()
set (Boost_USE_STATIC_LIBS ${USE_STATIC_LIBRARIES})
set (BOOST_ROOT "/usr/local")
find_package (Boost 1.62 COMPONENTS program_options system filesystem regex thread)
if (NOT Boost_FOUND)
# Try to find manually.
set (BOOST_HINTS "")
if (USE_STATIC_LIBRARIES)
find_library (Boost_PROGRAM_OPTIONS_LIBRARY libboost_program_options.a HINTS ${BOOST_HINTS})
find_library (Boost_SYSTEM_LIBRARY libboost_system.a HINTS ${BOOST_HINTS})
find_library (Boost_FILESYSTEM_LIBRARY libboost_filesystem.a HINTS ${BOOST_HINTS})
else ()
find_library (Boost_PROGRAM_OPTIONS_LIBRARY boost_program_options HINTS ${BOOST_HINTS})
find_library (Boost_SYSTEM_LIBRARY boost_system HINTS ${BOOST_HINTS})
find_library (Boost_FILESYSTEM_LIBRARY boost_filesystem HINTS ${BOOST_HINTS})
endif ()
endif ()
endif ()