Magellan Linux

Annotation of /trunk/phonon/patches/phonon-4.4.2-glib2.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1147 - (hide annotations) (download)
Fri Sep 24 08:34:57 2010 UTC (13 years, 8 months ago) by niro
File size: 2468 byte(s)
added glib2 compile fix
1 niro 1147 commit 75532b4bb395f3b14da37ceb0d28619c1df145b7
2     Author: Martin T. H. Sandsmark <sandsmark@samfundet.no>
3     Date: Thu Aug 12 19:22:46 2010 +0200
4    
5     Adopt the FindGLIB2.cmake from kdelibs.
6    
7     BUG: 247546
8    
9     diff --git a/cmake/FindGLIB2.cmake b/cmake/FindGLIB2.cmake
10     index e19d6a4..09fd98d 100644
11     --- a/cmake/FindGLIB2.cmake
12     +++ b/cmake/FindGLIB2.cmake
13     @@ -5,36 +5,45 @@
14     # GLIB2_INCLUDE_DIR - the glib2 include directory
15     # GLIB2_LIBRARIES - glib2 library
16    
17     +# Copyright (c) 2008 Laurent Montel, <montel@kde.org>
18     +#
19     +# Redistribution and use is allowed according to the terms of the BSD license.
20     +# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
21     +
22    
23     if(GLIB2_INCLUDE_DIR AND GLIB2_LIBRARIES)
24     # Already in cache, be silent
25     set(GLIB2_FIND_QUIETLY TRUE)
26     endif(GLIB2_INCLUDE_DIR AND GLIB2_LIBRARIES)
27    
28     -if (NOT WIN32)
29     - find_package(PkgConfig REQUIRED)
30     - pkg_check_modules(PKG_GLIB REQUIRED glib-2.0)
31     -endif(NOT WIN32)
32     +find_package(PkgConfig)
33     +pkg_check_modules(PC_LibGLIB2 QUIET glib-2.0)
34     +
35     +find_path(GLIB2_MAIN_INCLUDE_DIR
36     + NAMES glib.h
37     + HINTS ${PC_LibGLIB2_INCLUDEDIR}
38     + PATH_SUFFIXES glib-2.0)
39     +
40     +find_library(GLIB2_LIBRARY
41     + NAMES glib-2.0
42     + HINTS ${PC_LibGLIB2_LIBDIR}
43     +)
44    
45     -find_path(GLIB2_MAIN_INCLUDE_DIR glib.h
46     - PATH_SUFFIXES glib-2.0
47     - PATHS ${PKG_GLIB_INCLUDE_DIRS} )
48     +set(GLIB2_LIBRARIES ${GLIB2_LIBRARY})
49    
50     # search the glibconfig.h include dir under the same root where the library is found
51     -find_library(GLIB2_LIBRARIES
52     - NAMES glib-2.0
53     - PATHS ${PKG_GLIB_LIBRARY_DIRS} )
54     +get_filename_component(glib2LibDir "${GLIB2_LIBRARIES}" PATH)
55    
56     find_path(GLIB2_INTERNAL_INCLUDE_DIR glibconfig.h
57     - PATH_SUFFIXES glib-2.0/include ../lib/glib-2.0/include
58     - PATHS ${PKG_GLIB_INCLUDE_DIRS} ${PKG_GLIB_LIBRARIES} ${CMAKE_SYSTEM_LIBRARY_PATH})
59     + PATH_SUFFIXES glib-2.0/include
60     + HINTS ${PC_LibGLIB2_INCLUDEDIR} "${glib2LibDir}" ${CMAKE_SYSTEM_LIBRARY_PATH})
61    
62     -set(GLIB2_INCLUDE_DIR ${GLIB2_MAIN_INCLUDE_DIR})
63     +set(GLIB2_INCLUDE_DIR "${GLIB2_MAIN_INCLUDE_DIR}")
64    
65     # not sure if this include dir is optional or required
66     # for now it is optional
67     if(GLIB2_INTERNAL_INCLUDE_DIR)
68     - set(GLIB2_INCLUDE_DIR ${GLIB2_INCLUDE_DIR} ${GLIB2_INTERNAL_INCLUDE_DIR})
69     + set(GLIB2_INCLUDE_DIR ${GLIB2_INCLUDE_DIR} "${GLIB2_INTERNAL_INCLUDE_DIR}")
70     endif(GLIB2_INTERNAL_INCLUDE_DIR)
71    
72     include(FindPackageHandleStandardArgs)