2022-05-08 18:08:14 -04:00
|
|
|
cmake_minimum_required(VERSION 3.3.0)
|
|
|
|
set(CMAKE_CXX_STANDARD 17)
|
|
|
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
2022-01-26 11:55:53 -05:00
|
|
|
|
2022-05-10 13:26:22 -04:00
|
|
|
project(Template VERSION 1.0.0)
|
2022-05-08 18:08:14 -04:00
|
|
|
|
2022-05-14 05:48:38 -04:00
|
|
|
# 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})
|
2022-05-08 18:08:14 -04:00
|
|
|
|
2022-08-16 09:25:31 -04:00
|
|
|
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()
|
|
|
|
|
|
|
|
set(GEODE_LINK_SOURCE On)
|
|
|
|
add_subdirectory($ENV{GEODE_SDK} $ENV{GEODE_SDK}/build)
|
2022-05-08 18:08:14 -04:00
|
|
|
|
2022-08-16 09:25:31 -04:00
|
|
|
target_link_libraries(${PROJECT_NAME} geode-sdk)
|
|
|
|
create_geode_file(${PROJECT_NAME})
|