-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
77 lines (59 loc) · 1.57 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
cmake_minimum_required(VERSION 3.4.1 FATAL_ERROR)
project(scx CXX)
enable_testing()
# Globally C++14
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
# Unicode for MSVC
if(MSVC)
add_definitions(-DUNICODE -D_UNICODE)
endif()
# QT 5
#set(CMAKE_INCLUDE_CURRENT_DIR ON)
#set(CMAKE_AUTOMOC ON)
#find_package(Qt5Core)
# Boost
if(MSVC)
# Boost headers use #pragma link for MSVC, giving the
# static library names. So just go with it...
set(Boost_USE_STATIC_LIBS ON)
endif()
find_package(Boost REQUIRED COMPONENTS date_time locale)
#add_definitions("${Boost_LIB_DIAGNOSTIC_DEFINITIONS}")
# Our own stuff
include_directories("${PROJECT_SOURCE_DIR}/src")
add_library(scx
src/scx.hpp
src/SCXFile.cpp
src/SCXFile.hpp
src/AssetName.hpp
src/AssetName.cpp
src/Scene.hpp
src/Scene.cpp
src/Table1Data.hpp
src/Table1Data.cpp
src/Variable.hpp
src/Variable.cpp
)
target_include_directories(scx PUBLIC ${Boost_INCLUDE_DIRS})
target_link_libraries(scx PUBLIC ${Boost_LIBRARIES})
target_include_directories(scx PUBLIC gsl)
# This didn't work...
# http://stackoverflow.com/a/20165220 for reference
#set_property(TARGET scx
# PROPERTY CXX_STANDARD 14
# PROPERTY CXX_STANDARD_REQUIRED ON)
add_executable(test_scx
unit_test/test_SCXFile.cpp
)
target_include_directories(test_scx PRIVATE catch)
target_link_libraries(test_scx scx)
add_test(test_scx test_scx)
add_executable(export_variables
gettext_converter/export_variables.cpp
)
target_link_libraries(export_variables scx)
add_executable(export_scenes
gettext_converter/export_scenes.cpp
)
target_link_libraries(export_scenes scx)