~ubuntu-branches/ubuntu/saucy/darktable/saucy

« back to all changes in this revision

Viewing changes to src/CMakeLists.txt

  • Committer: Bazaar Package Importer
  • Author(s): David Bremner
  • Date: 2011-07-12 09:36:46 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20110712093646-yp9dbxan44dmw15h
Tags: 0.9-1
* New upstream release.
* Remove all patches now upstream; only patch for
  -Wno-error=unused-but-set-variable remains.
* Bump Standards-Version to 3.9.2 (no changes)

Show diffs side-by-side

added added

removed removed

Lines of Context:
31
31
  "common/variables.c" 
32
32
  "common/pwstorage/pwstorage.c" 
33
33
  "common/pwstorage/backend_gconf.c"
 
34
  "common/opencl.c"
 
35
  "common/dynload.c"
 
36
  "common/dlopencl.c"
34
37
  "control/control.c"  
35
38
  "control/jobs/control_jobs.c"  
36
39
  "control/jobs/develop_jobs.c"  
39
42
  "develop/develop.c"
40
43
  "develop/imageop.c"
41
44
  "develop/pixelpipe.c"
 
45
  "develop/blend.c"
42
46
  "dtgtk/*.c" 
43
47
  "gui/background_jobs.c"  
44
48
  "gui/contrast.c"  
55
59
  "libs/lib.c"
56
60
  "views/view.c"
57
61
  )
58
 
FILE(GLOB HEADER_FILES "*.h" "common/*.h" "control/*.h" "iop/*.h" "libs/*.h", "views/*.h")
 
62
FILE(GLOB HEADER_FILES "*.h" "common/*.h" "external/CL/*.h" "control/*.h" "iop/*.h" "libs/*.h", "views/*.h")
59
63
 
60
64
set(SOURCES ${SOURCE_FILES} ${HEADER_FILES})
61
65
 
83
87
#
84
88
# Find all other required libraries for building
85
89
#
86
 
find_package(GTK2 2.6 REQUIRED gtk glade)
 
90
find_package(GTK2 2.6 REQUIRED gtk)
87
91
include_directories(${GTK2_INCLUDE_DIRS})
88
92
list(APPEND LIBS ${GTK2_LIBRARIES})
89
93
add_definitions(${GTK2_DEFINITIONS})
113
117
endif(USE_CAMERA_SUPPORT)
114
118
 
115
119
# Find all the libs that don't require extra parameters
116
 
foreach(lib ${OUR_LIBS} LensFun GThread GModule PangoCairo PThread Rsvg2 GDK-PixBuf LibXml2 INotify Sqlite3 Exiv2  CURL PNG JPEG TIFF OpenEXR LCMS2)
 
120
foreach(lib ${OUR_LIBS} LensFun GIO GThread GModule Cairo PangoCairo PThread Rsvg2 GDK-PixBuf LibXml2 INotify Sqlite3 Exiv2  CURL PNG JPEG TIFF OpenEXR LCMS2)
117
121
  find_package(${lib} REQUIRED)
118
122
  include_directories(${${lib}_INCLUDE_DIRS})
119
123
  list(APPEND LIBS ${${lib}_LIBRARIES})
156
160
  add_definitions("-DHAVE_GKEYRING")
157
161
endif(GNOMEKEYRING_FOUND)
158
162
 
159
 
find_package(OpenCL)
160
 
if(OPENCL_FOUND)
161
 
  include_directories(${OPENCL_INCLUDE_DIR})
162
 
  list(APPEND LIBS ${OPENCL_LIBRARIES})
163
 
  list(APPEND SOURCES "common/opencl.c")
164
 
  add_definitions("-DHAVE_OPENCL")
165
 
endif(OPENCL_FOUND)
166
 
 
167
 
 
 
163
# have a small test program, to be run as root on some systems to enable the driver to run cl stuff
 
164
add_subdirectory(cltest)
 
165
 
 
166
# build opengl slideshow viewer?
 
167
find_package(SDL)
 
168
find_package(OpenGL)
 
