-
Notifications
You must be signed in to change notification settings - Fork 3
/
CMakeLists.txt
54 lines (41 loc) · 1.84 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
#-------------------------------------------------------------------------------
# CMAKE SETTINGS
#-------------------------------------------------------------------------------
cmake_minimum_required(VERSION 3.5)
project(minesweeper LANGUAGES CXX)
list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)
#-------------------------------------------------------------------------------
# PROJECT SETTINGS
#-------------------------------------------------------------------------------
include(gitInfo)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
# Ensure the output directory exists
file(MAKE_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
if(MSVC)
add_compile_options(/MP)
endif(MSVC)
#-------------------------------------------------------------------------------
# Qt Settings
#-------------------------------------------------------------------------------
if (WIN32)
set(Qt6_DIR $ENV{Qt6_DIR})
list(APPEND CMAKE_PREFIX_PATH ${Qt6_DIR})
message(STATUS "Qt6 DIR: ${Qt6_DIR}")
endif (WIN32)
find_package(Qt6 6.7.2 REQUIRED
COMPONENTS Core Gui Widgets StateMachine Concurrent Network
HINTS /opt/Qt/6.7.2/gcc_64)
qt_standard_project_setup()
#-------------------------------------------------------------------------------
# CONFIGURATION
#-------------------------------------------------------------------------------
set(APPLICATION_ORGANIZATION "Menari Softworks")
set(APPLICATION_ORGANIZATION_DOMAIN "https://github.com/nholthaus/")
#-------------------------------------------------------------------------------
# SUBDIRECTORIES
#-------------------------------------------------------------------------------
add_subdirectory(src)