From fcd9b33fe58cb2ffca7da568ef6b856fe73a19de Mon Sep 17 00:00:00 2001 From: "Alexey N. Vinogradov" Date: Sat, 16 Mar 2019 15:23:58 +0700 Subject: [PATCH] Initial CMakeLists 'Pure proof-of-concept' project like this usually written from scratch using most primitive and wide-spread tools like 'make'. I've started this project by disassembling original chinese filter which was distributed with printer itself, and originally it is a kind of reversed code 'just force it to work anyway', which is essentially is just a working piece of shit. Now I see dozen of bugs reported and even pull-requests, so I think I can spend a bit of my time to this pet. First, I use Jetbrains Clion for my main project where I work. CLion projects are actually CMake projects, so let's add a rudimental CMakeList to make it piece buildable from normal IDE. Also pre-built filter I've considered as not so significant to keep it in this open-source proj (anyone can rebuild it anytime from scratch) --- CMakeLists.txt | 21 +++++++++++++++++++++ rastertozj | Bin 18816 -> 0 bytes 2 files changed, 21 insertions(+) create mode 100644 CMakeLists.txt delete mode 100755 rastertozj diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..3635049 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,21 @@ +cmake_minimum_required ( VERSION 3.12 ) + +project ( rastertozj C ) + +find_package ( Cups REQUIRED ) +find_library ( CUPSIMAGELIB NAMES cupsimage ) +mark_as_advanced ( CUPSIMAGELIB ) + +set ( DEBUGFILE "/tmp/debugraster.txt" CACHE STRING "File where to make debug output if DEBUGP is set" ) +option ( DEBUGP "Whetner to output debug info" ON ) + +add_executable ( rastertozj rastertozj.c ) +target_compile_options ( rastertozj PRIVATE -Wall -fPIC -O3 ) +target_include_directories ( rastertozj PRIVATE ${CUPS_INCLUDE_DIR} ) +target_link_libraries ( rastertozj PRIVATE ${CUPS_LIBRARIES} ${CUPSIMAGELIB} ) + +if ( DEBUGP ) + target_compile_definitions ( rastertozj PRIVATE DEBUGP DEBUGFILE="${DEBUGFILE}") +endif () + + diff --git a/rastertozj b/rastertozj deleted file mode 100755 index 9538f2a7cc2b4520d741e894cd5af77084734a65..0000000000000000000000000000000000000000 GIT binary patch literal 0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