From f07858a4d795333bfa9e57bcf92d460b25a4973c Mon Sep 17 00:00:00 2001 From: BenCat07 Date: Thu, 8 Jun 2023 16:56:56 +0200 Subject: [PATCH] Fix these rogue Boost issues --- .gitmodules | 3 ++- CMakeLists.txt | 13 +++++-------- external/boost-cmake | 2 +- 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/.gitmodules b/.gitmodules index 12913b02..872735f9 100644 --- a/.gitmodules +++ b/.gitmodules @@ -24,4 +24,5 @@ url = https://github.com/nullworks/libnullnexus [submodule "external/boost-cmake"] path = external/boost-cmake - url = https://github.com/STEVE4git/boost-cmake.git \ No newline at end of file + url = https://github.com/STEVE4git/boost-cmake + branch = master diff --git a/CMakeLists.txt b/CMakeLists.txt index f0789891..b4860917 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -100,14 +100,11 @@ endif() find_package(Git REQUIRED) set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/external") find_package(SDL2 REQUIRED) -find_package(Boost 1.76.0 EXACT) -if (NOT ${Boost_FOUND}) - set(BOOST_LIBS_OPTIONAL "" CACHE STRING "Boost libs to be compiled") - add_subdirectory(external/boost-cmake) - SET (BOOST_ROOT ${CMAKE_BINARY_DIR}/_deps/boost-src) - find_package(Boost 1.76.5 EXACT) - include_directories(${Boost_INCLUDE_DIRS}) -endif() +set(BOOST_LIBS_OPTIONAL "" CACHE STRING "Boost libs to be compiled") +add_subdirectory(external/boost-cmake) +set(BOOST_ROOT ${CMAKE_BINARY_DIR}/_deps/boost-src) +find_package(Boost REQUIRED PATHS ${CMAKE_BINARY_DIR}/_deps/boost-src/tools/boost_install/ NO_DEFAULT_PATH) +include_directories(${Boost_INCLUDE_DIRS}) execute_process(COMMAND "${GIT_EXECUTABLE}" log -1 --pretty=\"%h\" diff --git a/external/boost-cmake b/external/boost-cmake index 40cb41d8..3c65b56b 160000 --- a/external/boost-cmake +++ b/external/boost-cmake @@ -1 +1 @@ -Subproject commit 40cb41d86eab0d7fdc18af4b04b733f8cc852d2a +Subproject commit 3c65b56be2e5bd8527b42fb8fbdcafae9c9c6c05