From c710d0d1b3ea7d389d72ed41223ef703fda9dafa Mon Sep 17 00:00:00 2001 From: ItsDrike Date: Thu, 5 Dec 2024 01:59:15 +0100 Subject: [PATCH] Move source code to src/ dir --- CMakeLists.txt | 11 ++++++++--- columnslot.cpp => src/columnslot.cpp | 0 columnslot.h => src/columnslot.h | 0 gamestate.cpp => src/gamestate.cpp | 0 gamestate.h => src/gamestate.h | 0 playingcard.cpp => src/playingcard.cpp | 0 playingcard.h => src/playingcard.h | 0 7 files changed, 8 insertions(+), 3 deletions(-) rename columnslot.cpp => src/columnslot.cpp (100%) rename columnslot.h => src/columnslot.h (100%) rename gamestate.cpp => src/gamestate.cpp (100%) rename gamestate.h => src/gamestate.h (100%) rename playingcard.cpp => src/playingcard.cpp (100%) rename playingcard.h => src/playingcard.h (100%) diff --git a/CMakeLists.txt b/CMakeLists.txt index bbdb8de..ac02ea1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -19,15 +19,20 @@ qt_add_executable(appSolitare qml.qrc ) +file(GLOB_RECURSE SOURCES + src/*.cpp + src/*.h +) + qt_add_qml_module(appSolitare URI Solitare VERSION 1.0 SOURCES - playingcard.h playingcard.cpp - gamestate.h gamestate.cpp - columnslot.h columnslot.cpp + ${SOURCES} ) +target_include_directories(appSolitare PRIVATE ${CMAKE_SOURCE_DIR}/src) + # Qt for iOS sets MACOSX_BUNDLE_GUI_IDENTIFIER automatically since Qt 6.1. # If you are developing for iOS or macOS you should consider setting an # explicit, fixed bundle identifier manually though. diff --git a/columnslot.cpp b/src/columnslot.cpp similarity index 100% rename from columnslot.cpp rename to src/columnslot.cpp diff --git a/columnslot.h b/src/columnslot.h similarity index 100% rename from columnslot.h rename to src/columnslot.h diff --git a/gamestate.cpp b/src/gamestate.cpp similarity index 100% rename from gamestate.cpp rename to src/gamestate.cpp diff --git a/gamestate.h b/src/gamestate.h similarity index 100% rename from gamestate.h rename to src/gamestate.h diff --git a/playingcard.cpp b/src/playingcard.cpp similarity index 100% rename from playingcard.cpp rename to src/playingcard.cpp diff --git a/playingcard.h b/src/playingcard.h similarity index 100% rename from playingcard.h rename to src/playingcard.h