4
0
mirror of https://github.com/QuasarApp/CMakeProject.git synced 2025-04-29 15:14:32 +00:00
CMakeProject/tests/CMakeLists.txt

30 lines
890 B
CMake
Raw Normal View History

#
# Copyright (C) 2020-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.
#
2022-06-05 12:45:47 +03:00
cmake_minimum_required(VERSION 3.18)
2022-06-05 12:45:47 +03:00
get_filename_component(CURRENT_PROJECT_DIR ${CMAKE_CURRENT_SOURCE_DIR} NAME)
2022-06-05 12:45:47 +03:00
set(CURRENT_PROJECT "${PROJECT_NAME}${CURRENT_PROJECT_DIR}")
file(GLOB_RECURSE SOURCE_CPP
2022-01-18 12:28:03 +03:00
"*.cpp" "*.h" "*.qrc"
)
2022-06-05 12:45:47 +03:00
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})
2022-06-05 12:45:47 +03:00
target_link_libraries(${CURRENT_PROJECT} PRIVATE Qt${QT_VERSION_MAJOR}::Test ${PROJECT_NAME}Library)
target_include_directories(${CURRENT_PROJECT} PUBLIC ${PUBLIC_INCUDE_DIR})
initTests()
addTests(${PROJECT_NAME} ${CURRENT_PROJECT})