Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft: only require boost headers, not boost_system #2768

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions cpp/perspective/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,14 @@ cmake_policy(SET CMP0074 NEW)
# instead of the latest version installed.
cmake_policy(SET CMP0094 NEW)

# https://cmake.org/cmake/help/latest/policy/CMP0167.html
# cmake deprecated their built-in FindBoost module in favor of one provided by Boost.
# The OLD behavior of this policy is for find_package(Boost) to load CMake's FindBoost module.
# The NEW behavior is for find_package(Boost) to search for the upstream BoostConfig.cmake.
if (POLICY CMP0167)
cmake_policy(SET CMP0167 OLD)
endif()

if(NOT DEFINED PSP_CMAKE_MODULE_PATH)
set(PSP_CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../../cmake")
endif()
Expand Down Expand Up @@ -301,7 +309,7 @@ elseif(PSP_CPP_BUILD OR PSP_PYTHON_BUILD)
find_package(Boost REQUIRED)
elseif(NOT WIN32)
set(Boost_USE_STATIC_LIBS ON)
find_package(Boost REQUIRED COMPONENTS system)
find_package(Boost REQUIRED)
endif()

if(WIN32)
Expand Down Expand Up @@ -387,15 +395,15 @@ if(PSP_PYTHON_BUILD AND NOT PSP_PYODIDE)
# Boost must be added after arrow to prevent linking bug on Windows.
if(WIN32)
set(Boost_USE_STATIC_LIBS ON)
find_package(Boost REQUIRED COMPONENTS system)
find_package(Boost REQUIRED)
endif()
if(NOT Boost_FOUND)
message(FATAL_ERROR "${Red}Boost could not be located${ColorReset}")
else()
psp_build_message("${Cyan}Found Boost: `Boost_INCLUDE_DIRS`: ${Boost_INCLUDE_DIRS}, `Boost_LIBRARY_DIRS` - ${Boost_LIBRARY_DIRS} ${ColorReset}")
if(WIN32)
include_directories(SYSTEM ${Boost_INCLUDE_DIRS})
add_definitions(-DBOOST_UUID_FORCE_AUTO_LINK)
# add_definitions(-DBOOST_UUID_FORCE_AUTO_LINK)
endif()
endif()
endif()
Expand Down
2 changes: 1 addition & 1 deletion rust/perspective-server/build/psp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ pub fn cmake_build() -> Result<Option<PathBuf>, std::io::Error> {
dst.define("CMAKE_BUILD_TYPE", profile.as_str());
if std::env::var("PSP_ARCH").as_deref() == Ok("x86_64") {
dst.define("CMAKE_OSX_ARCHITECTURES", "x86_64");
} else if std::env::var("PSP_ARCH").as_deref() == Ok("arm64") {
} else if std::env::var("PSP_ARCH").as_deref() == Ok("aarch64") {
dst.define("CMAKE_OSX_ARCHITECTURES", "arm64");
}

Expand Down
Loading