diff options
author | bd <bdunahu@operationnull.com> | 2025-03-23 21:48:12 -0400 |
---|---|---|
committer | bd <bdunahu@operationnull.com> | 2025-03-23 21:48:12 -0400 |
commit | e05f5306f50029b0f5f471b70cfe45749d0d21f6 (patch) | |
tree | 80edca6ac9dca277e0212ce78885c9d142942456 /CMakeLists.txt | |
parent | dedaa26c8068fd125a40a0261aeedd74c8d395e5 (diff) |
Remove Python, combine main files
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 65 |
1 files changed, 25 insertions, 40 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 64cd30d..d4be3ee 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,6 +2,9 @@ cmake_minimum_required(VERSION 3.5) project(risc_vector) set(CMAKE_EXPORT_COMPILE_COMMANDS ON) +set(CMAKE_AUTOUIC ON) # automatically process .ui files into headers +set(CMAKE_AUTOMOC ON) +set(CMAKE_AUTORCC ON) add_compile_options(-Wall -lstdc++) add_compile_options(-Wextra -Wpedantic) @@ -20,54 +23,36 @@ 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) +# find QT components +find_package(Qt6 COMPONENTS Widgets REQUIRED) # binary executable -add_executable(${PROJECT_NAME} ${SRCS} src/main.cc) -target_link_libraries(${PROJECT_NAME} PRIVATE Python3::Python) - -find_package(Catch2 REQUIRED) - -#gather test files -file(GLOB_RECURSE TESTS "tests/*.cc") - -# test executable -add_executable(tests ${SRCS} ${TESTS}) -target_link_libraries(tests PRIVATE Catch2::Catch2WithMain PRIVATE Python3::Python) +add_executable(${PROJECT_NAME} ${SRCS}) +qt_add_resources(GUI_RESOURCES "src/gui/resources.qrc") +target_link_libraries(${PROJECT_NAME} PRIVATE Qt6::Widgets) -# test discovery -include(CTest) -include(Catch) -catch_discover_tests(tests) +# find_package(Catch2 REQUIRED) -# ================================ -# Qt6 GUI Integration -# ================================ -cmake_minimum_required(VERSION 3.16) +# #gather test files +# file(GLOB_RECURSE TESTS "tests/*.cc") -set(CMAKE_AUTOUIC ON) -set(CMAKE_AUTOMOC ON) -set(CMAKE_AUTORCC ON) +# # test executable +# add_executable(tests ${SRCS} ${TESTS}) +# target_link_libraries(tests PRIVATE Catch2::Catch2WithMain PRIVATE Qt6::Widgets) -# Find Qt6 Components -find_package(Qt6 REQUIRED COMPONENTS Widgets) +# # test discovery +# include(CTest) +# include(Catch) +# catch_discover_tests(tests) -# Gather GUI Source Files -file(GLOB_RECURSE GUI_SRCS "src/gui/*.cc") - -# Gather GUI Resources -qt_add_resources(GUI_RESOURCES "src/gui/resources.qrc") +# # Gather GUI Source Files +# file(GLOB_RECURSE GUI_SRCS "src/gui/*.cc") -# GUI executable -qt_add_executable("${PROJECT_NAME}_gui" ${GUI_SRCS} ${SRCS} ${GUI_RESOURCES}) -target_link_libraries("${PROJECT_NAME}_gui" PRIVATE Qt6::Widgets) +# # 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) |