From 8aec06aaf239c0e646d8ffbb965a44678436f70f Mon Sep 17 00:00:00 2001 From: camila314 Date: Sun, 8 May 2022 17:08:14 -0500 Subject: [PATCH] better template --- CMakeLists.txt | 28 +++++++++++++++++++++++----- README.md | 2 +- mod.json | 15 +++++++++++++++ 3 files changed, 39 insertions(+), 6 deletions(-) create mode 100644 mod.json diff --git a/CMakeLists.txt b/CMakeLists.txt index 8f4a9e3..8d6ec50 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,7 +1,25 @@ -cmake_minimum_required(VERSION 3.0 FATAL_ERROR) +cmake_minimum_required(VERSION 3.3.0) +set(CMAKE_CXX_STANDARD 17) +set(CMAKE_CXX_STANDARD_REQUIRED ON) -project($Template VERSION 0.1.0 LANGUAGES C CXX) +set(PROJECT_NAME ExampleMod) -set(SOURCE_FILES main.cpp sdk/include/implicitEntry.cpp) -set(BINARY_NAME $Template) -include(sdk/Geode.cmake) +project(${PROJECT_NAME} VERSION 1.0.0) + +add_library(${PROJECT_NAME} SHARED main.cpp) + +add_compile_definitions(EXPORTING_MOD) + +set_target_properties(${PROJECT_NAME} PROPERTIES PREFIX "") + +find_path(GEODE_SDK_PATH + NAMES Geode.cmake + PATHS $ENV{GEODE_SUITE}/sdk /Users/Shared/Geode/SDK/suite/sdk /usr/local/geode/sdk + DOC "Geode SDK path." + REQUIRED +) +include(${GEODE_SDK_PATH}/Geode.cmake) + +setup_geode_mod() + +create_geode_file(${PROJECT_NAME}) \ No newline at end of file diff --git a/README.md b/README.md index fcd24c1..71fb481 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,3 @@ -# $Template +# Template This is where she makes a mod. \ No newline at end of file diff --git a/mod.json b/mod.json new file mode 100644 index 0000000..3e89ba5 --- /dev/null +++ b/mod.json @@ -0,0 +1,15 @@ +{ + "geode": 1, + "version": "v1.0.0", + "id": "com.you.example", + "name": "Example", + "developer": "You", + "description": "example mod", + "binary": "ExampleMod", + "dependencies": [ + { + "id": "com.geode.api", + "required": true + } + ] +} \ No newline at end of file