geode-sdk-example-mod/CMakeLists.txt
2023-04-27 07:56:17 +03:00

26 lines
677 B
CMake

cmake_minimum_required(VERSION 3.3.0)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
project(Template VERSION 1.0.0)
# Use GLOB_RECURSE instead of GLOB
# to recursively add all source files
# under src/
file(GLOB SOURCES
src/*.cpp
)
# Set up the mod binary
add_library(${PROJECT_NAME} SHARED ${SOURCES})
if (NOT DEFINED ENV{GEODE_SDK})
message(FATAL_ERROR "Unable to find Geode SDK! Please define GEODE_SDK environment variable to point to Geode")
else()
message(STATUS "Found Geode: $ENV{GEODE_SDK}")
endif()
add_subdirectory($ENV{GEODE_SDK} $ENV{GEODE_SDK}/build)
# Set up dependencies, resources, link Geode
setup_geode_mod(${PROJECT_NAME})