summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorSiddarth-Suresh <65844402+Siddarth-Suresh@users.noreply.github.com>2025-03-23 20:27:31 -0400
committerSiddarth-Suresh <65844402+Siddarth-Suresh@users.noreply.github.com>2025-03-23 20:27:31 -0400
commitdedaa26c8068fd125a40a0261aeedd74c8d395e5 (patch)
tree9c973d88bbd788b40bf67225ae63c881800cd891 /CMakeLists.txt
parent877aa98855fad77ef93a8c9f5a5e8191fbb9e699 (diff)
Initial GUI Commit
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt30
1 files changed, 30 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 6a48922..64cd30d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -20,6 +20,12 @@ include_directories(
# gather source files
file(GLOB_RECURSE SRCS "src/*.cc")
list(REMOVE_ITEM SRCS "${CMAKE_CURRENT_SOURCE_DIR}/src/main.cc")
+#exclude gui files from cli executable
+foreach(file ${SRCS})
+ if(file MATCHES "${CMAKE_CURRENT_SOURCE_DIR}/src/gui/.*")
+ list(REMOVE_ITEM SRCS ${file})
+ endif()
+endforeach()
# find python3 components
find_package(Python3 COMPONENTS Development REQUIRED)
@@ -41,3 +47,27 @@ target_link_libraries(tests PRIVATE Catch2::Catch2WithMain PRIVATE Python3::Pyth
include(CTest)
include(Catch)
catch_discover_tests(tests)
+
+# ================================
+# Qt6 GUI Integration
+# ================================
+cmake_minimum_required(VERSION 3.16)
+
+set(CMAKE_AUTOUIC ON)
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+
+# Find Qt6 Components
+find_package(Qt6 REQUIRED COMPONENTS Widgets)
+
+
+# Gather GUI Source Files
+file(GLOB_RECURSE GUI_SRCS "src/gui/*.cc")
+
+# Gather GUI Resources
+qt_add_resources(GUI_RESOURCES "src/gui/resources.qrc")
+
+# GUI executable
+qt_add_executable("${PROJECT_NAME}_gui" ${GUI_SRCS} ${SRCS} ${GUI_RESOURCES})
+target_link_libraries("${PROJECT_NAME}_gui" PRIVATE Qt6::Widgets)
+