vcpkg/ports/gdal/vcpkg-cmake-wrapper.cmake
Jack·Boos·Yu 6cc5c2c70e
[gdal] Fix debug library name in vcpkg-cmake-wrapper (#13992)
* [gdal] Fix debug library name in vcpkg-cmake-wrapper

* correct debug library name on Windows

* correct library name on Windows
2020-10-12 12:03:08 -07:00

13 lines
604 B
CMake

include(FindPackageHandleStandardArgs)
include(SelectLibraryConfigurations)
find_path(GDAL_INCLUDE_DIR NAMES gdal.h HINTS ${CURRENT_INSTALLED_DIR})
find_library(GDAL_LIBRARY_DEBUG NAMES gdal gdald NAMES_PER_DIR PATH_SUFFIXES lib PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug" NO_DEFAULT_PATH REQUIRED)
find_library(GDAL_LIBRARY_RELEASE NAMES gdal NAMES_PER_DIR PATH_SUFFIXES lib PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}" NO_DEFAULT_PATH REQUIRED)
select_library_configurations(GDAL)
set(GDAL_INCLUDE_DIR ${GDAL_INCLUDE_DIR})
set(GDAL_LIBRARY ${GDAL_LIBRARY})