summaryrefslogtreecommitdiff
blob: 3bae049af2e5c235d7acb0d53bd4e193d660a80d (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
Index: CMakeLists.txt
===================================================================
--- CMakeLists.txt	(revision 2794)
+++ CMakeLists.txt	(revision 2795)
@@ -166,6 +166,10 @@
     find_package(Taglib)
 endif (ENABLE_TAGLIB)
 
+if (NOT ENABLE_QT5 AND NOT WIN32)
+    find_package( QJSON )
+endif (NOT ENABLE_QT5 AND NOT WIN32)
+
 if (ENABLE_OVERLAYSCROLLBARS)
     add_definitions(-DENABLE_OVERLAYSCROLLBARS)
 endif (ENABLE_OVERLAYSCROLLBARS)
@@ -495,9 +499,17 @@
 endif (NOT WIN32)
 
 add_subdirectory(3rdparty/qtiocompressor)
-add_subdirectory(3rdparty/qjson)
-TARGET_LINK_LIBRARIES(cantata qtiocompressor qjson)
 
+if (QJSON_FOUND)
+    include_directories(${QJSON_INCLUDE_DIR})
+    TARGET_LINK_LIBRARIES(cantata ${QJSON_LIBRARIES})
+else (QJSON_FOUND)
+    add_subdirectory(3rdparty/qjson)
+    TARGET_LINK_LIBRARIES(cantata qjson)
+endif (QJSON_FOUND)
+
+TARGET_LINK_LIBRARIES(cantata qtiocompressor)
+
 ADD_SUBDIRECTORY( icons )
 
 target_link_libraries(cantata support sha2 ${QTLIBS} ${ZLIB_LIBRARIES})