diff CmakeLists.txt @ 5:115cfa4a3239 default tip

Added icon upload function for OSTC 4/5 For the upload the same process as the one for the firmware update is used => CRC functionality has been copied from the ostc_pack SW
author Ideenmodellierer
date Tue, 30 Dec 2025 21:41:02 +0100
parents e30f00f760d3
children
line wrap: on
line diff
--- a/CmakeLists.txt	Sun Nov 30 18:37:32 2025 +0100
+++ b/CmakeLists.txt	Tue Dec 30 21:41:02 2025 +0100
@@ -1,8 +1,6 @@
 cmake_minimum_required(VERSION 3.21)
 
-project(OSTCCompanion VERSION 1.0 LANGUAGES CXX)
-
-project(OSTCCompanion LANGUAGES CXX)
+project(OSTCCompanion VERSION 1.0 LANGUAGES CXX C)
 
 # ----------------------------------------
 # C++ Standard
@@ -79,6 +77,7 @@
     OSTC4Operations.h
     OSTC_CR_Operations.h
     editlogdialog.h
+    crcmodel.h
 )
 
 set(UIS
@@ -102,6 +101,17 @@
 
 set(app_icon_resource_windows "${CMAKE_CURRENT_SOURCE_DIR}/icon.rc")
 
+
+add_library(crcmodel STATIC
+    crcmodel.c
+)
+set_source_files_properties(crcmodel.c
+    PROPERTIES
+        LANGUAGE C
+)
+target_include_directories(crcmodel PUBLIC
+    ${CMAKE_CURRENT_SOURCE_DIR}
+)
 # ----------------------------------------
 # Executable erstellen
 # ----------------------------------------
@@ -112,6 +122,10 @@
     ${RESOURCES}
     Utils/Export.h
     ${app_icon_resource_windows}
+    ostc45_icon.cpp
+    ostc45_icon.h
+    crc_wrapper.h
+    crc_wrapper.cpp
 )
 
 target_include_directories(${PROJECT_NAME} PRIVATE
@@ -124,7 +138,7 @@
 # Qt Libraries verlinken
 # ----------------------------------------
 target_link_libraries(${PROJECT_NAME}
-    PRIVATE Qt6::Core Qt6::Gui Qt6::Widgets Qt6::Network Qt6::Svg Qt6::Xml Qt6::SerialPort
+    PRIVATE Qt6::Core Qt6::Gui Qt6::Widgets Qt6::Network Qt6::Svg Qt6::Xml Qt6::SerialPort crcmodel
 )
 
 # ----------------------------------------