JKQtPlotter/tests/jkqtcommmon/CMakeLists.txt

29 lines
815 B
CMake
Raw Normal View History

2024-01-22 05:21:54 +08:00
cmake_minimum_required(VERSION 3.23)
set(TEST_NAME jkqtcommon_test)
set(EXENAME ${TEST_NAME})
message( STATUS ".. Building Unit Test ${TEST_NAME}" )
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOMOC ON)
add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS})
target_include_directories(${EXENAME} PRIVATE ../../lib)
target_link_libraries(${EXENAME} PRIVATE ${jkqtplotter_namespace}JKQTCommon${jkqtplotter_LIBNAME_VERSION_PART})
target_link_libraries(${EXENAME} PRIVATE Qt${QT_VERSION_MAJOR}::Test)
target_sources(${EXENAME}
PRIVATE
${TEST_NAME}.cpp
)
# Installation
install(TARGETS ${EXENAME} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
2024-01-23 18:51:50 +08:00
add_test(NAME ${TEST_NAME} COMMAND COMMAND $<TARGET_FILE:${EXENAME}>)
2024-01-22 05:21:54 +08:00
#Installation of Qt DLLs on Windows
jkqtplotter_deployqt(${EXENAME})