diff options
-rw-r--r-- | .gitignore | 4 | ||||
-rw-r--r-- | CMakeLists.txt | 17 | ||||
-rw-r--r-- | backend/CMakeLists.txt | 7 | ||||
-rw-r--r-- | frontend/CMakeLists.txt | 4 | ||||
-rw-r--r-- | frontend/main.cpp (renamed from main.cpp) | 0 | ||||
-rw-r--r-- | makefile | 19 |
6 files changed, 29 insertions, 22 deletions
@@ -1,4 +1,2 @@ -main -*.o -compile_commands.json +build .cache diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..98c41b3 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,17 @@ +cmake_minimum_required(VERSION 3.28) + +set(CMAKE_CXX_STANDARD 20) +set(CMAKE_EXPORT_COMPILE_COMMANDS 1) +set(CMAKE_BUILD_TYPE Debug) + +find_package(pugixml REQUIRED) + +project(main CXX) + +add_executable(main) + +add_subdirectory(backend) +add_subdirectory(frontend) + +target_link_libraries(main pugixml) + diff --git a/backend/CMakeLists.txt b/backend/CMakeLists.txt new file mode 100644 index 0000000..c9232f4 --- /dev/null +++ b/backend/CMakeLists.txt @@ -0,0 +1,7 @@ +target_sources(main PUBLIC + EnemyFactory.cpp + LocationFactory.cpp + Object.cpp + ObjectFactory.cpp +) + diff --git a/frontend/CMakeLists.txt b/frontend/CMakeLists.txt new file mode 100644 index 0000000..dd74089 --- /dev/null +++ b/frontend/CMakeLists.txt @@ -0,0 +1,4 @@ +target_sources(main PUBLIC + main.cpp +) + diff --git a/main.cpp b/frontend/main.cpp index acaf028..acaf028 100644 --- a/main.cpp +++ b/frontend/main.cpp diff --git a/makefile b/makefile deleted file mode 100644 index f6797c7..0000000 --- a/makefile +++ /dev/null @@ -1,19 +0,0 @@ -.PHONY: FORCE - -CXXFLAGS += -std=c++20 -LDFLAGS += -lstdc++ - -OBJS += main.o -OBJS += backend/EnemyFactory.o -OBJS += backend/LocationFactory.o -OBJS += backend/ObjectFactory.o -OBJS += backend/Object.o - -main: $(OBJS) - -memtest: main FORCE - valgrind ./$< - -compile_commands.json: - compiledb make -Bn - |