-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
50 lines (41 loc) · 1.1 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
cmake_minimum_required(VERSION 3.16)
project(honors_project VERSION 1.0.0 LANGUAGES CXX)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
# Find Qt packages
find_package(Qt6 REQUIRED COMPONENTS Core Widgets Sql)
# Include directories
include_directories(${CMAKE_SOURCE_DIR}/include)
# Add subdirectory
add_subdirectory(src)
add_subdirectory(tests) # TEST ONLY PURPOSES
# Source files
set(SOURCES
src/main.cpp
src/auth/authenticator.cpp
src/auth/email_validator.cpp
src/auth/user_session.cpp
src/ui/login_window.cpp
src/ui/registration_window.cpp
src/ui/mainshop_window.cpp
)
# Header files
set(HEADERS
include/auth/authenticator.h
include/auth/email_validator.h
include/auth/user_session.h
include/ui/login_window.h
include/ui/registration_window.h
include/ui/mainshop_window.h
)
# Create executable
add_executable(${PROJECT_NAME} ${SOURCES} ${HEADERS})
# Link Qt libraries
target_link_libraries(${PROJECT_NAME} PRIVATE
Qt6::Core
Qt6::Widgets
Qt6::Sql # My database
)