summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
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 8714ca8a..da5486b2 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -5,6 +5,9 @@ CMAKE_MINIMUM_REQUIRED (VERSION 2.6)
# We want a readable feature summary.
INCLUDE(FeatureSummary)
+# pkg-config support
+INCLUDE(FindPkgConfig)
+
# Default flags.
IF(CMAKE_COMPILER_IS_GNUCC)
# Let's set sensible options.
@@ -17,6 +20,16 @@ ENDIF()
ADD_DEFINITIONS(-DUSE_PRECISE_CMOVIE)
#
+# JSON support
+#
+PKG_CHECK_MODULES(JANSSON REQUIRED jansson)
+IF(JANSSON_FOUND)
+ ADD_DEFINITIONS(${JANSSON_CFLAGS})
+ INCLUDE_DIRECTORIES(${JANSSON_INCLUDE_DIRS})
+ SET(LIBS ${LIBS} ${JANSSON_LIBRARIES})
+ENDIF()
+
+#
# X11 support (OPTIONAL)
#
FIND_PACKAGE(X11)