Skip to content

Commit

Permalink
revert to module mode from config mode.
Browse files Browse the repository at this point in the history
The error you're encountering occurs because BoostConfig.cmake is trying to find the boost_headers package, but it cannot locate it. This usually happens when Boost is installed in a way that doesn’t fully support the CMake config mode, or when the BoostConfig.cmake file refers to components that haven't been properly installed or configured.
  • Loading branch information
liudonghua123 committed Oct 21, 2024
1 parent 71ef3fc commit 739483c
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,15 @@ set(CMAKE_POSITION_INDEPENDENT_CODE ON)

# https://cmake.org/cmake/help/latest/policy/CMP0167.html
# https://chatgpt.com/c/6715b494-6884-8005-9a9b-870e72427fe4
# cmake_policy(SET CMP0167 OLD)
# Need to update the boost version according to https://community.chocolatey.org/packages/boost-msvc-14.3#versionhistory
# set(BOOST_ROOT C:/local/boost_1_86_0)
find_package(Boost CONFIG)
cmake_policy(SET CMP0167 OLD)
# Platform-specific setting for Boost on Windows
if(WIN32)
# Need to update the boost version according to https://community.chocolatey.org/packages/boost-msvc-14.3#versionhistory
set(BOOST_ROOT C:/local/boost_1_86_0)
# set(Boost_DIR C:/local/boost_1_86_0/tools/boost_install)
endif()
# find_package(Boost CONFIG REQUIRED)
find_package(Boost REQUIRED COMPONENTS)

file(GLOB_RECURSE ciphey_core_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/src/*.cpp)
add_library(ciphey_core ${ciphey_core_SOURCES})
Expand Down

0 comments on commit 739483c

Please sign in to comment.