aboutsummaryrefslogtreecommitdiff
path: root/cmake/modules/FindJansson.cmake
diff options
context:
space:
mode:
authorAvatar Saleem Abdulrasool <compnerd@compnerd.org> 2016-12-12 19:21:18 -0800
committerAvatar Saleem Abdulrasool <compnerd@compnerd.org> 2016-12-12 19:21:18 -0800
commit75f421209febe5485866d1b09916fbb04decf643 (patch)
tree79a87ff4e34a1ae38d3805ffbc8fd24ad11aa5fb /cmake/modules/FindJansson.cmake
parent6794e16764f6603408e26cf7db5d20328916a5be (diff)
downloadpaludis-75f421209febe5485866d1b09916fbb04decf643.tar.gz
paludis-75f421209febe5485866d1b09916fbb04decf643.tar.xz
build: fix Jansson detection
Diffstat (limited to 'cmake/modules/FindJansson.cmake')
-rw-r--r--cmake/modules/FindJansson.cmake7
1 files changed, 3 insertions, 4 deletions
diff --git a/cmake/modules/FindJansson.cmake b/cmake/modules/FindJansson.cmake
index ea98f125a..feed563be 100644
--- a/cmake/modules/FindJansson.cmake
+++ b/cmake/modules/FindJansson.cmake
@@ -36,9 +36,8 @@ else()
${CMAKE_INSTALL_FULL_LIBDIR})
if(Jansson_INCLUDE_DIR AND EXISTS "${Jansson_INCLUDE_DIR}/jansson.h")
- file(STRINGS "${Jansson_INCLUDE_DIR}/jansson.h"
- REGEX "^#[ ]*define[ ]+JANSSON_VERSION[ ]+\".*\""
- jansson_version_str)
+ file(STRINGS "${Jansson_INCLUDE_DIR}/jansson.h" jansson_version_str
+ REGEX "^#[ ]*define[ ]+JANSSON_VERSION[ ]+\".*\"")
string(REGEX
REPLACE "^[ ]*define[ ]+JANSSON_VERSION[ ]+\"([^\"]*)\".*" "\\1"
Jansson_VERSION_STRING "${jansson_version_str}")
@@ -48,7 +47,7 @@ else()
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(Jansson
REQUIRED_VARS
- Jansson_INCLUDE_DIRS
+ Jansson_INCLUDE_DIR
Jansson_LIBRARIES
VERSION_VAR
Jansson_VERSION_STRING)