169
if(SDL_FOUND AND OPENGL_FOUND)
 
170
  add_subdirectory(dtview)
 
171
endif(SDL_FOUND AND OPENGL_FOUND)
 
172
 
 
173
# needed for the file manager
 
174
if(APRIL_FOOLS)
 
175
  find_package(VTE)
 
176
  if(VTE_FOUND)
 
177
    include_directories(${VTE_INCLUDE_DIRS})
 
178
    list(APPEND LIBS ${VTE_LIBRARIES})
 
179
  endif(VTE_FOUND)
 
180
endif(APRIL_FOOLS)
168
181
 
169
182
#
170
183
# Add HAVE_xxx defines used by darktable
185
198
  add_definitions("-DHAVE_OPENEXR")
186
199
endif(OPENEXR_FOUND)
187
200
 
 
201
if(USE_OPENCL)
 
202
  include_directories(${CMAKE_CURRENT_SOURCE_DIR}/external)
 
203
  add_definitions("-DHAVE_OPENCL")
 
204
endif(USE_OPENCL)
 
205
 
188
206
 
189
207
if(GPHOTO2_FOUND)
190
208
  set(SOURCES ${SOURCES} "common/camera_control.c" "control/jobs/camera_jobs.c" "gui/camera_import_dialog.c" "gui/devices.c" )
236
254
#
237
255
add_custom_command(
238
256
   OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/preferences_gen.h
239
 
   COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/../tools/create_preferences.sh ${CMAKE_CURRENT_SOURCE_DIR}/../data/darktable.schemas > ${CMAKE_CURRENT_BINARY_DIR}/preferences_gen.h
 
257
   COMMAND ${CMAKE_CURRENT_BINARY_DIR}/../create_preferences.sh ${CMAKE_CURRENT_SOURCE_DIR}/../data/darktable.schemas > ${CMAKE_CURRENT_BINARY_DIR}/preferences_gen.h
240
258
)
 
259
SET_SOURCE_FILES_PROPERTIES(${CMAKE_CURRENT_BINARY_DIR}/preferences_gen.h PROPERTIES GENERATED 1)
241
260
 
242
261
#
243
262
# Generate mapping of key strings to internal metadata id
246
265
   OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/metadata_gen.h ${CMAKE_CURRENT_BINARY_DIR}/metadata_gen.c
247
266
   COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/../tools/create_metadata.sh ${CMAKE_CURRENT_SOURCE_DIR}/../tools/metadata.txt ${CMAKE_CURRENT_BINARY_DIR}
248
267
)
 
268
SET_SOURCE_FILES_PROPERTIES(${CMAKE_CURRENT_BINARY_DIR}/metadata_gen.c PROPERTIES GENERATED 1)
 
269
SET_SOURCE_FILES_PROPERTIES(${CMAKE_CURRENT_BINARY_DIR}/metadata_gen.h PROPERTIES GENERATED 1)
 
270
# this is a dummy library whose sole purpose is to serve as a dependency for subdirs, such as imageio/storage/gallery.
 
271
# cmake can't depend on custom targets in other directories than the current one.
 
272
add_library(metadata_dummy ${CMAKE_CURRENT_BINARY_DIR}/metadata_gen.c ${CMAKE_CURRENT_BINARY_DIR}/metadata_gen.h)
249
273
 
250
274
#
251
275
# build libdarktable
280
304
  add_subdirectory(rawspeed)
281
305
endif(NOT DONT_USE_RAWSPEED)
282
306
 
283
 
install(TARGETS lib_darktable DESTINATION ${CMAKE_INSTALL_PREFIX}/${LIB_INSTALL}/darktable)
 
307
install(TARGETS lib_darktable DESTINATION ${LIB_INSTALL}/darktable)
284
308
list(APPEND LIBS lib_darktable)
285
309
 
286
310
# Compile libraw modules
295
319
# Compile darkroom modules
296
320
add_subdirectory(iop)
297
321
 
298
 
# Compile darkroom modules
 
322
# Compile export modules
299
323
add_subdirectory(imageio)
300
324
 
301
325