-
Notifications
You must be signed in to change notification settings - Fork 41
/
CMakeLists.txt
42 lines (37 loc) · 1.35 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
cmake_minimum_required(VERSION 3.18.4)
project(quickbox LANGUAGES C CXX)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
include(CTest)
set(CMAKE_SHARED_LIBRARY_PREFIX "") # we don't want CMake to prepend "lib" to our libraries, we prefer adding that ourselves
if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang" OR CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
set(CMAKE_CXX_FLAGS "-Wall -Wextra -pedantic ${CMAKE_CXX_FLAGS}")
endif()
if (NOT TARGET libnecrolog)
add_subdirectory(3rdparty/necrolog)
endif()
if(USE_QT6)
find_package(Qt6 6.4 REQUIRED COMPONENTS Core Widgets Gui Sql Qml Xml LinguistTools PrintSupport Svg SerialPort Multimedia Network)
set(Qt_FOUND ${Qt6_FOUND})
else()
find_package(Qt5 5.11 REQUIRED COMPONENTS Core Widgets Gui Sql Qml Xml LinguistTools PrintSupport Svg SerialPort Multimedia Network)
set(Qt_FOUND ${Qt5_FOUND})
endif()
if(Qt_FOUND)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTORCC ON)
add_subdirectory(libqf)
if(NOT LIBQF_ONLY AND NOT USE_QT6)
add_subdirectory(libsiut)
add_subdirectory(libquickevent)
add_subdirectory(quickevent)
add_subdirectory(quickhttpd)
add_subdirectory(quickshow)
add_subdirectory(tools/qsqlmon)
else()
message(STATUS "Building libqf only")
endif()
else()
message(FATAL_ERROR "Qt5 not found")
endif()