From d17526ae3e10deb9b92dde90268a395ab1f1b8fa Mon Sep 17 00:00:00 2001 From: ilotterytea Date: Mon, 27 Jan 2025 22:50:20 +0500 Subject: feat: nativefiledialog dependency --- CMakeLists.txt | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'CMakeLists.txt') 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