summaryrefslogtreecommitdiff
blob: c965a8449d73f2674656192e6b01237045d70edf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
diff -u -r -N digikam-1.3.0-1-docs/CMakeLists.txt digikam-1.3.0/CMakeLists.txt
--- digikam-1.3.0-1-docs/CMakeLists.txt	2010-08-26 23:24:35.000000000 +0200
+++ digikam-1.3.0/CMakeLists.txt	2010-08-26 23:44:46.000000000 +0200
@@ -34,6 +34,9 @@
     "${DIGIKAM_VERSION_SHORT}${DIGIKAM_SUFFIX_VERSION}"
    )
 
+# Path to find FindPGF.cmake script.
+SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/modules")
+
 # ==================================================================================================
 # Debug area codes
 # These codes will be set for every project specific path automatically, so
@@ -133,6 +136,7 @@
 FIND_PACKAGE(JPEG)
 FIND_PACKAGE(PNG)
 FIND_PACKAGE(TIFF)
+FIND_PACKAGE(PGF)
 FIND_PACKAGE(Jasper)
 FIND_PACKAGE(Kdcraw)
 FIND_PACKAGE(Kexiv2)
@@ -267,6 +271,13 @@
 PRINT_LIBRARY_STATUS("libkexiv2" "http://www.digikam.org/sharedlibs" " (version >= 1.1.0)" KEXIV2_FOR_DIGIKAM)
 PRINT_LIBRARY_STATUS("libkdcraw" "http://www.digikam.org/sharedlibs" " (version >= 1.1.0)" KDCRAW_FOR_DIGIKAM)
 
+IF(PGF_FOUND)
+    MESSAGE(STATUS " libpgf library found..................... YES (optional)")
+ELSE(PGF_FOUND)
+    MESSAGE(STATUS " libpgf library found..................... NO  (optional - internal version used instead)")
+ENDIF(GPHOTO2_FOUND)
+
+
 # ================================================================
 
 IF(GPHOTO2_FOUND)
@@ -1018,14 +1029,18 @@
         ${CMAKE_CURRENT_SOURCE_DIR}/libs/threadimageio/pgfutils.cpp
        )
 
-    SET(libpgf_SRCS
-        ${CMAKE_CURRENT_SOURCE_DIR}/libs/3rdparty/libpgf/Decoder.cpp
-        ${CMAKE_CURRENT_SOURCE_DIR}/libs/3rdparty/libpgf/Encoder.cpp
-        ${CMAKE_CURRENT_SOURCE_DIR}/libs/3rdparty/libpgf/PGFimage.cpp
-        ${CMAKE_CURRENT_SOURCE_DIR}/libs/3rdparty/libpgf/Stream.cpp
-        ${CMAKE_CURRENT_SOURCE_DIR}/libs/3rdparty/libpgf/Subband.cpp
-        ${CMAKE_CURRENT_SOURCE_DIR}/libs/3rdparty/libpgf/WaveletTransform.cpp
+    IF(PGF_FOUND)
+       INCLUDE_DIRECTORIES(${PGF_INCLUDE_DIRS})
+    ELSE(PGF_FOUND)
+       SET(libpgf_SRCS
+          ${CMAKE_CURRENT_SOURCE_DIR}/libs/3rdparty/libpgf/Decoder.cpp
+          ${CMAKE_CURRENT_SOURCE_DIR}/libs/3rdparty/libpgf/Encoder.cpp
+          ${CMAKE_CURRENT_SOURCE_DIR}/libs/3rdparty/libpgf/PGFimage.cpp
+          ${CMAKE_CURRENT_SOURCE_DIR}/libs/3rdparty/libpgf/Stream.cpp
+          ${CMAKE_CURRENT_SOURCE_DIR}/libs/3rdparty/libpgf/Subband.cpp
+          ${CMAKE_CURRENT_SOURCE_DIR}/libs/3rdparty/libpgf/WaveletTransform.cpp
        )
+    ENDIF(PGF_FOUND)
 
     SET(libsqlite2_SRCS
         ${CMAKE_CURRENT_SOURCE_DIR}/libs/3rdparty/sqlite2/attach.c
diff -u -r -N digikam-1.3.0-1-docs/cmake/modules/FindPGF.cmake digikam-1.3.0/cmake/modules/FindPGF.cmake
--- digikam-1.3.0-1-docs/cmake/modules/FindPGF.cmake	1970-01-01 01:00:00.000000000 +0100
+++ digikam-1.3.0/cmake/modules/FindPGF.cmake	2010-08-26 23:25:18.000000000 +0200
@@ -0,0 +1,15 @@
+# - Try to find libpgf
+# Once done this will define
+#
+#  PGF_FOUND - system has libgf
+#  PGF_INCLUDE_DIRS - the libpgf include directory
+#  PGF_LIBRARIES - Link these to use libpgf
+
+# PKG-CONFIG is required.
+INCLUDE(FindPkgConfig REQUIRED)
+
+IF(PKG_CONFIG_FOUND)
+	INCLUDE(FindPkgConfig)
+
+	PKG_CHECK_MODULES(PGF libpgf)
+ENDIF(PKG_CONFIG_FOUND)
diff -u -r -N digikam-1.3.0-1-docs/digikam/CMakeLists.txt digikam-1.3.0/digikam/CMakeLists.txt
--- digikam-1.3.0-1-docs/digikam/CMakeLists.txt	2010-06-07 23:16:45.000000000 +0200
+++ digikam-1.3.0/digikam/CMakeLists.txt	2010-08-26 23:39:47.000000000 +0200
@@ -53,7 +53,6 @@
                      # specific libs and utilities
                      ${CMAKE_CURRENT_SOURCE_DIR}/../libs/3rdparty/lprof
                      ${CMAKE_CURRENT_SOURCE_DIR}/../libs/3rdparty/sqlite2
-                     ${CMAKE_CURRENT_SOURCE_DIR}/../libs/3rdparty/libpgf
                      ${CMAKE_CURRENT_SOURCE_DIR}/../libs/3rdparty/clapack
                      ${CMAKE_CURRENT_SOURCE_DIR}/../libs/3rdparty/cimg
                      ${CMAKE_CURRENT_SOURCE_DIR}/../libs/themeengine
@@ -94,6 +93,12 @@
                      ${TIFF_INCLUDE_DIR}
                    )
 
+IF(PGF_FOUND)
+   INCLUDE_DIRECTORIES(${PGF_INCLUDE_DIRS})
+ELSE(PGF_FOUND)
+   INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/../libs/3rdparty/libpgf)
+ENDIF(PGF_FOUND)
+
 IF(LENSFUN_LIBRARY)
    INCLUDE_DIRECTORIES(${LENSFUN_INCLUDE_DIR})
 ENDIF(LENSFUN_LIBRARY)
