-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
95 lines (85 loc) · 2 KB
/
CMakeLists.txt
File metadata and controls
95 lines (85 loc) · 2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
cmake_minimum_required (VERSION 3.5)
project(dymon VERSION 2.3.0)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O2 -std=gnu++17 -static-libgcc -static-libstdc++")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -s")
# derive version of the apps from the project version
# thus, all will have the same version, and it is only defined in one place (the project definition)
# this version shall be in sync with git tag
add_compile_definitions(
APP_VERSION="${CMAKE_PROJECT_VERSION}"
)
include_directories(
libs/cjson
libs/cpp-httplib
libs/argtable3
libs/base64
src/barcode
src/bitmap
src/bitmap/fonts
src/dymon
src
)
if(WIN32)
set(dymon_x
src/dymon/dymon_net_win32.cpp
src/dymon/dymon_usb_win32.cpp
src/usbprint_win32.c
)
else()
set(dymon_x
src/dymon/dymon_net_linux.cpp
src/dymon/dymon_usb_linux.cpp
)
endif()
#print bitmap-files from command line
add_executable(dymon_pbm
libs/argtable3/argtable3.c
src/dymon/dymon.cpp
src/dymon/dymon_bitmap.cpp
${dymon_x}
src/main_dymon_pbm.cpp
)
if(WIN32)
target_link_libraries(dymon_pbm
ws2_32
setupapi
)
endif()
#printserver/webserver
add_executable(dymon_srv
libs/cjson/cJSON.c
libs/argtable3/argtable3.c
libs/base64/base64.c
src/bitmap/bitmap.cpp
src/bitmap/bitmap_fromText.cpp
src/bitmap/glyphIterator.cpp
src/bitmap/utf8decoder.cpp
src/barcode/barcodeEan8.cpp
src/dymon/dymon.cpp
src/dymon/dymon_bitmap.cpp
src/dymon/dymon_file.cpp
${dymon_x}
src/main_dymon_srv.cpp
src/text_label.cpp
src/labelwriter_html.c
src/wpm_html.c
)
target_link_libraries(dymon_srv
pthread
)
if(WIN32)
target_link_libraries(dymon_srv
ws2_32
setupapi
)
endif()
#text to pbm tool
add_executable(txt2pbm
libs/argtable3/argtable3.c
src/bitmap/bitmap.cpp
src/bitmap/bitmap_fromText.cpp
src/bitmap/glyphIterator.cpp
src/bitmap/utf8decoder.cpp
src/barcode/barcodeEan8.cpp
txt2pbm/main.cpp
)