mutriz

git clone git://archive.git.mtrnord.blog/Nordgedanken/mutriz.git
Log | Files | Refs

Boost.cmake (1214B)


      1 include(ExternalProject)
      2 
      3 #
      4 # Download & install Boost from source.
      5 #
      6 
      7 set(THIRD_PARTY_ROOT ${CMAKE_SOURCE_DIR}/.third-party/mtxclient/.third-party)
      8 set(BUNDLED_BOOST_ROOT ${THIRD_PARTY_ROOT}/boost_1_66_0)
      9 
     10 ExternalProject_Add(
     11   Boost
     12 
     13   URL https://dl.bintray.com/boostorg/release/1.66.0/source/boost_1_66_0.zip
     14   URL_HASH SHA256=e1c55ebb00886c1a96528e4024be98a38b815115f62ecfe878fcf587ba715aad
     15   DOWNLOAD_DIR ${THIRD_PARTY_ROOT}/downloads
     16   DOWNLOAD_NO_PROGRESS 0
     17 
     18   BUILD_IN_SOURCE 1
     19   SOURCE_DIR ${BUNDLED_BOOST_ROOT}
     20   CONFIGURE_COMMAND ${BUNDLED_BOOST_ROOT}/bootstrap.sh
     21     --with-libraries=random,thread,system,iostreams
     22     --prefix=${BUNDLED_BOOST_ROOT}/build
     23   BUILD_COMMAND ${BUNDLED_BOOST_ROOT}/b2 -d0 --layout=system --abbreviate-paths toolset=msvc variant=release link=static threading=multi
     24   INSTALL_COMMAND ${BUNDLED_BOOST_ROOT}/b2 -d0 install
     25 )
     26 
     27 set(Boost_INCLUDE_DIRS ${BUNDLED_BOOST_ROOT}/build)
     28 if(MSVC)
     29     set(Boost_LIBRARIES libboost_random libboost_system libboost_thread libboost_iostreams)
     30 else()
     31     set(Boost_LIBRARIES boost_random boost_system boost_thread boost_iostreams)
     32 endif()
     33 include_directories(SYSTEM ${Boost_INCLUDE_DIRS})
     34 link_directories(${Boost_INCLUDE_DIRS}/stage/lib)