@@ -103,8 +108,10 @@
 # Disable Clapack C code warnings.
 SET_SOURCE_FILES_PROPERTIES(${libclapack_SRCS} PROPERTIES COMPILE_FLAGS "-w")
 
-# Disable libpgf warnings.
-SET_SOURCE_FILES_PROPERTIES(${libpgf_SRCS} PROPERTIES COMPILE_FLAGS "-w")
+IF(NOT PGF_FOUND)
+   # Disable libpgf warnings.
+   SET_SOURCE_FILES_PROPERTIES(${libpgf_SRCS} PROPERTIES COMPILE_FLAGS "-w")
+ENDIF(NOT PGF_FOUND)
 
 # Disable liblqr C code warnings.
 SET_SOURCE_FILES_PROPERTIES(${liblqr_SRCS} PROPERTIES COMPILE_FLAGS "-w")
@@ -188,6 +195,10 @@
                       ${KIPI_LIBRARIES}
               )
 
+IF(PGF_FOUND)
+   TARGET_LINK_LIBRARIES(digikamcore ${PGF_LIBRARIES})
+ENDIF(PGF_FOUND)
+
 IF(MARBLEWIDGET_FOUND)
     TARGET_LINK_LIBRARIES(digikamcore ${LIBMARBLEWIDGET_LIBRARY})
 ENDIF(MARBLEWIDGET_FOUND)
@@ -246,6 +257,10 @@
                       ${QT_QTSQL_LIBRARY}
                      )
 
+IF(PGF_FOUND)
+   TARGET_LINK_LIBRARIES(digikamdatabase ${PGF_LIBRARIES})
+ENDIF(PGF_FOUND)
+
 SET_TARGET_PROPERTIES(digikamdatabase PROPERTIES VERSION 1.0.0 SOVERSION 1 )
 INSTALL(TARGETS digikamdatabase ${INSTALL_TARGETS_DEFAULT_ARGS} )
 
diff -u -r -N digikam-1.3.0-1-docs/libs/CMakeLists.txt digikam-1.3.0/libs/CMakeLists.txt
--- digikam-1.3.0-1-docs/libs/CMakeLists.txt	2010-06-07 23:16:40.000000000 +0200
+++ digikam-1.3.0/libs/CMakeLists.txt	2010-08-26 23:43:35.000000000 +0200
@@ -21,6 +21,10 @@
                      ${JASPER_INCLUDE_DIR}
                    )
 
+IF(PGF_FOUND)
+   INCLUDE_DIRECTORIES(${PGF_INCLUDE_DIRS})
+ENDIF(PGF_FOUND)
+
 ADD_SUBDIRECTORY( histogram )
 ADD_SUBDIRECTORY( dmetadata )
 ADD_SUBDIRECTORY( dimg )