Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 408323 | Differences between
and this patch

Collapse All | Expand All

(-)file_not_specified_in_diff (-24 / +32 lines)
Line  Link Here
0
-- darktable-0.9.3.orig/cmake/modules/FindLibraw.cmake
0
++ darktable-0.9.3/cmake/modules/FindLibraw.cmake
Line 0 Link Here
0
-- darktable-0.9.3.orig/src/CMakeLists.txt
1
# - Try to find libraw
2
# Once done, this will define
3
#
4
#  Libraw_FOUND - system has Libraw
5
#  Libraw_INCLUDE_DIRS - the Libraw include directories
6
#  Libraw_LIBRARIES - link these to use Libraw
7
8
include(LibFindMacros)
9
10
# Use pkg-config to get hints about paths
11
libfind_pkg_check_modules(Libraw_PKGCONF libraw)
12
13
# Include dir
14
find_path(Libraw_INCLUDE_DIR
15
  NAMES libraw.h
16
  PATHS ${Libraw_PKGCONF_INCLUDE_DIRS}
17
)
18
19
# Finally the library itself
20
find_library(Libraw_LIBRARY
21
  NAMES raw_r
22
  PATHS ${Libraw_PKGCONF_LIBRARY_DIRS}
23
)
24
25
# Set the include dir variables and the libraries and let libfind_process do the rest.
26
# NOTE: Singular variables for this library, plural for libraries this this lib depends on.
27
set(Libraw_PROCESS_INCLUDES Libraw_INCLUDE_DIR Libraw_INCLUDE_DIRS)
28
set(Libraw_PROCESS_LIBS Libraw_LIBRARY Libraw_LIBRARIES)
29
libfind_process(Libraw)
30
++ darktable-0.9.3/src/CMakeLists.txt
Lines 70-76 Link Here
70
70
71
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
71
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
72
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/external)
72
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/external)
73
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/external/LibRaw)
74
73
75
# initial compiler flags
74
# initial compiler flags
76
add_definitions("-DHAVE_CONFIG_H")
75
add_definitions("-DHAVE_CONFIG_H")
Lines 122-128 Link Here
122
endif(USE_CAMERA_SUPPORT)
121
endif(USE_CAMERA_SUPPORT)
123
122
124
# Find all the libs that don't require extra parameters
123
# Find all the libs that don't require extra parameters
125
foreach(lib ${OUR_LIBS} LensFun GIO GThread GModule Cairo PangoCairo PThread Rsvg2 GDK-PixBuf LibXml2 INotify Sqlite3 Exiv2  CURL PNG JPEG TIFF OpenEXR LCMS2)
124
foreach(lib ${OUR_LIBS} LensFun Libraw GIO GThread GModule Cairo PangoCairo PThread Rsvg2 GDK-PixBuf LibXml2 INotify Sqlite3 Exiv2  CURL PNG JPEG TIFF OpenEXR LCMS2)
126
  find_package(${lib} REQUIRED)
125
  find_package(${lib} REQUIRED)
127
  include_directories(${${lib}_INCLUDE_DIRS})
126
  include_directories(${${lib}_INCLUDE_DIRS})
128
  list(APPEND LIBS ${${lib}_LIBRARIES})
127
  list(APPEND LIBS ${${lib}_LIBRARIES})
Lines 306-328 Link Here
306
set_target_properties(lib_darktable PROPERTIES LINKER_LANGUAGE C)
305
set_target_properties(lib_darktable PROPERTIES LINKER_LANGUAGE C)
307
306
308
307
309
#
310
# the libraw part is a bit of a hack:
311
# the static linking didn't work since it was pulling -lstdc++ and -lm into linker flags.
312
# so we do a custom dependency and pretend an imported liblibraw_r.a so no other -l are
313
# appended.
314
#
315
add_dependencies(lib_darktable libraw_r)
316
add_library(libraw_static STATIC IMPORTED)
317
set_target_properties(libraw_static PROPERTIES IMPORTED_LOCATION ${CMAKE_CURRENT_BINARY_DIR}/external/LibRaw/liblibraw_r.a)
318
if(APPLE)
319
  set(LIBRAW_STATIC_LIBS libraw_static stdc++)
320
else(APPLE)
321
  set(LIBRAW_STATIC_LIBS libraw_static)
322
endif(APPLE)
323
324
target_link_libraries(lib_darktable ${LIBS} ${LIBRAW_STATIC_LIBS})
325
326
# same for librawspeed (can switch it off with -DDONT_USE_RAWSPEED, for macs):
308
# same for librawspeed (can switch it off with -DDONT_USE_RAWSPEED, for macs):
327
if(NOT DONT_USE_RAWSPEED)
309
if(NOT DONT_USE_RAWSPEED)
328
  add_definitions("-DHAVE_RAWSPEED")
310
  add_definitions("-DHAVE_RAWSPEED")
Lines 337-345 Link Here
337
install(TARGETS lib_darktable DESTINATION ${LIB_INSTALL}/darktable)
319
install(TARGETS lib_darktable DESTINATION ${LIB_INSTALL}/darktable)
338
list(APPEND LIBS lib_darktable)
320
list(APPEND LIBS lib_darktable)
339
321
340
# Compile libraw modules
341
add_subdirectory(external/LibRaw)
342
343
# Compile views modules
322
# Compile views modules
344
add_subdirectory(views)
323
add_subdirectory(views)
345
324

Return to bug 408323