29 lines
806 B
CMake
Raw Normal View History

2022-08-17 17:59:48 +03:00
#
# Copyright (C) 2021-2022 QuasarApp.
# Distributed under the GPLv3 software license, see the accompanying
# Everyone is permitted to copy and distribute verbatim copies
# of this license document, but changing it is not allowed.
#
cmake_minimum_required(VERSION 3.18)
2022-08-17 23:35:03 +03:00
find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Gui Widgets)
2022-08-17 17:59:48 +03:00
2022-08-17 23:35:03 +03:00
set(CURRENT_PROJECT "TestQtWidgets")
2022-08-17 17:59:48 +03:00
file(GLOB_RECURSE SOURCE_CPP
"*.cpp" "*.h"
)
2022-08-17 23:35:03 +03:00
file(GLOB_RECURSE SOURCE_QRC
"*.qrc"
)
2022-08-17 17:59:48 +03:00
set(ALL_SOURCES ${SOURCE_CPP} ${SOURCE_QRC})
set(PUBLIC_INCUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}")
2022-08-17 23:35:03 +03:00
add_executable(${CURRENT_PROJECT} ${ALL_SOURCES} )
2022-08-17 17:59:48 +03:00
2022-08-17 23:35:03 +03:00
target_link_libraries(${CURRENT_PROJECT} PUBLIC Qt${QT_VERSION_MAJOR}::Gui Qt${QT_VERSION_MAJOR}::Widgets)
2022-08-17 17:59:48 +03:00
target_include_directories(${CURRENT_PROJECT} PUBLIC ${PUBLIC_INCUDE_DIR})