[cmake_deps/msvc] Move boost harvest to boost.cmake
authorRay Molenkamp <github@lazydodo.com>
Thu, 21 Sep 2017 17:16:52 +0000 (11:16 -0600)
committerRay Molenkamp <github@lazydodo.com>
Thu, 21 Sep 2017 17:16:52 +0000 (11:16 -0600)
build_files/build_environment/cmake/boost.cmake
build_files/build_environment/cmake/harvest.cmake

index 0b4a490f4b35d167074176f42e4b5c44cb3dc19a..d98df30a38f4f4ddaf6be9c2c3909f5c99deea97 100644 (file)
@@ -49,11 +49,18 @@ if(WIN32)
        #--user-config=user-config.jam
        set(BOOST_BUILD_OPTIONS runtime-link=static )
        #set(BOOST_WITH_PYTHON --with-python)
+       set(BOOST_HARVEST_CMD   ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/boost/lib/ ${HARVEST_TARGET}/boost/lib/ )
+       if(BUILD_MODE STREQUAL Release)
+               set(BOOST_HARVEST_CMD ${BOOST_HARVEST_CMD} && ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/boost/include/boost-1_60/ ${HARVEST_TARGET}/boost/include/)
+       endif()
+
 elseif(APPLE)
        set(BOOST_CONFIGURE_COMMAND ./bootstrap.sh)
        set(BOOST_BUILD_COMMAND ./bjam)
        set(BOOST_BUILD_OPTIONS toolset=clang cxxflags=${PLATFORM_CXXFLAGS} linkflags=${PLATFORM_LDFLAGS} --disable-icu boost.locale.icu=off)
+       set(BOOST_HARVEST_CMD echo .)
 else()
+       set(BOOST_HARVEST_CMD echo .)
        set(BOOST_CONFIGURE_COMMAND ./bootstrap.sh)
        set(BOOST_BUILD_COMMAND ./bjam)
        set(BOOST_BUILD_OPTIONS cxxflags=${PLATFORM_CXXFLAGS} --disable-icu boost.locale.icu=off)
@@ -92,7 +99,7 @@ ExternalProject_Add(external_boost
        CONFIGURE_COMMAND ${BOOST_CONFIGURE_COMMAND}
        BUILD_COMMAND ${BOOST_BUILD_COMMAND} ${BOOST_BUILD_OPTIONS} -j${MAKE_THREADS} architecture=x86 address-model=${BOOST_ADDRESS_MODEL} variant=${BOOST_BUILD_TYPE} link=static threading=multi ${BOOST_OPTIONS}    --prefix=${LIBDIR}/boost install
        BUILD_IN_SOURCE 1
-       INSTALL_COMMAND ""
+       INSTALL_COMMAND "${BOOST_HARVEST_CMD}"
 )
 
 if(WIN32)
index 03c9bb07c0f4fd9fd686f53e4f21f4c215120562..9a88b4a8496044351e83227b753979c4918b8607 100644 (file)
@@ -33,9 +33,6 @@ if(BUILD_MODE STREQUAL Release)
                COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/zlib/lib/zlibstatic.lib ${HARVEST_TARGET}/zlib/lib/libz_st.lib &&
                                ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/zlib/include/ ${HARVEST_TARGET}/zlib/include/ &&
                                ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/zlib/bin/ ${HARVEST_TARGET}/zlib/bin/ &&
-                               # Boost copy lib + rename boost_1_60 to boost
-                               ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/boost/lib/ ${HARVEST_TARGET}/boost/lib/ &&
-                               ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/boost/include/boost-1_60/ ${HARVEST_TARGET}/boost/include/ &&
                                # jpeg rename libfile + copy include
                                ${CMAKE_COMMAND} -E copy ${LIBDIR}/jpg/lib/jpeg-static.lib ${HARVEST_TARGET}/jpeg/lib/libjpeg.lib &&
                                ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/jpg/include/ ${HARVEST_TARGET}/jpeg/include/ &&
@@ -152,8 +149,6 @@ if(BUILD_MODE STREQUAL Debug)
                                ${CMAKE_COMMAND} -E copy ${LIBDIR}/opencollada/lib/opencollada/xml.lib ${HARVEST_TARGET}/opencollada/lib/opencollada/xml_d.lib &&
                                # blosc
                                ${CMAKE_COMMAND} -E copy ${LIBDIR}/blosc/lib/libblosc_d.lib ${HARVEST_TARGET}/blosc/lib/libblosc_d.lib &&
-                               # boost
-                               ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/boost/lib/ ${HARVEST_TARGET}/boost/lib/ &&
                                # llvm
                                ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/llvm/lib/ ${HARVEST_TARGET}/llvm/debug/lib/ &&
                                ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/llvm/bin/ ${HARVEST_TARGET}/llvm/debug/bin/ &&