summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorlat9nq <22451773+lat9nq@users.noreply.github.com>2020-12-13 04:20:24 +0100
committerlat9nq <22451773+lat9nq@users.noreply.github.com>2020-12-13 07:28:51 +0100
commit292dd642cefb3717363e96974f055da9dc1cbf23 (patch)
tree886e3c6f8f7686761198ae3729c3a2f9238532e5 /CMakeLists.txt
parentcommon: Update CMakeList to fix build issue with Boost. (diff)
downloadyuzu-292dd642cefb3717363e96974f055da9dc1cbf23.tar
yuzu-292dd642cefb3717363e96974f055da9dc1cbf23.tar.gz
yuzu-292dd642cefb3717363e96974f055da9dc1cbf23.tar.bz2
yuzu-292dd642cefb3717363e96974f055da9dc1cbf23.tar.lz
yuzu-292dd642cefb3717363e96974f055da9dc1cbf23.tar.xz
yuzu-292dd642cefb3717363e96974f055da9dc1cbf23.tar.zst
yuzu-292dd642cefb3717363e96974f055da9dc1cbf23.zip
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt17
1 files changed, 16 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2316f7684..2366d372c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -160,7 +160,6 @@ macro(yuzu_find_packages)
# Capitalization matters here. We need the naming to match the generated paths from Conan
set(REQUIRED_LIBS
# Cmake Pkg Prefix Version Conan Pkg
- "Boost 1.73 boost/1.73.0"
"Catch2 2.13 catch2/2.13.0"
"fmt 7.1 fmt/7.1.2"
# can't use until https://github.com/bincrafters/community/issues/1173
@@ -195,6 +194,17 @@ macro(yuzu_find_packages)
unset(FN_FORCE_REQUIRED)
endmacro()
+if (NOT Boost_FOUND)
+ find_package(Boost 1.73.0 COMPONENTS context headers QUIET)
+ if (Boost_FOUND)
+ set(Boost_LIBRARIES Boost::boost Boost::context)
+ endif()
+endif()
+if (NOT Boost_FOUND)
+ message(STATUS "Boost 1.73.0 or newer not found, falling back to Conan")
+ list(APPEND CONAN_REQUIRED_LIBS "boost/1.73.0")
+endif()
+
# Attempt to locate any packages that are required and report the missing ones in CONAN_REQUIRED_LIBS
yuzu_find_packages()
@@ -299,6 +309,11 @@ if (CONAN_REQUIRED_LIBS)
# this time with required, so we bail if its not found.
yuzu_find_packages(FORCE_REQUIRED)
+ if (NOT Boost_FOUND)
+ find_package(Boost 1.73.0 REQUIRED COMPONENTS context headers)
+ set(Boost_LIBRARIES Boost::boost)
+ endif()
+
# Due to issues with variable scopes in functions, we need to also find_package(qt5) outside of the function
if(ENABLE_QT)
list(APPEND CMAKE_MODULE_PATH "${CONAN_QT_ROOT_RELEASE}")