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 9538f2a..0000000 Binary files a/rastertozj and /dev/null differ