cd /app-tests \
|| errlog "could not change direcotry to /app-tests" \
|| return $?
- cmake -DRUN_TESTS=ON /source \
+ cmake -DCMAKE_BUILD_TYPE=Debug -DRUN_TESTS=ON /source \
|| errlog "could not create tests with cmake" \
|| return $?
echo "ℹ️ INFO: run tests"
make -j$(nproc) \
|| errlog "tests failed" \
|| return $?
+
+ mkdir -p /app-imagemagick-tests \
+ || errlog "could not create folder /app-imagemagick-tests" \
+ || return $?
+ cd /app-imagemagick-tests \
+ || errlog "could not change direcotry to /app-imagemagick-tests" \
+ || return $?
+ cmake -DCMAKE_BUILD_TYPE=Debug -DRUN_TESTS=ON -DIMAGEMAGICK=ON /source \
+ || errlog "could not create tests with cmake" \
+ || return $?
+ echo "ℹ️ INFO: run imagemagick tests"
+ make -j$(nproc) \
+ || errlog "tests failed" \
+ || return $?
}
build_package()
{
+
mkdir -p /app-build \
|| errlog "could not create folder /app-build" \
|| return $?
cd /app-build \
|| errlog "could not change directory to /app-build" \
|| return $?
- source /etc/os-release \
- || errlog "could not load /etc/os-release" \
- || retrun $?
cmake -DEXTRA_VERSION="-$VERSION_CODENAME" \
-DCMAKE_BUILD_TYPE=Release /source \
|| errlog "could not create build with cmake" \
make -j$(nproc) package \
|| errlog "could not build package" \
|| return $?
+
+ mkdir -p /app-imagemagick-build \
+ || errlog "could not create folder /app-imagemagick-build " \
+ || return $?
+ cd /app-imagemagick-build \
+ || errlog "could not change directory to /app-imagemagick-build " \
+ || return $?
+ cmake -DEXTRA_VERSION="-imagemagick-$VERSION_CODENAME" \
+ -DCMAKE_BUILD_TYPE=Release -DIMAGEMAGICK=ON /source \
+ || errlog "could not create build with cmake" \
+ || return $?
+ echo "ℹ️ INFO: build imagemagick package"
+ make -j$(nproc) package \
+ || errlog "could not build imagemagick package" \
+ || return $?
}
copy_package()
{
- source /etc/os-release \
- || errlog "could not load /etc/os-release" \
- || return $?
mkdir -p /source/build-$VERSION_CODENAME \
|| errlog "could not create directory /source/build-$VERSION_CODENAME" \
|| return $?
cp /app-build/*.deb /source/build-$VERSION_CODENAME \
|| errlog "could not copy package to /source/build-$VERSION_CODENAME" \
|| return $?
+ cp /app-imagemagick-build/*.deb /source/build-$VERSION_CODENAME \
+ || errlog "could not copy package to /source/build-$VERSION_CODENAME" \
+ || return $?
}
main()
{
echo "⭐ START: run"
+ source /etc/os-release \
+ || errlog "could not load /etc/os-release" \
+ || return $?
run_tests || return $?
build_package || return $?
copy_package || return $?
if(IMAGEMAGICK)
find_package(ImageMagick COMPONENTS MagickCore REQUIRED)
message(STATUS "find ImageMagick: ${ImageMagick_LIBRARIES}")
- message(STATUS "ImageMagick_VERSION_STRING: ${ImageMagick_VERSION_STRING}")
- string(SUBSTRING ${ImageMagick_VERSION_STRING} 0 1 IMAGE_MAGICK_MAJOR)
- message(STATUS "define IMAGE_MAGICK_MAJOR: ${IMAGE_MAGICK_MAJOR}")
- add_compile_definitions(IMAGE_MAGICK_MAJOR=${IMAGE_MAGICK_MAJOR})
- if(${IMAGE_MAGICK_MAJOR} EQUAL 7)
- list(APPEND ImageMagick_INCLUDE_DIRS
- /usr/include/x86_64-linux-gnu/ImageMagick-7)
- endif()
message(STATUS "ImageMagick_INCLUDE_DIRS: ${ImageMagick_INCLUDE_DIRS}")
else()
find_library(netpbm NAMES netpbm REQUIRED)
#define MAGICKCORE_QUANTUM_DEPTH 16
#define MAGICKCORE_HDRI_ENABLE 0
-#ifndef IMAGE_MAGICK_MAJOR
-#define IMAGE_MAGICK_MAJOR 6
-#endif
-
-#if IMAGE_MAGICK_MAJOR == 6
-#include <magick/MagickCore.h>
-#endif
-#if IMAGE_MAGICK_MAJOR == 7
#include <MagickCore/MagickCore.h>
-#endif
#include <string.h>
#include "kds_s2000w_image_converter.h"
#include "kds_s2000w_image_type_check.h"