Skip to content

Commit

Permalink
Fix CMake build on Windows' PDCurses
Browse files Browse the repository at this point in the history
Static linking only
  • Loading branch information
alef committed Nov 23, 2024
1 parent 6521199 commit 1b20f87
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,18 @@ if (CURSES)
if (WIN32 AND VCPKG_MANIFEST_MODE)
find_package(unofficial-pdcurses CONFIG)
if(TARGET unofficial::pdcurses::pdcurses)
get_target_property(_IMPORTED_CONFIGURATIONS unofficial::pdcurses::pdcurses
IMPORTED_CONFIGURATIONS
)
if (RELEASE AND "Release" IN_LIST _IMPORTED_CONFIGURATIONS)
get_target_property(_IMPORTED_LOCATION unofficial::pdcurses::pdcurses
IMPORTED_IMPLIB_RELEASE)
elseif("Debug" IN_LIST _IMPORTED_CONFIGURATIONS)
get_target_property(_IMPORTED_LOCATION unofficial::pdcurses::pdcurses
IMPORTED_IMPLIB_DEBUG)
endif()
set_target_properties(unofficial::pdcurses::pdcurses PROPERTIES
IMPORTED_LOCATION ${_IMPORTED_LOCATION})
set(USE_PDCURSES TRUE)
endif()
elseif(MSYS2)
Expand Down

0 comments on commit 1b20f87

Please sign in to comment.