summary refs log tree commit diff stats
path: root/CMakeLists.txt
blob: 82e9d64bdc098bb8047e0db888a9c8e6757a0127 (plain) (blame)
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
cmake_minimum_required (VERSION 3.1)
project (wizard)

set(CMAKE_BUILD_TYPE Debug)

find_package(PkgConfig)
pkg_check_modules(tesseract tesseract REQUIRED)
pkg_check_modules(lept lept REQUIRED)
pkg_check_modules(GraphicsMagick GraphicsMagick++ REQUIRED)
pkg_check_modules(tclap tclap REQUIRED)
pkg_check_modules(curlcpp curlcpp REQUIRED)
find_package(websocketpp)

include_directories(
  vendor/json
  vendor/hkutil
  vendor/asio/asio/include
  vendor/base64/include
  ${tesseract_INCLUDE_DIRS}
  ${lept_INCLUDE_DIRS}
  ${GraphicsMagick_INCLUDE_DIRS}
  ${curlcpp_INCLUDE_DIRS}
  ${tclap_INCLUDE_DIRS}
  ${WEBSOCKETPP_INCLUDE_DIR}
)

link_directories(
  ${tesseract_LIBRARY_DIRS}
  ${lept_LIBRARY_DIRS}
  ${GraphicsMagick_LIBRARY_DIRS}
  ${curlcpp_LIBRARY_DIRS}
  ${websocketpp_LIBRARY_DIRS}
)

add_library(wizard cardset.cpp imagestore.cpp designer.cpp wizard.cpp)
set_property(TARGET wizard PROPERTY CXX_STANDARD 17)
set_property(TARGET wizard PROPERTY CXX_STANDARD_REQUIRED ON)
target_link_libraries(
  wizard
  ${tesseract_LIBRARIES}
  ${lept_LIBRARIES}
  ${GraphicsMagick_LIBRARIES}
  ${curlcpp_LIBRARIES}
)

add_executable(wizard_gen main.cpp)
set_property(TARGET wizard_gen PROPERTY CXX_STANDARD 17)
set_property(TARGET wizard_gen PROPERTY CXX_STANDARD_REQUIRED ON)
target_link_libraries(
  wizard_gen
  wizard
)

add_executable(wizard_server server_main.cpp)
set_property(TARGET wizard_server PROPERTY CXX_STANDARD 17)
set_property(TARGET wizard_server PROPERTY CXX_STANDARD_REQUIRED ON)
target_link_libraries(
  wizard_server
  wizard
  ${websocketpp_LIBRARIES}
)