aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorSefa Eyeoglu <contact@scrumplex.net>2023-01-07 14:57:13 +0100
committerJoshua Goins <josh@redstrate.com>2023-01-12 10:08:52 -0500
commit22a2b7ac463e7ea339d4d57be3b770fbf09518bf (patch)
treec2eedd8f6fe7f75c916daf0ab93d976b2e39e6a8 /CMakeLists.txt
parentaa7c910e262d4c3d655a9a7f853b52d7cd0641a9 (diff)
downloadPrismLauncher-22a2b7ac463e7ea339d4d57be3b770fbf09518bf.tar.gz
PrismLauncher-22a2b7ac463e7ea339d4d57be3b770fbf09518bf.tar.bz2
PrismLauncher-22a2b7ac463e7ea339d4d57be3b770fbf09518bf.zip
refactor: support system and bundled cmark
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt13
1 files changed, 13 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index f235a2ac..2194317b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -266,6 +266,9 @@ if(NOT Launcher_FORCE_BUNDLED_LIBS)
# Find ghc_filesystem
find_package(ghc_filesystem QUIET)
+
+ # Find cmark
+ find_package(cmark QUIET)
endif()
include(ECMQtDeclareLoggingCategory)
@@ -407,6 +410,16 @@ if(NOT tomlplusplus_FOUND)
else()
message(STATUS "Using system tomlplusplus")
endif()
+if(NOT cmark_FOUND)
+ message(STATUS "Using bundled cmark")
+ set(CMARK_STATIC ON CACHE BOOL "Build static libcmark library" FORCE)
+ set(CMARK_SHARED OFF CACHE BOOL "Build shared libcmark library" FORCE)
+ set(CMARK_TESTS OFF CACHE BOOL "Build cmark tests and enable testing" FORCE)
+ add_subdirectory(libraries/cmark EXCLUDE_FROM_ALL) # Markdown parser
+ add_library(cmark::cmark ALIAS cmark_static)
+else()
+ message(STATUS "Using system cmark")
+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