Skip to content

Commit

Permalink
Modify the pfd third party import to prevent a CMake deprecation warning
Browse files Browse the repository at this point in the history
We populate the project portable-file-dialogs and do not use that
project's CMakeLists.txt, whose cmake_minimum_required() call generates
a deprecation warning on CMake.
  • Loading branch information
pierre-dejoue committed Aug 18, 2023
1 parent 123c325 commit 5ba997e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
11 changes: 8 additions & 3 deletions cmake/third_party/pfd.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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")
2 changes: 1 addition & 1 deletion src/gui/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ target_link_libraries(picross_solver
picross::picross
picross::utils
imgui
portable_file_dialogs
pfd
)

install(TARGETS picross_solver)

0 comments on commit 5ba997e

Please sign in to comment.