KDE/kdegraphics/okular/generators/ooo
Alexander Neundorf
neundorf at kde.org
Sun Nov 16 20:56:41 CET 2008
On Sunday 16 November 2008, Pino Toscano wrote:
> Alle domenica 16 novembre 2008, Manuel Nickschas ha scritto:
> > SVN commit 885214 by nickschas:
> >
> > Add QCA2 dirs for linking, let's us build okular again
> >
> >
> > M +1 -0 CMakeLists.txt
> >
> >
> > --- trunk/KDE/kdegraphics/okular/generators/ooo/CMakeLists.txt
> > #885213:885214 @@ -7,6 +7,7 @@
> > macro_log_feature(QCA2_FOUND "QCA" "Qt Cryptographic Architecture (QCA)"
> > "http://delta.affinix.com/qca/" FALSE "2.0.0" "Support for encrypted
> > OpenDocument Text documents in Okular.")
> >
> > if ( QCA2_FOUND )
> > + link_directories( ${QCA2_LIBRARY_DIRS} )
> > include_directories( ${QCA2_INCLUDE_DIR} )
> > add_definitions( -DQCA2 )
> > endif( QCA2_FOUND )
>
> Can we please fix FindQCA2.cmake and not the applications using it?
> We had some policy to preserve how the Find*.cmake modules installed by
> kdelibs work, please respect it.
Yes, we need to fix how pkgconfig and find_foo() work together in
FindQCA2.cmake.
This is what is there:
find_package(PkgConfig)
pkg_check_modules(QCA2 qca2)
if(QCA2_FOUND)
set(QCA2_DEFINITIONS ${QCA2_CFLAGS})
# If pkgconfig found QCA2, get the full path to the library using
#find_library()
# but only in the path reported by pkgconfig.
# Otherwise do a normal search.
set(QCA2_INCLUDE_DIR ${QCA2_INCLUDEDIR})
find_library(QCA2_LIBRARIES NAMES qca
PATHS
${QCA2_LIBRARY_DIRS}
NO_DEFAULT_PATH
)
endif(QCA2_FOUND)
This looks good, but the problem is that QCA2_LIBRARIES is already set by
pkg_check_modules(), so the find_library() does nothing.
How about prefixing the stuff coming from pkg_config with PC_ and then setting
the interface variables explicitely ?
find_package(PkgConfig)
pkg_check_modules(PC_QCA2 qca2)
if(QCA2_FOUND)
set(QCA2_DEFINITIONS ${PC_QCA2_CFLAGS})
# If pkgconfig found QCA2, get the full path to the library using
#find_library()
# but only in the path reported by pkgconfig.
# Otherwise do a normal search.
set(QCA2_INCLUDE_DIR ${PC_QCA2_INCLUDEDIR})
find_library(QCA2_LIBRARIES NAMES qca
PATHS
${PC_QCA2_LIBRARY_DIRS}
NO_DEFAULT_PATH
)
endif(QCA2_FOUND)
Alex
More information about the Kde-buildsystem
mailing list