diff --git a/cmake/modules/FindwxWidgets.cmake b/cmake/modules/FindwxWidgets.cmake index eaaa358..a68683c 100644 --- a/cmake/modules/FindwxWidgets.cmake +++ b/cmake/modules/FindwxWidgets.cmake @@ -516,13 +516,11 @@ if(wxWidgets_FIND_STYLE STREQUAL "win32") endif() endif() if(VCPKG_TARGET_TRIPLET) - find_library(wxWidgets_LIB_DIR - NAMES - wxmsw31ud_core.lib - wxmsw31u_core.lib - PATHS - DOC "Path to wxWidgets libraries" - ) + if(CMAKE_BUILD_TYPE STREQUAL "Debug") + find_library(wxWidgets_LIB_DIR NAMES wxmsw31ud_core.lib DOC "Path to wxWidgets libraries") + else() + find_library(wxWidgets_LIB_DIR NAMES wxmsw31u_core.lib DOC "Path to wxWidgets libraries") + endif() get_filename_component(wxWidgets_LIB_DIR ${wxWidgets_LIB_DIR} DIRECTORY) elseif(BUILD_SHARED_LIBS) find_path(wxWidgets_LIB_DIR