1
0
Fork 0
mirror of https://github.com/pavel-odintsov/fastnetmon synced 2024-06-01 22:16:27 +02:00

Reworked Boost install process to use b2 install instead of building stage in place. Should reduce Boost archive size significantly

This commit is contained in:
Pavel Odintsov 2023-01-14 18:27:30 +00:00
parent 33d9063d49
commit a62c0b8846
2 changed files with 6 additions and 7 deletions

View File

@ -67,13 +67,13 @@ if (ENABLE_CUSTOM_BOOST_BUILD)
set(Boost_NO_SYSTEM_PATHS ON)
set(BOOST_INCLUDEDIR "${BOOST_INSTALL_PATH}")
set(BOOST_LIBRARYDIR "${BOOST_INSTALL_PATH}/stage/lib/")
set(BOOST_LIBRARYDIR "${BOOST_INSTALL_PATH}/lib/")
SET(Boost_DIR "${BOOST_INSTALL_PATH}/stage/lib/cmake/Boost-1.80.0/")
SET(Boost_DIR "${BOOST_INSTALL_PATH}/lib/cmake/Boost-1.80.0/")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -Wno-deprecated-declarations")
set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_RPATH};${BOOST_INSTALL_PATH}/stage/lib;${ICU_CUSTOM_INSTALL_PATH}/lib;${GCC_INSTALL_PATH}/lib64")
set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_RPATH};${BOOST_INSTALL_PATH}/lib;${ICU_CUSTOM_INSTALL_PATH}/lib;${GCC_INSTALL_PATH}/lib64")
# For custom Boost we need to build libicu library
find_library(ICU_LIBRARY_UC_PATH NAMES icuuc PATHS "${ICU_CUSTOM_INSTALL_PATH}/lib" ${DISABLE_DEFAULT_PATH_SEARCH_VAR})

View File

@ -570,9 +570,8 @@ sub install_boost {
my $boost_install_path = "$library_install_folder/$folder_name";
# TODO: not perfect option actually
# We're going to build directly in install folder
chdir $library_install_folder;
chdir $temp_folder_for_building_project;
my $archive_file_name = "boost_${boost_version_with_underscore}.tar.gz";
print "Install Boost dependencies\n";
@ -634,7 +633,7 @@ sub install_boost {
print "Build Boost\n";
my $build_command = "$ld_library_path_for_make $boost_build_path/bin/b2 -j $boost_build_threads -sICU_PATH=$icu_path linkflags=\"-Wl,-rpath,$icu_path/lib\" --build-dir=$temp_folder_for_building_project/boost_build_temp_directory link=shared --without-test --without-python --without-wave --without-log --without-mpi --without-graph --without-math --without-fiber --without-nowide --without-graph_parallel --without-json --without-type_erasure --without-coroutine";
my $build_command = "$ld_library_path_for_make $boost_build_path/bin/b2 install -j $boost_build_threads -sICU_PATH=$icu_path linkflags=\"-Wl,-rpath,$icu_path/lib\" --build-dir=$temp_folder_for_building_project/boost_build_temp_directory link=shared --without-test --without-python --without-wave --without-log --without-mpi --without-graph --without-math --without-fiber --without-nowide --without-graph_parallel --without-json --without-type_erasure --without-coroutine --prefix=$boost_install_path";
print "Build command: $build_command\n";