forked from sokirko74/aot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
executable file
·64 lines (46 loc) · 1.84 KB
/
CMakeLists.txt
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
project(aot)
set(CMAKE_LEGACY_CYGWIN_WIN32 0)
macro (declare_cmake_min_version)
cmake_minimum_required(VERSION 3.16)
endmacro(declare_cmake_min_version)
declare_cmake_min_version()
set(BUILD_DICTS 1) # build dicts by default, disable it in CMakeLists.my if you want
set(BUILD_COM 0) # do not build windows-objects by default
set(BUILD_HTTP_SERVERS 0) # do not build http-servers by default (you need to make libevent to build it)
set(BUILD_WINDOWS_GUI 0) # do not build microsoft windows gui by default
set(DICTS_FOLDER ${PROJECT_SOURCE_DIR}/Dicts )
if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.my)
message ("use " ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.my)
include (${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.my)
endif()
set (RML $ENV{RML})
#set (INSTALL_BIN_FOLDER $ENV{RML}/Bin)
#set (RML ${CMAKE_CURRENT_SOURCE_DIR})
message ("RML=" ${RML})
set (INSTALL_BIN_FOLDER /Bin) # not "Bin", but "/Bin"
if (NOT RML)
message (FATAL_ERROR "environment variable RML is not set")
endif (NOT RML)
message ("use environment variable RML = " ${RML} )
macro (ConvertStructDict name)
add_custom_target(
${name}
SOURCES ${PROJECT_SOURCE_DIR}/units.bin
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
)
add_custom_command(
OUTPUT ${PROJECT_SOURCE_DIR}/units.bin ${PROJECT_SOURCE_DIR}/cortege.bin ${PROJECT_SOURCE_DIR}/comments.bin
COMMAND StructDictLoader --action from_txt --input-file ross.txt --output-ross-folder .
DEPENDS StructDictLoader ross.txt fields.json domains.json
COMMENT "Convert StructDict for ${name} to the binary format"
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
VERBATIM
)
endmacro(ConvertStructDict)
enable_testing()
add_subdirectory (Source)
if (BUILD_DICTS)
message ("build dicts...")
add_subdirectory (Dicts)
add_subdirectory (Thes)
endif()