Skip to content

Commit

Permalink
Merge pull request #2 from Fernthedev/main
Browse files Browse the repository at this point in the history
Create CMakeLists.txt (for CLion and other IDEs that support it)
  • Loading branch information
Lauriethefish authored Feb 4, 2021
2 parents ad1c16b + 9f0cacf commit 52a850f
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions template/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
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(extern/libil2cpp/il2cpp/libil2cpp)
# Uncomment these if you use these libraries
# include_directories(extern/codegen/include)
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(${CMAKE_PROJECT_NAME} SHARED ${SRC}) # Is this necessary? Not sure, have it there anyways

0 comments on commit 52a850f

Please sign in to comment.