mirror of
https://github.com/QuasarApp/qTbot.git
synced 2025-04-26 05:44:32 +00:00
29 lines
883 B
CMake
29 lines
883 B
CMake
#
|
|
# Copyright (C) 2020-2023 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.19)
|
|
|
|
get_filename_component(CURRENT_PROJECT_DIR ${CMAKE_CURRENT_SOURCE_DIR} NAME)
|
|
|
|
set(CURRENT_PROJECT "${PROJECT_NAME}_${CURRENT_PROJECT_DIR}")
|
|
|
|
file(GLOB_RECURSE SOURCE_CPP
|
|
"*.cpp" "*.h" "*.qrc"
|
|
)
|
|
|
|
set(PUBLIC_INCUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}")
|
|
set(PUBLIC_INCUDE_DIR ${PUBLIC_INCUDE_DIR} "${CMAKE_CURRENT_SOURCE_DIR}/units")
|
|
|
|
|
|
add_executable(${CURRENT_PROJECT} ${SOURCE_CPP})
|
|
target_link_libraries(${CURRENT_PROJECT} PRIVATE Qt${QT_VERSION_MAJOR}::Test ${PROJECT_NAME})
|
|
|
|
target_include_directories(${CURRENT_PROJECT} PUBLIC ${PUBLIC_INCUDE_DIR})
|
|
|
|
initTests()
|
|
addTests(${PROJECT_NAME} ${CURRENT_PROJECT})
|