aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTrial97 <alexandru.tripon97@gmail.com>2022-09-25 00:20:01 +0300
committerTrial97 <alexandru.tripon97@gmail.com>2022-09-25 00:20:01 +0300
commita1800ec23f016054b4fd346a86e2fcf8df448bb8 (patch)
tree2bd5bc91314c4080beb92febc0492cfc3e2516a5
parent600c49f7f0482e6ca5cf977a99c225ccd97c4ae2 (diff)
downloadPrismLauncher-a1800ec23f016054b4fd346a86e2fcf8df448bb8.tar.gz
PrismLauncher-a1800ec23f016054b4fd346a86e2fcf8df448bb8.tar.bz2
PrismLauncher-a1800ec23f016054b4fd346a86e2fcf8df448bb8.zip
Prefer the system tomlplusplus
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
-rw-r--r--CMakeLists.txt10
1 files changed, 9 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 364e16d6..109db157 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -312,7 +312,15 @@ endif()
add_subdirectory(libraries/rainbow) # Qt extension for colors
add_subdirectory(libraries/LocalPeer) # fork of a library from Qt solutions
add_subdirectory(libraries/classparser) # class parser library
-add_subdirectory(libraries/tomlplusplus) # toml parser
+if(NOT Launcher_FORCE_BUNDLED_LIBS)
+ find_package(tomlplusplus 3.2.0 QUIET)
+endif()
+if(NOT tomlplusplus_FOUND)
+ message(STATUS "Using bundled tomlplusplus")
+ add_subdirectory(libraries/tomlplusplus) # toml parser
+else()
+ message(STATUS "Using system tomlplusplus")
+endif()
add_subdirectory(libraries/katabasis) # An OAuth2 library that tried to do too much
add_subdirectory(libraries/gamemode)
add_subdirectory(libraries/murmur2) # Hash for usage with the CurseForge API