Skip to content
Snippets Groups Projects
Commit ec2690fa authored by Andreas Schenk's avatar Andreas Schenk
Browse files

moved boost initalization to OST.cmake

Any project dependent on OST will also need to do the boost initialization, therefore moving it to a macro avoids code duplication.
parent f5d2ad65
Branches
Tags
No related merge requests found
......@@ -134,32 +134,8 @@ file(MAKE_DIRECTORY ${STAGE_DIR}
setup_compiler_flags()
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY)
set(_BOOST_MIN_VERSION 1.37)
find_package(Boost ${_BOOST_MIN_VERSION} COMPONENTS python REQUIRED)
set(BOOST_PYTHON_LIBRARIES ${Boost_LIBRARIES})
set(Boost_LIBRARIES)
find_package(Boost ${_BOOST_MIN_VERSION}
COMPONENTS unit_test_framework REQUIRED)
set(BOOST_UNIT_TEST_LIBRARIES ${Boost_LIBRARIES})
set(Boost_LIBRARIES)
if (ENABLE_STATIC)
set(Boost_USE_STATIC_LIBS ON)
endif()
find_package(Boost ${_BOOST_MIN_VERSION}
COMPONENTS filesystem system REQUIRED)
set(BOOST_LIBRARIES ${Boost_LIBRARIES})
set(Boost_LIBRARIES)
find_package(Boost ${_BOOST_MIN_VERSION} COMPONENTS iostreams REQUIRED)
set(BOOST_IOSTREAM_LIBRARIES ${Boost_LIBRARIES})
set(Boost_LIBRARIES)
find_package(Boost ${_BOOST_MIN_VERSION} COMPONENTS program_options REQUIRED)
set(BOOST_PROGRAM_OPTIONS ${Boost_LIBRARIES})
set(Boost_LIBRARIES)
find_package(Boost ${_BOOST_MIN_VERSION} COMPONENTS regex REQUIRED)
set(BOOST_REGEX_LIBRARIES ${Boost_LIBRARIES})
set(Boost_LIBRARIES)
setup_boost()
find_package(Qt4 4.5.0 REQUIRED)
find_package(OpenGL REQUIRED)
......
......@@ -762,3 +762,30 @@ macro(setup_compiler_flags)
endif()
endif()
endmacro()
set(_BOOST_MIN_VERSION 1.37)
macro(setup_boost)
find_package(Boost ${_BOOST_MIN_VERSION} COMPONENTS python REQUIRED)
set(BOOST_PYTHON_LIBRARIES ${Boost_LIBRARIES})
set(Boost_LIBRARIES)
find_package(Boost ${_BOOST_MIN_VERSION}
COMPONENTS unit_test_framework REQUIRED)
set(BOOST_UNIT_TEST_LIBRARIES ${Boost_LIBRARIES})
set(Boost_LIBRARIES)
if (ENABLE_STATIC)
set(Boost_USE_STATIC_LIBS ON)
endif()
find_package(Boost ${_BOOST_MIN_VERSION}
COMPONENTS filesystem system REQUIRED)
set(BOOST_LIBRARIES ${Boost_LIBRARIES})
set(Boost_LIBRARIES)
find_package(Boost ${_BOOST_MIN_VERSION} COMPONENTS iostreams REQUIRED)
set(BOOST_IOSTREAM_LIBRARIES ${Boost_LIBRARIES})
set(Boost_LIBRARIES)
find_package(Boost ${_BOOST_MIN_VERSION} COMPONENTS program_options REQUIRED)
set(BOOST_PROGRAM_OPTIONS ${Boost_LIBRARIES})
set(Boost_LIBRARIES)
find_package(Boost ${_BOOST_MIN_VERSION} COMPONENTS regex REQUIRED)
set(BOOST_REGEX_LIBRARIES ${Boost_LIBRARIES})
set(Boost_LIBRARIES)
endmacro()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment