2025-10-02 11:19:14 +02:00
|
|
|
cmake_minimum_required(VERSION 3.16)
|
|
|
|
|
|
2025-10-02 16:19:32 +02:00
|
|
|
set(TARGET_APP "GenericCore")
|
2026-02-04 11:28:08 +01:00
|
|
|
project(${TARGET_APP} VERSION 0.3.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)
|
|
|
|
|
|
2025-10-02 16:19:32 +02:00
|
|
|
find_package(QT NAMES Qt6 REQUIRED COMPONENTS Core LinguistTools)
|
2025-12-06 10:34:44 +01:00
|
|
|
find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Core LinguistTools Gui)
|
2026-01-19 18:43:13 +01:00
|
|
|
find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Test)
|
2026-01-25 10:47:19 +01:00
|
|
|
find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Network)
|
2025-10-02 11:19:14 +02:00
|
|
|
|
2025-10-03 11:15:06 +02:00
|
|
|
configure_file(CoreConfig.h.in CoreConfig.h)
|
|
|
|
|
|
2025-10-02 16:19:32 +02:00
|
|
|
set(TS_FILES ${TARGET_APP}_en_US.ts)
|
2025-10-02 11:19:14 +02:00
|
|
|
|
2025-10-02 16:19:32 +02:00
|
|
|
add_library(${TARGET_APP} STATIC
|
2025-10-02 11:19:14 +02:00
|
|
|
genericcore.cpp
|
|
|
|
|
genericcore.h
|
|
|
|
|
${TS_FILES}
|
2025-10-31 14:47:27 +01:00
|
|
|
constants.h
|
2025-10-31 15:24:06 +01:00
|
|
|
data/settingshandler.h data/settingshandler.cpp
|
2025-12-02 15:59:34 +01:00
|
|
|
model/tablemodel.h model/tablemodel.cpp
|
2025-12-03 11:07:39 +01:00
|
|
|
model/modelitem.h model/modelitem.cpp
|
2025-12-08 13:25:02 +01:00
|
|
|
formats/jsonparser.h formats/jsonparser.cpp
|
2025-12-11 15:46:28 +01:00
|
|
|
model/commands/insertrowscommand.h model/commands/insertrowscommand.cpp
|
2025-12-11 15:49:16 +01:00
|
|
|
model/commands/removerowscommand.h model/commands/removerowscommand.cpp
|
2025-12-15 18:04:14 +01:00
|
|
|
model/commands/edititemcommand.h model/commands/edititemcommand.cpp
|
2025-12-23 10:14:13 +01:00
|
|
|
data/filehandler.h data/filehandler.cpp
|
2025-12-29 10:30:12 +01:00
|
|
|
model/metadata.h
|
2026-01-04 13:38:54 +01:00
|
|
|
formats/csvparser.h formats/csvparser.cpp
|
2026-01-25 10:47:19 +01:00
|
|
|
model/generalsortfiltermodel.h model/generalsortfiltermodel.cpp
|
|
|
|
|
network/servercommunicator.h network/servercommunicator.cpp
|
|
|
|
|
network/apiroutes.h
|
2026-01-04 13:38:54 +01:00
|
|
|
# 3rd party libraries
|
|
|
|
|
../3rdParty/rapidcsv/src/rapidcsv.h
|
2026-03-03 18:56:39 +01:00
|
|
|
utils/messagehandler.h
|
2025-10-02 11:19:14 +02:00
|
|
|
)
|
|
|
|
|
|
2025-10-03 11:15:06 +02:00
|
|
|
include_directories(${CMAKE_CURRENT_BINARY_DIR})
|
|
|
|
|
|
2025-12-06 10:34:44 +01:00
|
|
|
target_link_libraries(${TARGET_APP} PRIVATE Qt${QT_VERSION_MAJOR}::Core Qt${QT_VERSION_MAJOR}::Gui)
|
2026-01-25 10:47:19 +01:00
|
|
|
target_link_libraries(GenericCore PRIVATE Qt${QT_VERSION_MAJOR}::Test)
|
|
|
|
|
target_link_libraries(GenericCore PRIVATE Qt${QT_VERSION_MAJOR}::Network)
|
2025-10-02 11:19:14 +02:00
|
|
|
|
2025-10-02 16:19:32 +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()
|