From 236326fbac97714cb862bc4306ea73cb4fdd5d84 Mon Sep 17 00:00:00 2001 From: Tony Wasserka Date: Fri, 8 Mar 2024 21:16:08 +0100 Subject: [PATCH] Document how to prefer system packages over Conan --- CMakeLists.txt | 8 ++++++-- README.md | 11 +++++++++++ 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index f63df93..891d0ee 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -34,7 +34,11 @@ add_definitions(-DBOOST_FILESYSTEM_NO_DEPRECATED -DBOOST_COROUTINES_NO_DEPRECATI #set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -fstrict-aliasing -Wpedantic -Wfatal-errors -Wdocumentation") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -fstrict-aliasing -Wpedantic") -find_package(Boost 1.80.0 EXACT REQUIRED CONFIG) +set(BOOST_COMPONENTS context filesystem iostreams program_options thread) +find_package(Boost 1.80.0 EXACT CONFIG COMPONENTS ${BOOST_COMPONENTS}) +if (NOT Boost_FOUND) + find_package(Boost 1.80.0 REQUIRED COMPONENTS ${BOOST_COMPONENTS}) +endif () find_package(fmt REQUIRED) @@ -66,7 +70,7 @@ find_package(shaderc REQUIRED) #set_property(TARGET proj PROPERTY CXX_STANDARD_REQUIRED ON) if(NOT ANDROID) - find_package(libunwind) + find_package(libunwind REQUIRED) endif () # TODO: find_package-ify diff --git a/README.md b/README.md index af9af50..dba6e0e 100644 --- a/README.md +++ b/README.md @@ -13,6 +13,17 @@ The Conan install may fail if the shaderc package cannot be found. In this case, download our [custom recipe from conan-3ds](https://github.com/mikage-emu/conan-3ds/tree/mikage/packages/shaderc) and run `conan export . --version 2021.1` from within this `shaderc` folder. +Some dependencies may be provided by system packages instead of building them +via Conan. To enable this behavior, add the following to your Conan profile +(`~/.conan2/profiles/default`): +``` +[platform_requires] +boost/1.80.0 +sdl/2.0.20 +range-v3/0.11.0 +catch2/2.13.7 +``` + ## Usage For the first launch, three things must be set up: