forked from mcgrew/dwrandomizer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
51 lines (42 loc) · 1.34 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
# This is the cmake build file for the project. This works on Linux, but
# not Windows, so I will be using qmake instead. Keeping this around for
# a bit, just in case.
cmake_minimum_required(VERSION 3.7)
project(dwrandomizer)
set(CMAKE_CXX_STANDARD 11)
#set(CMAKE_BUILD_TYPE Debug)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC")
find_package(Qt5 COMPONENTS Gui Widgets)
# Compile the command line version
include_directories(common)
set(CLI_SOURCE_FILES
common/crc64.c
common/sprites.c
common/dwr.c
common/map.c
common/mt19937-64.c
common/chaos.c
common/patch.c
cli/main.c)
add_executable(dwrandomizer-cli ${CLI_SOURCE_FILES})
target_link_libraries(dwrandomizer-cli m)
if(Qt5Widgets_FOUND)
set (CMAKE_AUTOMOC ON)
include_directories(common /usr/include/qt)
set (UI_SOURCE_FILES
common/crc64.c
common/sprites.c
common/dwr.c
common/map.c
common/mt19937-64.c
common/chaos.c
common/patch.c
ui/main-window.cpp
ui/widgets.cpp
ui/main.cpp)
add_executable(dwrandomizer ${UI_SOURCE_FILES})
target_link_libraries(dwrandomizer Qt5::Widgets Qt5::Gui)
else ()
message("Could not find Qt modules, skipping GUI build.")
endif()