mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-28 05:45:40 +08:00
3e9fce266b
* [wxwidgets] Fix cmake wrapper * update version record * Update versions/w-/wxwidgets.json * Update ports/wxwidgets/vcpkg-cmake-wrapper.cmake Co-authored-by: Phoebe <20694052+PhoebeHui@users.noreply.github.com> * Update versions/w-/wxwidgets.json Co-authored-by: Phoebe <20694052+PhoebeHui@users.noreply.github.com>
26 lines
1.1 KiB
CMake
26 lines
1.1 KiB
CMake
set(wxWidgets_ROOT_DIR "${CMAKE_CURRENT_LIST_DIR}/../.." CACHE INTERNAL "" FORCE)
|
|
set(WX_ROOT_DIR "${wxWidgets_ROOT_DIR}")
|
|
set(wxWidgets_LIB_DIR "${wxWidgets_ROOT_DIR}/lib" CACHE INTERNAL "" FORCE)
|
|
set(WX_LIB_DIR "${wxWidgets_LIB_DIR}")
|
|
find_library(WX_based NAMES wxbase31ud PATHS "${wxWidgets_ROOT_DIR}/debug/lib" NO_DEFAULT_PATH)
|
|
file(GLOB WX_DEBUG_LIBS "${wxWidgets_ROOT_DIR}/debug/lib/wx*d_*.lib")
|
|
foreach(WX_DEBUG_LIB ${WX_DEBUG_LIBS})
|
|
string(REGEX REPLACE ".*wx([^/]*)d_([^/\\.]*)\\.[^/\\.]*\$" "WX_\\2d" varname "${WX_DEBUG_LIB}")
|
|
set(${varname} "${WX_DEBUG_LIB}" CACHE INTERNAL "" FORCE)
|
|
endforeach()
|
|
_find_package(${ARGS})
|
|
find_package(ZLIB QUIET)
|
|
find_package(libpng CONFIG QUIET)
|
|
find_package(TIFF QUIET)
|
|
find_package(expat CONFIG QUIET)
|
|
|
|
if(wxWidgets_LIBRARIES AND NOT wxWidgets_LIBRARIES MATCHES "TIFF::TIFF;png;expat::expat;ZLIB::ZLIB")
|
|
list(APPEND wxWidgets_LIBRARIES "TIFF::TIFF;expat::expat;ZLIB::ZLIB")
|
|
|
|
if (TARGET png)
|
|
list(APPEND wxWidgets_LIBRARIES "png")
|
|
elseif(TARGET png_static)
|
|
list(APPEND wxWidgets_LIBRARIES "png_static")
|
|
endif()
|
|
endif()
|