From 933ebe7d073f51755961e186ad2dd809a8ea8353 Mon Sep 17 00:00:00 2001 From: FernTheDev <15272073+Fernthedev@users.noreply.github.com> Date: Wed, 3 Feb 2021 10:03:29 -0400 Subject: [PATCH 1/3] Create CMakeLists.txt --- template/CMakeLists.txt | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 template/CMakeLists.txt diff --git a/template/CMakeLists.txt b/template/CMakeLists.txt new file mode 100644 index 0000000..0d3e1c6 --- /dev/null +++ b/template/CMakeLists.txt @@ -0,0 +1,26 @@ +cmake_minimum_required(VERSION 3.10) + +# set the project name +project(${id}) #Modify this to your project name + +# specify the C++ standard +set(CMAKE_CXX_STANDARD 20) +set(CMAKE_CXX_STANDARD_REQUIRED True) + +# Put path to NDK such as PATH//TO//NDK +file (STRINGS "ndkpath.txt" CMAKE_ANDROID_NDK) + +include_directories(include) +include_directories(extern) +include_directories(shared) +include_directories(${CMAKE_ANDROID_NDK}) +include_directories(.) + +set(CMAKE_CXX_STANDARD 20) + +add_compile_definitions("VERSION=\"0.1.0\"") #Modify this if you use it +add_compile_definitions("__GNUC__") +add_compile_definitions("__aarch64__") + +file(GLOB SRC src/*.cpp) +add_library(${id} SHARED ${SRC}) # Is this necessary? Not sure, have it there anyways From 53d1c44a1cbde4baa208d319ed03db265cc12a37 Mon Sep 17 00:00:00 2001 From: FernTheDev <15272073+Fernthedev@users.noreply.github.com> Date: Thu, 4 Feb 2021 12:07:08 -0400 Subject: [PATCH 2/3] Fix variables and add il2cpp (and some optional includes) --- template/CMakeLists.txt | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/template/CMakeLists.txt b/template/CMakeLists.txt index 0d3e1c6..94a3e8a 100644 --- a/template/CMakeLists.txt +++ b/template/CMakeLists.txt @@ -1,7 +1,7 @@ cmake_minimum_required(VERSION 3.10) # set the project name -project(${id}) #Modify this to your project name +project(#{id}) #Modify this to your project name # specify the C++ standard set(CMAKE_CXX_STANDARD 20) @@ -13,14 +13,20 @@ file (STRINGS "ndkpath.txt" CMAKE_ANDROID_NDK) include_directories(include) include_directories(extern) include_directories(shared) +include_directories(extern/libil2cpp/il2cpp/libil2cpp) +# Uncomment these if you use these libraries +# include_directories(extern/codegen/include) +# include_directories(extern/beatsaber-hook/shared) +# include_directories(extern/modloader/shared) include_directories(${CMAKE_ANDROID_NDK}) include_directories(.) set(CMAKE_CXX_STANDARD 20) add_compile_definitions("VERSION=\"0.1.0\"") #Modify this if you use it +add_compile_definitions("ID=\"${CMAKE_PROJECT_NAME}\"") #Modify this if you use it add_compile_definitions("__GNUC__") add_compile_definitions("__aarch64__") file(GLOB SRC src/*.cpp) -add_library(${id} SHARED ${SRC}) # Is this necessary? Not sure, have it there anyways +add_library(${CMAKE_PROJECT_NAME} SHARED ${SRC}) # Is this necessary? Not sure, have it there anyways From 9f0cacff239aaa3c809eb56bc2207b2c51d856f6 Mon Sep 17 00:00:00 2001 From: FernTheDev <15272073+Fernthedev@users.noreply.github.com> Date: Thu, 4 Feb 2021 12:10:19 -0400 Subject: [PATCH 3/3] Remove useless includes --- template/CMakeLists.txt | 2 -- 1 file changed, 2 deletions(-) diff --git a/template/CMakeLists.txt b/template/CMakeLists.txt index 94a3e8a..821d894 100644 --- a/template/CMakeLists.txt +++ b/template/CMakeLists.txt @@ -16,8 +16,6 @@ include_directories(shared) include_directories(extern/libil2cpp/il2cpp/libil2cpp) # Uncomment these if you use these libraries # include_directories(extern/codegen/include) -# include_directories(extern/beatsaber-hook/shared) -# include_directories(extern/modloader/shared) include_directories(${CMAKE_ANDROID_NDK}) include_directories(.)