version checking for Oyranos
Alexander Neundorf
neundorf at kde.org
Thu Jan 9 21:04:40 UTC 2014
On Thursday 09 January 2014, David Faure wrote:
> kolor-manager.git doesn't check the version number of the oyranos library
> it's using.
>
> So I tried this:
>
> diff --git a/CMakeLists.txt b/CMakeLists.txt
> index a227fa8..8ce6372 100644
> --- a/CMakeLists.txt
> +++ b/CMakeLists.txt
> @@ -15,7 +15,7 @@ SET( ${PROJECT_NAME}_MICRO_VERSION 2)
> SET( ${PROJECT_NAME}_VERSION
> ${${PROJECT_NAME}_MAJOR_VERSION}.${${PROJECT_NAME}_MINOR_VERSION}.${${PROJ
> ECT_NAME}_MICRO_VERSION} )
>
> FIND_PACKAGE(KDE4 REQUIRED )
> -FIND_PACKAGE(Oyranos REQUIRED)
> +FIND_PACKAGE(Oyranos 0.9.5 REQUIRED)
> FIND_PACKAGE(Xcm REQUIRED) # for KolorServer
>
> INCLUDE_DIRECTORIES(${KDE4_INCLUDES} ${OYRANOS_INCLUDE_DIRS}
> ${XCM_INCLUDE_DIRS})
>
> and it gives:
>
> CMake Error at CMakeLists.txt:18 (FIND_PACKAGE):
> Could not find a configuration file for package "Oyranos" that is
> compatible with requested version "0.9.5".
>
> The following configuration files were considered but not accepted:
>
> /usr/lib64/oyranos/cmake/OyranosConfig.cmake, version: unknown
the file you attached is 0.9.4, but 0.9.5 is required it seems.
Beside that, the Config file does a bunch of find_...() calls, which is not
the recommended way, but it should be ok, since the paths are probably
configured to point to the correct the install location, and NO_DEFAULT_PATH
is used.
So I don't see an obvious reason why OYRANOS_FOUND should be false.
I'd add a bunch of debug output and just see what happens.
Btw. cmake 2.8.12 has a macro
include(CMakePrintHelpers)
cmake_print_variables(Var1 ... VarN)
which makes this easier.
Alex
More information about the Kde-buildsystem
mailing list