summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt16
1 files changed, 13 insertions, 3 deletions
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)