blob: 3779afc97b54986a1349c5c1d54ffbc06a7c0ba8 (
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
|
Fix for finding system JSON
https://github.com/BespokeSynth/BespokeSynth/pull/1525/commits/aa1508f16344968afbbd4ec277d457afb58030d4#diff-1e7de1ae2d059d21e1dd75d5812d5a34b0222cef273b7c3a2af62eb747f9d20a
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -96,6 +96,13 @@
endif()
endif()
+
+if(BESPOKE_SYSTEM_JSONCPP)
+ find_package(PkgConfig REQUIRED)
+ pkg_check_modules(JSONCPP REQUIRED jsoncpp)
+ include_directories(${JSONCPP_INCLUDE_DIRS})
+endif()
+
if (BESPOKE_VST2_SDK_LOCATION)
juce_set_vst2_sdk_path(${BESPOKE_VST2_SDK_LOCATION})
message(STATUS "Enabling VST2 - caution, non FOSS build")
--- a/libs/CMakeLists.txt
+++ b/libs/CMakeLists.txt
@@ -3,10 +3,6 @@
if(NOT BESPOKE_SYSTEM_JSONCPP)
add_subdirectory(json EXCLUDE_FROM_ALL)
message(STATUS "Using bundled jsoncpp")
-else()
- include(FindPkgConfig)
- pkg_search_module(json REQUIRED jsoncpp)
- message(STATUS "Using system provided jsoncpp")
endif()
add_subdirectory(leathers EXCLUDE_FROM_ALL)
add_subdirectory(nanovg EXCLUDE_FROM_ALL)
|