From d17526ae3e10deb9b92dde90268a395ab1f1b8fa Mon Sep 17 00:00:00 2001 From: ilotterytea Date: Mon, 27 Jan 2025 22:50:20 +0500 Subject: feat: nativefiledialog dependency --- .gitignore | 4 +++- CMakeLists.txt | 16 +++++++++++++--- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 7295671..84893d9 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,6 @@ /.cache /.vscode /.vs -/out \ No newline at end of file +/out +/lib +/bin \ No newline at end of file diff --git a/CMakeLists.txt b/CMakeLists.txt index e5a9d3b..098f963 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,5 @@ cmake_minimum_required(VERSION 3.10) +include(FetchContent) project( sillyeditor @@ -35,7 +36,6 @@ if (NOT raylib_FOUND) endif() # raygui -include(FetchContent) FetchContent_Declare( raygui GIT_REPOSITORY https://github.com/raysan5/raygui.git @@ -43,6 +43,16 @@ FetchContent_Declare( ) FetchContent_MakeAvailable(raygui) -target_include_directories(sillyeditor PRIVATE ${raygui_SOURCE_DIR}/src) +# nativefiledialog +FetchContent_Declare( + nfd + GIT_REPOSITORY https://github.com/hjalleboii/nativefiledialog.git # TODO: change to the original repo later + GIT_TAG master +) +FetchContent_MakeAvailable(nfd) + +add_subdirectory(${nfd_SOURCE_DIR}/build/cmake ${CMAKE_BINARY_DIR}/nfd_build) + +target_include_directories(sillyeditor PRIVATE ${raygui_SOURCE_DIR}/src ${nfd_SOURCE_DIR}/src/include) -target_link_libraries(sillyeditor PRIVATE raylib m) +target_link_libraries(sillyeditor PRIVATE raylib m nfd) -- cgit v1.2.3