diff options
Diffstat (limited to 'CMakeLists.txt')
| -rw-r--r-- | CMakeLists.txt | 56 |
1 files changed, 29 insertions, 27 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 4840d9c..e39e28e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,11 +4,11 @@ include(FetchContent) project( sillyeditor VERSION 1.0 - DESCRIPTION "a simple doom-inspired level editor" + DESCRIPTION "a simple level editor" ) -set(CMAKE_C_STANDARD 99) -set(CMAKE_C_STANDARD_REQUIRED True) +set(CMAKE_CXX_STANDARD 17) +set(CMAKE_CXX_STANDARD_REQUIRED True) set(CMAKE_EXPORT_COMPILE_COMMANDS ON) @@ -20,37 +20,39 @@ set_target_properties( OUTPUT_NAME "editor" ) -file(GLOB_RECURSE SRC_FILES "src/*.c" "src/*.h") +file(GLOB_RECURSE SRC_FILES "src/*.cpp" "src/*.hpp") target_sources(sillyeditor PRIVATE ${SRC_FILES}) -# raylib -find_package(raylib QUIET) -if (NOT raylib_FOUND) - include(FetchContent) - FetchContent_Declare( - raylib - URL https://github.com/raysan5/raylib/archive/refs/tags/5.5.tar.gz - ) - FetchContent_MakeAvailable(raylib) -endif() - -# raygui +# sfml +FetchContent_Declare(sfml + GIT_REPOSITORY https://github.com/SFML/SFML.git + GIT_TAG 3.0.0 + GIT_SHALLOW ON + EXCLUDE_FROM_ALL + SYSTEM) +FetchContent_MakeAvailable(sfml) + +# imgui FetchContent_Declare( - raygui - GIT_REPOSITORY https://github.com/raysan5/raygui.git - GIT_TAG 4.0 + imgui + GIT_REPOSITORY https://github.com/ocornut/imgui.git + GIT_TAG v1.91.8 ) -FetchContent_MakeAvailable(raygui) +FetchContent_MakeAvailable(imgui) -# nativefiledialog +# imgui-sfml FetchContent_Declare( - nfd - GIT_REPOSITORY https://github.com/btzy/nativefiledialog-extended.git - GIT_TAG master + imgui-sfml + GIT_REPOSITORY https://github.com/SFML/imgui-sfml.git + GIT_TAG v3.0 ) -FetchContent_MakeAvailable(nfd) -target_include_directories(sillyeditor PRIVATE ${raygui_SOURCE_DIR}/src) +set(SFML_DIR "${sfml_SOURCE_DIR}/cmake") +set(IMGUI_DIR ${imgui_SOURCE_DIR}) +set(IMGUI_SFML_FIND_SFML OFF) +FetchContent_MakeAvailable(imgui-sfml) + +target_include_directories(sillyeditor PRIVATE ${imgui_SOURCE_DIR}) -target_link_libraries(sillyeditor PRIVATE raylib m nfd) +target_link_libraries(sillyeditor PRIVATE sfml-graphics ImGui-SFML::ImGui-SFML) |
