Browse Source

* leave only builds with GraphicsMagic (broken with new versions of IM)

master
Alex 'AdUser' Z 4 years ago
parent
commit
2b2b6337bf
  1. 9
      CMakeLists.txt
  2. 5
      debian/control
  3. 14
      src/CMakeLists.txt
  4. 0
      src/samplers/graphicsmagick.c

9
CMakeLists.txt

@ -7,10 +7,11 @@ cmake_minimum_required(VERSION 2.6)
include(CTest)
include(GNUInstallDirs)
include(FindPkgConfig)
option(WITH_HARDENING "Enable hardening options" ON)
option(WITH_TOOLS "Build library management tools" ON)
set(SIMDB_SAMPLER "magick" CACHE STRING "Library for sampling")
set(SIMDB_SAMPLER "graphicsmagick" CACHE STRING "Library for sampling")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -pedantic -std=c99")
add_definitions("-D_XOPEN_SOURCE=500")
@ -25,8 +26,10 @@ if (${SIMDB_SAMPLER} STREQUAL "dummy")
set(SIMDB_SAMPLER "dummy")
elseif (${SIMDB_SAMPLER} STREQUAL "random")
set(SIMDB_SAMPLER "random")
else ()
set(SIMDB_SAMPLER "magick")
elseif (${SIMDB_SAMPLER} STREQUAL "graphicsmagick")
set(SIMDB_SAMPLER "graphicsmagick")
elseif (${SIMDB_SAMPLER} STREQUAL "imagemagick")
set(SIMDB_SAMPLER "imagemagick")
endif ()
message(STATUS "Project : ${CNAME} v${VERSION}")

5
debian/control vendored

@ -1,8 +1,9 @@
Source: libsimdb
Priority: optional
Maintainer: Alex 'AdUser' Z <ad_user@runbox.com>
Build-Depends: debhelper (>= 9), cmake, libgraphicsmagick1-dev,
graphicsmagick-libmagick-dev-compat
Build-Depends: debhelper (>= 9), cmake (>= 2.6), pkg-config,
libgraphicsmagick1-dev, graphicsmagick-libmagick-dev-compat
# libmagickcore-dev, libmagickwand-dev # <- original imagemagick
Standards-Version: 3.9.5
Section: libs
Homepage: https://github.com/AdUser/libsimdb

14
src/CMakeLists.txt

@ -6,10 +6,16 @@ set_target_properties("simdb" PROPERTIES
PUBLIC_HEADER "simdb.h"
)
if (${SIMDB_SAMPLER} STREQUAL "magick")
find_package(ImageMagick COMPONENTS MagickCore MagickWand)
target_link_libraries("simdb" ${ImageMagick_MagickCore_LIBRARY})
target_link_libraries("simdb" ${ImageMagick_MagickWand_LIBRARY})
if (${SIMDB_SAMPLER} STREQUAL "graphicsmagick")
pkg_check_modules(MAGICK REQUIRED GraphicsMagickWand)
target_include_directories("simdb" PUBLIC ${MAGICK_INCLUDE_DIRS})
target_link_libraries("simdb" ${MAGICK_LIBRARIES})
elseif (${SIMDB_SAMPLER} STREQUAL "imagemagick")
pkg_check_modules(MAGICK REQUIRED MagickWand)
target_include_directories("simdb" PUBLIC ${MAGICK_INCLUDE_DIRS})
target_link_libraries("simdb" ${MAGICK_LIBRARIES})
else ()
message(SEND_ERROR "can't find any sampler library")
endif ()
install(TARGETS "simdb" LIBRARY DESTINATION "lib" PUBLIC_HEADER DESTINATION "include")

0
src/samplers/magick.c → src/samplers/graphicsmagick.c

Loading…
Cancel
Save