diff --git a/cmake/third_party/pfd.cmake b/cmake/third_party/pfd.cmake index 47d1030..ba53616 100644 --- a/cmake/third_party/pfd.cmake +++ b/cmake/third_party/pfd.cmake @@ -10,11 +10,16 @@ FetchContent_Declare( GIT_REPOSITORY https://github.com/samhocevar/portable-file-dialogs.git GIT_TAG 7f852d88a480020d7f91957cbcefe514fc95000c ) -FetchContent_MakeAvailable(pfd) +FetchContent_Populate(pfd) -# To make it visible in the IDE -add_custom_target(pfd SOURCES +add_library(pfd + INTERFACE ${pfd_SOURCE_DIR}/portable-file-dialogs.h ) +target_include_directories(pfd + INTERFACE + ${pfd_SOURCE_DIR} +) + set_property(TARGET pfd PROPERTY FOLDER "third_parties") diff --git a/src/gui/CMakeLists.txt b/src/gui/CMakeLists.txt index 9fb46a6..16099a8 100644 --- a/src/gui/CMakeLists.txt +++ b/src/gui/CMakeLists.txt @@ -51,7 +51,7 @@ target_link_libraries(picross_solver picross::picross picross::utils imgui - portable_file_dialogs + pfd ) install(TARGETS picross_solver)