Bug#574883: libqjson-dev: FindQJSON.cmake is not found when using cmake-2.8

2010-08-23 Thread Dominik Stadler
Actually the official Debian build of tellico-2.3 uses a much simpler
solution, namely to add

-DCMAKE_MODULE_PATH=/usr/share/apps/cmake/modules

to the cmake command in debian/rules

This allows the file to be found and used correctly.

Thanks... Dominik.

On Sun, Aug 22, 2010 at 9:57 PM, Dominik Stadler dominik.stad...@gmx.atwrote:

 FYI, the same problem happens when packaging the new tellico version 2.3, I
 used the attached patch to build it.



Bug#574883: libqjson-dev: FindQJSON.cmake is not found when using cmake-2.8

2010-08-22 Thread Dominik Stadler
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.0 +
+++ tellico-2.3/cmake/modules/FindQJson.cmake	2010-08-22 21:55:16.0 +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, toscano.p...@tiscali.it
+#
+# 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.0 +0200
+++ tellico-2.3/CMakeLists.txt	2010-08-22 21:55:30.0 +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


Bug#574883: libqjson-dev: FindQJSON.cmake is not found when using cmake-2.8

2010-03-21 Thread Matthieu Gallien
Package: libqjson-dev
Version: 0.7.1-1
Severity: wishlist

Hello,

I was very pleased to found that qjson was packaged in Debian.
The only minor annoyance I had is that when trying to compile code
requiring it, FindQJSON.cmake was not found without setting explicitely
a CMAKE_MODULE_PATH including /usr/share/apps/cmake/modules.

Could you please check if it is expected or if there is another solution ?
I have no idea how one is supposed to install in Debian modules for cmake.

Best regards

-- System Information:
Debian Release: squeeze/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (499, 'testing'), (498, 'experimental'), 
(101, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.33-2-amd64 (SMP w/2 CPU cores)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8) (ignored: 
LC_ALL set to fr_FR.UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages libqjson-dev depends on:
ii  libqjson0 0.7.1-1qt-based library that maps JSON 
da

libqjson-dev recommends no packages.

libqjson-dev suggests no packages.

-- no debconf information


-- 
Matthieu Gallien



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org