-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
74 lines (57 loc) · 1.6 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
cmake_minimum_required(VERSION 3.20.4)
project(qtGameOfLife VERSION 1.0.0 LANGUAGES CXX)
# set(CMAKE_CXX_STANDARD 11)
# set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
find_package(Qt5Widgets REQUIRED)
find_package(Qt5Core REQUIRED)
# find_package(Qt5OpenGL REQUIRED)
# find_package(OpenGL REQUIRED)
# find_package(GLUT REQUIRED)
# Find includes in corresponding build directories.
# set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOUIC ON)
# Instruct Cmake to run automatically when needed.
set(CMAKE_AUTOMOC ON)
# set(CMAKE_AUTORCC ON)
set(_INCLUDE_DIRS
# GL
# /usr/include
# Qt5
${Qt5Widgets_INCLUDES}
# local
${CMAKE_CURRENT_LIST_DIR}/include)
include_directories(${_INCLUDE_DIRS}
# ${PROJECT_SOURCE_DIR}
${PROJECT_BINARY_DIR}
# ${OPENGL_INCLUDE_DIRS}
# ${GLUT_INCLUDE_DIRS})
)
set(_UI
# ${CMAKE_CURRENT_LIST_DIR}/src/MyGrid.ui
)
set(_HEADERS
${CMAKE_CURRENT_LIST_DIR}/include/Cell.h
${CMAKE_CURRENT_LIST_DIR}/include/Cells.h
${CMAKE_CURRENT_LIST_DIR}/include/GameOfLifeWidget.h
)
set(_SOURCES
${CMAKE_CURRENT_LIST_DIR}/src/Cell.cpp
${CMAKE_CURRENT_LIST_DIR}/src/Cells.cpp
${CMAKE_CURRENT_LIST_DIR}/src/GameOfLifeWidget.cpp
${CMAKE_CURRENT_LIST_DIR}/src/main.cpp
)
qt5_wrap_cpp(qtGrid_header_moc ${_HEADERS})
# qt5_wrap_ui(qtGrid_ui_moc ${_UI})
add_executable(qtGameOfLife
${qtGrid_header_moc}
# ${qtGrid_ui_moc}
${_SOURCES}
)
target_link_libraries(qtGameOfLife
# Qt5::Gui
Qt5::Widgets
)
if (CMAKE_TESTING_ENABLED)
add_subdirectory(test)
endif()