diff options
author | Alexander Neundorf <neundorf@kde.org> | 2008-12-02 21:49:01 +0000 |
---|---|---|
committer | Alexander Neundorf <neundorf@kde.org> | 2008-12-02 21:49:01 +0000 |
commit | c379d4c4e0655fac2dadd4be57e2e5cd23d40572 (patch) | |
tree | ded75f12990a05a4578511ef667738fcadedc94b /modules/FindGStreamer.cmake | |
parent | 2272394b6ef05df4c4e8996b09aba0d411f249fc (diff) | |
download | extra-cmake-modules-c379d4c4e0655fac2dadd4be57e2e5cd23d40572.tar.gz extra-cmake-modules-c379d4c4e0655fac2dadd4be57e2e5cd23d40572.tar.bz2 |
-rework all uses of find_package(PkgConfig)/pkg_check_modules():
the prefix used for pkgconfig config (e.g. SQLITE) now *always* gets an additional "PC_" prefix, so the prefix used
for pkgconfig is now "PC_SQLITE_". This avoids name clashes between variables defined by the pkgconfig macro and the find module
and unwanted effects.
*Never* use the _CFLAGS coming from pkgconfig, but always CFLAGS_OTHER, since these shouldn't contain the include directories.
If the include directories would be in the DEFINITIONS variable this could clash with the results of find_path() for finding include dirs.
*Always* use both foo_INCLUDEDIR, foo_INCLUDE_DIRS for searching the include dir, and also both foo_LIBDIR and foo_LIBRARY_DIRS for
searching the libraries.
These directories coming from pkgconfig are *never* used exclusively, but *always* additionally to the standard search dirs,
either before them (then using the "HINTS" keyword) or after them (then using the "PATHS" keyword)
I hope I didn't break (too much) stuff. At least on my system it all seems to work the same way as it did before, with and without pkgconfig.
Alex
svn path=/trunk/KDE/kdelibs/; revision=891805
Diffstat (limited to 'modules/FindGStreamer.cmake')
-rw-r--r-- | modules/FindGStreamer.cmake | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/modules/FindGStreamer.cmake b/modules/FindGStreamer.cmake index 291ddc3b..b87e37fd 100644 --- a/modules/FindGStreamer.cmake +++ b/modules/FindGStreamer.cmake @@ -20,33 +20,37 @@ ENDIF (GSTREAMER_INCLUDE_DIR AND GSTREAMER_LIBRARIES AND GSTREAMER_BASE_LIBRARY IF (NOT WIN32) # use pkg-config to get the directories and then use these values # in the FIND_PATH() and FIND_LIBRARY() calls - find_package(PkgConfig) - pkg_check_modules(GSTREAMER gstreamer-0.10) + FIND_PACKAGE(PkgConfig) + PKG_CHECK_MODULES(PC_GSTREAMER gstreamer-0.10) #MESSAGE(STATUS "DEBUG: GStreamer include directory = ${GSTREAMER_INCLUDE_DIRS}") #MESSAGE(STATUS "DEBUG: GStreamer link directory = ${GSTREAMER_LIBRARY_DIRS}") - #MESSAGE(STATUS "DEBUG: GStreamer CFlags = ${GSTREAMER_CFLAGS}") - SET(GSTREAMER_DEFINITIONS ${GSTREAMER_CFLAGS}) + #MESSAGE(STATUS "DEBUG: GStreamer CFlags = ${GSTREAMER_CFLAGS_OTHER}") + SET(GSTREAMER_DEFINITIONS ${PC_GSTREAMER_CFLAGS_OTHER}) ENDIF (NOT WIN32) FIND_PATH(GSTREAMER_INCLUDE_DIR gst/gst.h PATHS - ${GSTREAMER_INCLUDE_DIRS} + ${PC_GSTREAMER_INCLUDEDIR} + ${PC_GSTREAMER_INCLUDE_DIRS} #PATH_SUFFIXES gst ) FIND_LIBRARY(GSTREAMER_LIBRARIES NAMES gstreamer-0.10 PATHS - ${GSTREAMER_LIBRARY_DIRS} + ${PC_GSTREAMER_LIBDIR} + ${PC_GSTREAMER_LIBRARY_DIRS} ) FIND_LIBRARY(GSTREAMER_BASE_LIBRARY NAMES gstbase-0.10 PATHS - ${GSTREAMER_LIBRARY_DIRS} + ${PC_GSTREAMER_LIBDIR} + ${PC_GSTREAMER_LIBRARY_DIRS} ) FIND_LIBRARY(GSTREAMER_INTERFACE_LIBRARY NAMES gstinterfaces-0.10 PATHS - ${GSTREAMER_LIBRARY_DIRS} + ${PC_GSTREAMER_LIBDIR} + ${PC_GSTREAMER_LIBRARY_DIRS} ) IF (GSTREAMER_INCLUDE_DIR) |