-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
36 lines (28 loc) · 1022 Bytes
/
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
# attach to vcpkg's cmake configuration for project dependencies
set(CMAKE_TOOLCHAIN_FILE ../vcpkg/scripts/buildsystems/vcpkg.cmake)
cmake_minimum_required(VERSION 3.10)
project(qt_test_app
DESCRIPTION "A basic Qt application with C++"
VERSION 1.0.0
LANGUAGES CXX)
# Generate compile_commands.json for LLVM tooling
set(CMAKE_EXPORT_COMPILE_COMMANDS ON CACHE INTERNAL "")
if (NOT DEFINED CMAKE_CXX_STANDARD)
set(CMAKE_CXX_STANDARD 20)
endif()
if (NOT CMAKE_BUILD_TYPE OR CMAKE_BUILD_TYPE STREQUAL "")
set(CMAKE_BUILD_TYPE "Release" CACHE STRING "" FORCE)
endif()
OPTION( COMMON_BIN_DIRECTORY "Puts all libs and binaries in bin/" ON )
IF( COMMON_BIN_DIRECTORY )
set (LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
set (EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
ENDIF()
find_package(Qt5Core REQUIRED)
find_package(Qt5Gui REQUIRED)
find_package(Qt5Widgets REQUIRED)
set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
#include_directories( include )
add_subdirectory( src )