Skip to content

Commit

Permalink
[legacy] boost: Fix python and icu config
Browse files Browse the repository at this point in the history
  • Loading branch information
dennisklein committed Feb 8, 2021
1 parent 090f8ed commit 0a99a74
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
13 changes: 13 additions & 0 deletions FairSoftConfig.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,16 @@ if(APPLE)
set(PYTHON_EXECUTABLE "${python_prefix}/bin/python3" CACHE FILEPATH "Python executable" FORCE)
endif()
# set(PYTHON_EXECUTABLE "/some/other/path/to/python" CACHE FILEPATH "Python executable" FORCE)

#
# ICU
#
# On macOS we assume you have used <source-dir>/legacy/setup-macos.sh which
# installs ICU via Homebrew. That the Homebrew-based ICU is chosen over the
# native macOS ICU we have to hint its location:
#
if(APPLE)
execute_process(COMMAND brew --prefix icu4c OUTPUT_VARIABLE icu_prefix)
string(STRIP "${icu_prefix}" icu_prefix)
set(ICU_ROOT "${icu_prefix}" CACHE FILEPATH "ICU prefix" FORCE)
endif()
7 changes: 7 additions & 0 deletions cmake/legacy.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,14 @@ if(APPLE)
)
endif()
unset(python)
if(ICU_ROOT)
set(icu "-DICU_ROOT=${ICU_ROOT}")
set(boost_icu_config "--with-icu=${ICU_ROOT}")
endif()
if(PYTHON_EXECUTABLE)
set(python "-DPYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}")
get_filename_component(PYTHON_EXECUTABLE_FILE "${PYTHON_EXECUTABLE}" NAME)
set(boost_python_config "--with-python=${PYTHON_EXECUTABLE_FILE}")
endif()
set(LOG_TO_FILE
LOG_DIR "${CMAKE_BINARY_DIR}/Log"
Expand Down Expand Up @@ -95,6 +101,7 @@ ExternalProject_Add(boost
BUILD_IN_SOURCE ON
CONFIGURE_COMMAND "./bootstrap.sh"
"--prefix=${CMAKE_INSTALL_PREFIX}"
${boost_python_config} ${boost_icu_config}
PATCH_COMMAND ${patch} -p2 -i "${CMAKE_SOURCE_DIR}/legacy/boost/1.72_boost_process.patch"
BUILD_COMMAND "./b2" "--layout=system"
"cxxstd=${CMAKE_CXX_STANDARD}"
Expand Down

0 comments on commit 0a99a74

Please sign in to comment.