blob: a7465aa18a06b662cfe3f084c1286fceac0196f0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
From d3e5aac7c61d76bfb4c80facdbd1c89d0ab6a394 Mon Sep 17 00:00:00 2001
From: "Azamat H. Hackimov" <azamat.hackimov@gmail.com>
Date: Sun, 10 Jul 2022 19:53:06 +0300
Subject: [PATCH 2/5] Use shared json11 library
Added option -DUSE_SHARED_JSON11
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -41,6 +41,7 @@ option(USE_SHARED_CMARK "Use your installed copy of cmark" off)
option(USE_SHARED_CURL "Use your installed copy of curl" off)
option(USE_SHARED_GIFLIB "Use your installed copy of giflib" off)
option(USE_SHARED_JPEGLIB "Use your installed copy of jpeglib" off)
+option(USE_SHARED_JSON11 "Use your installed copy of json11" off)
option(USE_SHARED_ZLIB "Use your installed copy of zlib" off)
option(USE_SHARED_LIBARCHIVE "Use your installed copy of libarchive" off)
option(USE_SHARED_LIBPNG "Use your installed copy of libpng" off)
@@ -305,6 +306,12 @@ else()
endif()
include_directories(${JPEG_INCLUDE_DIRS})
+if(USE_SHARED_JSON11)
+ find_package(PkgConfig QUIET)
+ pkg_check_modules(JSON11 json11)
+ include_directories(${JSON11_INCLUDE_DIRS})
+endif()
+
if(USE_SHARED_CMARK)
find_library(CMARK_LIBRARIES NAMES cmark)
find_path(CMARK_INCLUDE_DIRS NAMES cmark.h)
--- a/third_party/CMakeLists.txt
+++ b/third_party/CMakeLists.txt
@@ -113,7 +113,9 @@ if(NOT USE_SHARED_CMARK)
endif()
# JSON
-add_subdirectory(json11)
+if(NOT USE_SHARED_JSON11)
+ add_subdirectory(json11)
+endif()
# libarchive
if(NOT USE_SHARED_LIBARCHIVE)
--
2.44.2
|