-
Notifications
You must be signed in to change notification settings - Fork 5
/
CMakeLists.txt
56 lines (54 loc) · 1.42 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
cmake_minimum_required (VERSION 3.14)
project (ETCS)
set(CMAKE_CXX_STANDARD 17)
include(CPack)
include(GNUInstallDirs)
if (WIN32)
set (CMAKE_INSTALL_BINDIR .)
set (CMAKE_INSTALL_LIBDIR .)
set (CMAKE_INSTALL_DATADIR .)
set (ETCS_ASSET_DIR .)
set (ETCS_CONFIG_DIR .)
else()
set (ETCS_ASSET_DIR ${CMAKE_INSTALL_DATADIR}/ETCS)
set (ETCS_CONFIG_DIR ${CMAKE_INSTALL_FULL_SYSCONFDIR}/ETCS)
endif()
option(SIMRAIL "SimRail" OFF)
option(DEBUG_VERBOSE "Print debug messages" ON)
if (NOT ${CMAKE_SYSTEM_PROCESSOR} MATCHES "wasm.*")
set (WASM FALSE)
else()
set (WASM TRUE)
endif()
set(RADIO_CFM OFF)
if (NOT WASM)
if (NOT SIMRAIL)
set (RADIO_CFM ON)
endif()
option(ETCS_VENDORED "Use vendored libraries" ON)
if (WIN32)
option(ETCS_PACK_VENDORED "Pack vendored libraries" ON)
else()
option(ETCS_PACK_VENDORED "Pack vendored libraries" OFF)
endif()
endif()
if (SIMRAIL)
add_definitions(-DSIMRAIL)
endif()
if (RADIO_CFM)
add_definitions(-DRADIO_CFM)
endif()
if (WIN32)
add_definitions(-D_WIN32_WINNT=0x602)
endif()
add_definitions(-DBASELINE=3)
add_subdirectory(EVC)
add_subdirectory(DMI)
if (NOT ANDROID AND NOT WASM)
install(DIRECTORY config/ DESTINATION ${ETCS_CONFIG_DIR})
if (WIN32)
install(PROGRAMS utils/ETCS.bat DESTINATION ${CMAKE_INSTALL_BINDIR} )
else()
install(PROGRAMS utils/etcs DESTINATION ${CMAKE_INSTALL_BINDIR} )
endif()
endif()