From 704e38b8daca4138cb3fd22bd9cd9a9159689e45 Mon Sep 17 00:00:00 2001 From: optclblast Date: Fri, 29 Nov 2024 00:28:01 -0500 Subject: [PATCH] init repository placeholder struct --- .gitignore | 1 + .vscode/settings.json | 3 +++ CMakeLists.txt | 43 +++++++++++++++++++++++++++++++++++++++++++ arsgoetia.c | 12 ++++++++++++ include/core.h | 1 + src/main.cc | 3 +++ 6 files changed, 63 insertions(+) create mode 100644 .gitignore create mode 100644 .vscode/settings.json create mode 100644 CMakeLists.txt create mode 100644 arsgoetia.c create mode 100644 include/core.h create mode 100644 src/main.cc diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e0c9b3d --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +src/builddir \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..dbff330 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "mesonbuild.configureOnOpen": true +} \ No newline at end of file diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..2588aa6 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,43 @@ +cmake_minimum_required(VERSION 3.13) + +project(arsgoetia LANGUAGES CXX) + +set(CMAKE_CXX_STANDARD 17) +set(CMAKE_CXX_STANDARD_REQUIRED ON) +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Werror -Wextra -Wpedantic -g") + +set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/build) +set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/build) +set(CMAKE_RESOURCE_DIRECTORY ${CMAKE_SOURCE_DIR}/resources) + +set(CMAKE_THREAD_LIBS_INIT "-lpthread") + SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread") + set(CMAKE_HAVE_THREADS_LIBRARY 1) + set(CMAKE_USE_WIN32_THREADS_INIT 0) + set(CMAKE_USE_PTHREADS_INIT 1) + set(THREADS_PREFER_PTHREAD_FLAG ON) + +include_directories(${CMAKE_SOURCE_DIR}/include) +file(GLOB_RECURSE SOURCES "src/main.cc" "include/*.h") +add_executable(arsgoetia ${SOURCES}) + +SET(CMAKE_INSTALL_PREFIX /) +# When new game modes appear, aggregate them into a ONE subdirectory +# if (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/modes/classicmode/CMakeLists.txt") +# add_subdirectory(src/modes/classicmode) +# target_link_libraries(arsgoetia classicmode) +# endif() +# if (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/tools/CMakeLists.txt") +# add_subdirectory(src/tools) +# target_link_libraries(arsgoetia tools) +# endif() +# if (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/application/CMakeLists.txt") +# add_subdirectory(src/application) +# target_link_libraries(arsgoetia application) +# endif() +# if (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/impl/CMakeLists.txt") +# add_subdirectory(src/impl) +# target_link_libraries(arsgoetia impl) +# endif() + +file(COPY "${CMAKE_RESOURCE_DIRECTORY}" DESTINATION ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}) diff --git a/arsgoetia.c b/arsgoetia.c new file mode 100644 index 0000000..d5286ad --- /dev/null +++ b/arsgoetia.c @@ -0,0 +1,12 @@ +#include + +#define PROJECT_NAME "arsgoetia" + +int main(int argc, char **argv) { + if(argc != 1) { + printf("%s takes no arguments.\n", argv[0]); + return 1; + } + printf("This is project %s.\n", PROJECT_NAME); + return 0; +} diff --git a/include/core.h b/include/core.h new file mode 100644 index 0000000..329f221 --- /dev/null +++ b/include/core.h @@ -0,0 +1 @@ +// placeholder \ No newline at end of file diff --git a/src/main.cc b/src/main.cc new file mode 100644 index 0000000..e9cdae1 --- /dev/null +++ b/src/main.cc @@ -0,0 +1,3 @@ +int main() { + return 0; +} \ No newline at end of file