version checking for Oyranos

Alexander Neundorf neundorf at kde.org
Mon Jan 20 21:49:19 UTC 2014


On Monday 20 January 2014, you wrote:
> On Thursday 09 January 2014 22:04:40 Alexander Neundorf wrote:
> > 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}.${${P
> > > ROJ 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.
> 
> The file  /usr/lib64/oyranos/cmake/OyranosConfig.cmake isn't even being
> opened by cmake - I add message(STATUS "....") in it, and it never shows
> up.
> 
> Could it be because cmake is looking for a OyranosConfigVersion.cmake file,
> which doesn't exist?

I would have to check, maybe.

Alex



More information about the Kde-buildsystem mailing list