summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt17
-rw-r--r--src/common/CMakeLists.txt2
2 files changed, 17 insertions, 2 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)
160 # Capitalization matters here. We need the naming to match the generated paths from Conan 160 # Capitalization matters here. We need the naming to match the generated paths from Conan
161 set(REQUIRED_LIBS 161 set(REQUIRED_LIBS
162 # Cmake Pkg Prefix Version Conan Pkg 162 # Cmake Pkg Prefix Version Conan Pkg
163 "Boost 1.73 boost/1.73.0"
164 "Catch2 2.13 catch2/2.13.0" 163 "Catch2 2.13 catch2/2.13.0"
165 "fmt 7.1 fmt/7.1.2" 164 "fmt 7.1 fmt/7.1.2"
166 # can't use until https://github.com/bincrafters/community/issues/1173 165 # can't use until https://github.com/bincrafters/community/issues/1173
@@ -195,6 +194,17 @@ macro(yuzu_find_packages)
195 unset(FN_FORCE_REQUIRED) 194 unset(FN_FORCE_REQUIRED)
196endmacro() 195endmacro()
197 196
197if (NOT Boost_FOUND)
198 find_package(Boost 1.73.0 COMPONENTS context headers QUIET)
199 if (Boost_FOUND)
200 set(Boost_LIBRARIES Boost::boost Boost::context)
201 endif()
202endif()
203if (NOT Boost_FOUND)
204 message(STATUS "Boost 1.73.0 or newer not found, falling back to Conan")
205 list(APPEND CONAN_REQUIRED_LIBS "boost/1.73.0")
206endif()
207
198# Attempt to locate any packages that are required and report the missing ones in CONAN_REQUIRED_LIBS 208# Attempt to locate any packages that are required and report the missing ones in CONAN_REQUIRED_LIBS
199yuzu_find_packages() 209yuzu_find_packages()
200 210
@@ -299,6 +309,11 @@ if (CONAN_REQUIRED_LIBS)
299 # this time with required, so we bail if its not found. 309 # this time with required, so we bail if its not found.
300 yuzu_find_packages(FORCE_REQUIRED) 310 yuzu_find_packages(FORCE_REQUIRED)
301 311
312 if (NOT Boost_FOUND)
313 find_package(Boost 1.73.0 REQUIRED COMPONENTS context headers)
314 set(Boost_LIBRARIES Boost::boost)
315 endif()
316
302 # Due to issues with variable scopes in functions, we need to also find_package(qt5) outside of the function 317 # Due to issues with variable scopes in functions, we need to also find_package(qt5) outside of the function
303 if(ENABLE_QT) 318 if(ENABLE_QT)
304 list(APPEND CMAKE_MODULE_PATH "${CONAN_QT_ROOT_RELEASE}") 319 list(APPEND CMAKE_MODULE_PATH "${CONAN_QT_ROOT_RELEASE}")
diff --git a/src/common/CMakeLists.txt b/src/common/CMakeLists.txt
index 0981fe90b..0acf70a0a 100644
--- a/src/common/CMakeLists.txt
+++ b/src/common/CMakeLists.txt
@@ -210,7 +210,7 @@ endif()
210 210
211create_target_directory_groups(common) 211create_target_directory_groups(common)
212 212
213target_link_libraries(common PUBLIC Boost::boost fmt::fmt microprofile) 213target_link_libraries(common PUBLIC ${Boost_LIBRARIES} fmt::fmt microprofile)
214target_link_libraries(common PRIVATE lz4::lz4 xbyak) 214target_link_libraries(common PRIVATE lz4::lz4 xbyak)
215if (MSVC) 215if (MSVC)
216 target_link_libraries(common PRIVATE zstd::zstd) 216 target_link_libraries(common PRIVATE zstd::zstd)