[raylib] rm vcpkg-cmake-wrapper.cmake, add hidpi (#12484)

* [raylib] rm vcpkg-cmake-wrapper.cmake, add hidpi

raylib is a CMake-built project which already exports its targets using
a custom raylib-config.cmake file, so use that instead. Add a feature to
enable support for HiDPI displays.

* [raylib] Update vcpkg-cmake-wrapper.cmake

* Update ports/raylib/vcpkg-cmake-wrapper.cmake

* raylib/CONTROL: Bump Port-Version to 3

Co-authored-by: wangli28 <wangli28@beyondsoft.com>
Co-authored-by: nicole mazzuca <mazzucan@outlook.com>
This commit is contained in:
George White 2020-08-10 17:33:50 +01:00 committed by GitHub
parent 46bb7e925d
commit 6234487442
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 16 additions and 20 deletions

View File

@ -1,10 +1,13 @@
Source: raylib Source: raylib
Version: 3.0.0 Version: 3.0.0
Port-Version: 2 Port-Version: 3
Description: A simple and easy-to-use library to enjoy videogames programming Description: A simple and easy-to-use library to enjoy videogames programming
Homepage: https://github.com/raysan5/raylib Homepage: https://github.com/raysan5/raylib
Supports: !(arm|uwp) Supports: !(arm|uwp)
Default-Features: use-audio Default-Features: use-audio
Feature: hidpi
Description: Support high-DPI displays
Feature: use-audio Feature: use-audio
Description: Build raylib with audio module Description: Build raylib with audio module

View File

@ -25,7 +25,9 @@ string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" SHARED)
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" STATIC) string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" STATIC)
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
use-audio USE_AUDIO FEATURES
hidpi SUPPORT_HIGH_DPI
use-audio USE_AUDIO
) )
vcpkg_configure_cmake( vcpkg_configure_cmake(
@ -54,12 +56,6 @@ vcpkg_copy_pdbs()
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT}) vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT})
configure_file(
${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake
${CURRENT_PACKAGES_DIR}/share/${PORT}/vcpkg-cmake-wrapper.cmake
@ONLY
)
file(REMOVE_RECURSE file(REMOVE_RECURSE
${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/include
${CURRENT_PACKAGES_DIR}/debug/share ${CURRENT_PACKAGES_DIR}/debug/share

View File

@ -1,5 +1,5 @@
The package @PORT@:@TARGET_TRIPLET@ provides CMake targets: The package @PORT@:@TARGET_TRIPLET@ provides CMake targets:
find_package(@PORT@ CONFIG REQUIRED) find_package(@PORT@ CONFIG REQUIRED)
target_include_directories(main PRIVATE ${raylib_INCLUDE_DIRS}) target_include_directories(main PRIVATE ${RAYLIB_INCLUDE_DIRS})
target_link_libraries(main PRIVATE ${raylib_LIBRARIES}) target_link_libraries(main PRIVATE ${RAYLIB_LIBRARIES})

View File

@ -1,14 +1,11 @@
set(raylib_USE_STATIC_LIBS @STATIC@) include(SelectLibraryConfigurations)
_find_package(${ARGS}) find_path(RAYLIB_INCLUDE_DIR raylib.h)
if(raylib_FOUND) find_library(RAYLIB_LIBRARY_DEBUG NAMES raylib libraylib NAMES_PER_DIR PATH_SUFFIXES lib PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug" NO_DEFAULT_PATH REQUIRED)
get_filename_component(_raylib_lib_name ${raylib_LIBRARY} NAME) find_library(RAYLIB_LIBRARY_RELEASE NAMES raylib libraylib NAMES_PER_DIR PATH_SUFFIXES lib PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}" NO_DEFAULT_PATH REQUIRED)
set(raylib_LIBRARY select_library_configurations(RAYLIB)
debug ${CURRENT_INSTALLED_DIR}/debug/lib/${_raylib_lib_name}
optimized ${CURRENT_INSTALLED_DIR}/lib/${_raylib_lib_name}
)
set(raylib_LIBRARIES ${raylib_LIBRARY}) set(RAYLIB_INCLUDE_DIRS ${RAYLIB_INCLUDE_DIR})
endif() set(RAYLIB_LIBRARIES ${RAYLIB_LIBRARY})