File tree Expand file tree Collapse file tree 3 files changed +11
-6
lines changed Expand file tree Collapse file tree 3 files changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -39,12 +39,15 @@ find_package(OpenAL REQUIRED)
39
39
find_package (SFML 2 COMPONENTS graphics window REQUIRED )
40
40
find_package (X11 REQUIRED )
41
41
42
- # nlohmann/json
43
- FetchContent_Declare (nlohmann_json
44
- URL https://github.com/nlohmann/json/releases/download/v3.12.0/json.tar.xz
45
- DOWNLOAD_DIR ${CASPARCG_DOWNLOAD_CACHE}
46
- )
47
- FetchContent_MakeAvailable (nlohmann_json )
42
+ # nlohmann/json - try system package first, fall back to fetching
43
+ find_package (nlohmann_json 3.12.0 QUIET )
44
+ if (NOT nlohmann_json_FOUND )
45
+ FetchContent_Declare (nlohmann_json
46
+ URL https://github.com/nlohmann/json/releases/download/v3.12.0/json.tar.xz
47
+ DOWNLOAD_DIR ${CASPARCG_DOWNLOAD_CACHE}
48
+ )
49
+ FetchContent_MakeAvailable (nlohmann_json )
50
+ endif ()
48
51
49
52
# support for Ubuntu 22.04
50
53
if (NOT TARGET OpenAL::OpenAL )
Original file line number Diff line number Diff line change @@ -31,6 +31,7 @@ Build-Depends: cmake,
31
31
libswscale-dev,
32
32
libtbb-dev,
33
33
libxrandr-dev,
34
+ nlohmann-json3-dev,
34
35
pkg-config,
35
36
txt2man,
36
37
zlib1g-dev,
Original file line number Diff line number Diff line change @@ -31,6 +31,7 @@ Build-Depends: cmake,
31
31
libswscale-dev,
32
32
libtbb-dev,
33
33
libxrandr-dev,
34
+ nlohmann-json3-dev,
34
35
pkg-config,
35
36
txt2man,
36
37
zlib1g-dev,
You can’t perform that action at this time.
0 commit comments