aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorJohn Levon <john.levon@nutanix.com>2020-11-24 09:36:50 +0000
committerGitHub <noreply@github.com>2020-11-24 09:36:50 +0000
commit3b8d4018aa01cb4896b27cff1777beec20d27096 (patch)
tree98ee679cc6e9316331fcf8213a3867363d39f399 /CMakeLists.txt
parent3ba6609e1b3609b0b2764c1dcbc596f071873a83 (diff)
downloadlibvfio-user-3b8d4018aa01cb4896b27cff1777beec20d27096.zip
libvfio-user-3b8d4018aa01cb4896b27cff1777beec20d27096.tar.gz
libvfio-user-3b8d4018aa01cb4896b27cff1777beec20d27096.tar.bz2
parse VFIO_USER_VERSION JSON stanza
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt8
1 files changed, 7 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ff54c89..4eb23a7 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -32,6 +32,9 @@ cmake_minimum_required (VERSION 2.6)
project(muser)
include(GNUInstallDirs)
+find_package(PkgConfig REQUIRED)
+pkg_check_modules(JSON REQUIRED json-c)
+
set(CMAKE_C_FLAGS_DEBUG "-O0 -ggdb")
#
# NB: this intentionally does not define NDEBUG: we want our assert()s even in a
@@ -39,6 +42,10 @@ set(CMAKE_C_FLAGS_DEBUG "-O0 -ggdb")
#
set(CMAKE_C_FLAGS_RELEASE "-O3")
+#
+# "include_directories" does *not* work here.
+#
+include_directories(${JSON_INCLUDE_DIRS})
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Werror -Wextra")
@@ -47,4 +54,3 @@ add_subdirectory(lib)
# samples
add_subdirectory(samples)
-