Add support for external jansson

This commit is contained in:
BtbN
2014-05-24 15:46:22 +02:00
parent 6ff79c386d
commit 2cc24dccab
2 changed files with 77 additions and 1 deletions

15
deps/CMakeLists.txt vendored
View File

@@ -1,4 +1,17 @@
add_subdirectory(w32-pthreads)
add_subdirectory(glad)
add_subdirectory(jansson)
find_package(Jansson 2.5 QUIET)
if(NOT JANSSON_FOUND)
message(STATUS "Jansson >=2.5 not found, building bundled version")
add_subdirectory(jansson)
else()
message(STATUS "Using system Jansson library")
add_library(jansson UNKNOWN IMPORTED)
set_property(TARGET jansson PROPERTY
IMPORTED_LOCATION "${JANSSON_LIBRARIES}"
INTERFACE_INCLUDE_DIRECTORIES "${JANSSON_INCLUDE_DIRS}")
endif()