From 0a87b324c3bec9d7304e183072e1b5e42c4dc144 Mon Sep 17 00:00:00 2001 From: ilotterytea Date: Fri, 3 Jan 2025 15:25:42 +0500 Subject: initial commit --- CMakeLists.txt | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 CMakeLists.txt (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..4617332 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,39 @@ +cmake_minimum_required(VERSION 3.10) + +project( + sillyeditor + VERSION 1.0 + DESCRIPTION "a simple doom-inspired level editor" +) + +set(CMAKE_C_STANDARD 99) +set(CMAKE_C_STANDARD_REQUIRED True) + +set(CMAKE_EXPORT_COMPILE_COMMANDS ON) + +add_executable(sillyeditor) + +set_target_properties( + sillyeditor PROPERTIES + DESCRIPTION ${PROJECT_DESCRIPTION} + OUTPUT_NAME "editor" +) + +file(GLOB_RECURSE SRC_FILES "src/*.c" "src/*.h") + +target_sources(sillyeditor PRIVATE ${SRC_FILES}) + +# raylib +find_package(raylib QUIET) +if (NOT raylib_FOUND) + include(FetchContent) + FetchContent_Declare( + raylib + GIT_REPOSITORY https://github.com/raysan5/raylib.git + GIT_TAG 5.0 + GIT_SHALLOW 1 + ) + FetchContent_MakeAvailable(raylib) +endif() + +target_link_libraries(sillyeditor PRIVATE raylib) -- cgit v1.2.3