Skip to content

Commit

Permalink
Make building rawspeed mandatory
Browse files Browse the repository at this point in the history
  • Loading branch information
pedrocr committed Dec 31, 2014
1 parent c4f4c76 commit ada2874
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 16 deletions.
1 change: 0 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ option(USE_OPENCL "Use OpenCL support." ON)
option(USE_GRAPHICSMAGICK "Use GraphicsMagick library for image import." ON)
option(USE_DARKTABLE_PROFILING OFF)
option(CUSTOM_CFLAGS "Don't override compiler optimization flags." OFF)
option(DONT_USE_RAWSPEED "Don't compile rawspeed back-end." OFF)
option(BUILD_USERMANUAL "Build all the versions of the usermanual." OFF)
option(BINARY_PACKAGE_BUILD "Sets march optimization to generic" OFF)
option(APRIL_FOOLS "Add the \"file manager\" (a shell) to lighttable mode" OFF)
Expand Down
17 changes: 7 additions & 10 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -495,16 +495,13 @@ add_subdirectory(external/LibRaw)
list(APPEND LIB_DEPS libraw_r)
list(APPEND STATIC_LIBS libraw_static)

# same for librawspeed (can switch it off with -DDONT_USE_RAWSPEED, for macs):
if(NOT DONT_USE_RAWSPEED)
add_definitions("-DHAVE_RAWSPEED")
add_library(rawspeed_static STATIC IMPORTED)
set_target_properties(rawspeed_static PROPERTIES IMPORTED_LOCATION ${CMAKE_CURRENT_BINARY_DIR}/external/rawspeed/librawspeed.a)
# compile rawspeed
add_subdirectory(external/rawspeed)
list(APPEND LIB_DEPS rawspeed)
list(APPEND STATIC_LIBS rawspeed_static)
endif(NOT DONT_USE_RAWSPEED)
# same for librawspeed
add_library(rawspeed_static STATIC IMPORTED)
set_target_properties(rawspeed_static PROPERTIES IMPORTED_LOCATION ${CMAKE_CURRENT_BINARY_DIR}/external/rawspeed/librawspeed.a)
# compile rawspeed
add_subdirectory(external/rawspeed)
list(APPEND LIB_DEPS rawspeed)
list(APPEND STATIC_LIBS rawspeed_static)

# osm gps map library
if(USE_GEO)
Expand Down
3 changes: 0 additions & 3 deletions src/common/imageio_rawspeed.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
You should have received a copy of the GNU General Public License
along with darktable. If not, see <http://www.gnu.org/licenses/>.
*/
#ifdef HAVE_RAWSPEED
#ifdef _OPENMP
#include <omp.h>
#endif
Expand Down Expand Up @@ -284,8 +283,6 @@ dt_imageio_retval_t dt_imageio_open_rawspeed_sraw(dt_image_t *img, RawImage r, d
return DT_IMAGEIO_OK;
}

#endif

// modelines: These editor modelines have been set for all relevant files by tools/update_modelines.sh
// vim: shiftwidth=2 expandtab tabstop=2 cindent
// kate: tab-indents: off; indent-width 2; replace-tabs on; indent-mode cstyle; remove-trailing-space on;
2 changes: 0 additions & 2 deletions src/common/imageio_rawspeed.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
You should have received a copy of the GNU General Public License
along with darktable. If not, see <http://www.gnu.org/licenses/>.
*/
#ifdef HAVE_RAWSPEED
#ifndef DT_IMAGEIO_RAWSPEED_H
#define DT_IMAGEIO_RAWSPEED_H
#ifdef __cplusplus
Expand All @@ -32,7 +31,6 @@ dt_imageio_retval_t dt_imageio_open_rawspeed(dt_image_t *img, const char *filena
}
#endif
#endif
#endif
// modelines: These editor modelines have been set for all relevant files by tools/update_modelines.sh
// vim: shiftwidth=2 expandtab tabstop=2 cindent
// kate: tab-indents: off; indent-width 2; replace-tabs on; indent-mode cstyle; remove-trailing-space on;

0 comments on commit ada2874

Please sign in to comment.