Files
GenericQtClientCore/CMakeLists.txt

53 lines
1.7 KiB
CMake
Raw Normal View History

2025-10-02 11:19:14 +02:00
cmake_minimum_required(VERSION 3.16)
set(TARGET_APP "GenericCore")
2026-01-14 10:27:33 +01:00
project(${TARGET_APP} VERSION 0.2.0 LANGUAGES CXX)
2025-10-02 11:19:14 +02:00
set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
find_package(QT NAMES Qt6 REQUIRED COMPONENTS Core LinguistTools)
find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Core LinguistTools Gui)
find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Test)
2025-10-02 11:19:14 +02:00
configure_file(CoreConfig.h.in CoreConfig.h)
set(TS_FILES ${TARGET_APP}_en_US.ts)
2025-10-02 11:19:14 +02:00
add_library(${TARGET_APP} STATIC
2025-10-02 11:19:14 +02:00
genericcore.cpp
genericcore.h
${TS_FILES}
constants.h
2025-10-31 15:24:06 +01:00
data/settingshandler.h data/settingshandler.cpp
model/tablemodel.h model/tablemodel.cpp
model/modelitem.h model/modelitem.cpp
formats/jsonparser.h formats/jsonparser.cpp
model/commands/insertrowscommand.h model/commands/insertrowscommand.cpp
model/commands/removerowscommand.h model/commands/removerowscommand.cpp
2025-12-15 18:04:14 +01:00
model/commands/edititemcommand.h model/commands/edititemcommand.cpp
data/filehandler.h data/filehandler.cpp
model/metadata.h
formats/csvparser.h formats/csvparser.cpp
# 3rd party libraries
../3rdParty/rapidcsv/src/rapidcsv.h
model/generalsortfiltermodel.h model/generalsortfiltermodel.cpp
2025-10-02 11:19:14 +02:00
)
target_link_libraries(GenericCore PRIVATE Qt${QT_VERSION_MAJOR}::Test)
include_directories(${CMAKE_CURRENT_BINARY_DIR})
target_link_libraries(${TARGET_APP} PRIVATE Qt${QT_VERSION_MAJOR}::Core Qt${QT_VERSION_MAJOR}::Gui)
2025-10-02 11:19:14 +02:00
target_compile_definitions(${TARGET_APP} PRIVATE ${TARGET_APP}_LIBRARY)
2025-10-02 11:19:14 +02:00
if(COMMAND qt_create_translation)
2025-10-26 13:03:43 +01:00
qt_create_translation(QM_FILES ${CMAKE_SOURCE_DIR} ${TS_FILES})
2025-10-02 11:19:14 +02:00
else()
2025-10-26 13:03:43 +01:00
qt5_create_translation(QM_FILES ${CMAKE_SOURCE_DIR} ${TS_FILES})
2025-10-02 11:19:14 +02:00
endif()