mirror of https://github.com/klirichek/zj-58
'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)exp
parent
131d1d8b91
commit
fcd9b33fe5
@ -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 ()
|
||||
|
||||
|
Binary file not shown.
Loading…
Reference in new issue