FYI, the same problem happens when packaging the new tellico version 2.3, I
used the attached patch to build it.
Index: tellico-2.3/cmake/modules/FindQJson.cmake
===================================================================
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
+++ tellico-2.3/cmake/modules/FindQJson.cmake	2010-08-22 21:55:16.000000000 +0200
@@ -0,0 +1,39 @@
+# - Try to find the QJson library
+# Once done this will define
+#
+#  QJSON_FOUND - system has the QJson library
+#  QJSON_INCLUDE_DIR - the QJson include directory
+#  QJSON_LIBRARY - Link this to use the QJson library
+#
+# Copyright (c) 2010, Pino Toscano, <[email protected]>
+#
+# Redistribution and use is allowed according to the terms of the BSD license.
+# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
+
+if (QJSON_INCLUDE_DIR AND QJSON_LIBRARY)
+
+  # in cache already
+  set(QJSON_FOUND TRUE)
+
+else (QJSON_INCLUDE_DIR AND QJSON_LIBRARY)
+  if (NOT WIN32)
+    find_package(PkgConfig)
+    pkg_check_modules(PC_QJSON QJson)
+  endif(NOT WIN32)
+
+  find_path(QJSON_INCLUDE_DIR qjson/parser.h
+    HINTS
+    ${PC_QJSON_INCLUDE_DIRS}
+  )
+
+  find_library(QJSON_LIBRARY NAMES qjson
+    HINTS
+    ${PC_QJSON_LIBRARY_DIRS}
+  )
+
+  include(FindPackageHandleStandardArgs)
+  find_package_handle_standard_args(QJson DEFAULT_MSG QJSON_LIBRARY QJSON_INCLUDE_DIR)
+
+  mark_as_advanced(QJSON_INCLUDE_DIR QJSON_LIBRARY)
+
+endif (QJSON_INCLUDE_DIR AND QJSON_LIBRARY)
Index: tellico-2.3/CMakeLists.txt
===================================================================
--- tellico-2.3.orig/CMakeLists.txt	2010-08-22 21:55:23.000000000 +0200
+++ tellico-2.3/CMakeLists.txt	2010-08-22 21:55:30.000000000 +0200
@@ -90,7 +90,7 @@
     include_directories(${LIBEXEMPI_INCLUDE_DIR})
 endif(LIBEXEMPI_FOUND)
 
-macro_optional_find_package(QJSON)
+find_package(QJson REQUIRED)
 macro_log_feature(QJSON_FOUND "QJSON" "Support for searching OpenLibrary and Freebase" "http://qjson.sourceforge.net"; FALSE "" "")
 
 # once we make webcam support enabled by default, we can remove this logic

Reply via email to