diff options
| author | George White <georgeunix@gmail.com> | 2020-08-10 17:33:50 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-08-10 09:33:50 -0700 |
| commit | 6234487442308afe7829dfd20a058b6e15a92db6 (patch) | |
| tree | 20cf920f3c28063ca9cb97b1c163842958901a2d | |
| parent | 46bb7e925df069c26994492402e0c70fbe5cad05 (diff) | |
| download | vcpkg-6234487442308afe7829dfd20a058b6e15a92db6.tar.gz vcpkg-6234487442308afe7829dfd20a058b6e15a92db6.zip | |
[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>
| -rw-r--r-- | ports/raylib/CONTROL | 5 | ||||
| -rw-r--r-- | ports/raylib/portfile.cmake | 10 | ||||
| -rw-r--r-- | ports/raylib/usage | 4 | ||||
| -rw-r--r-- | ports/raylib/vcpkg-cmake-wrapper.cmake | 17 |
4 files changed, 16 insertions, 20 deletions
diff --git a/ports/raylib/CONTROL b/ports/raylib/CONTROL index efa8155c2..7308a4e43 100644 --- a/ports/raylib/CONTROL +++ b/ports/raylib/CONTROL @@ -1,10 +1,13 @@ Source: raylib
Version: 3.0.0
-Port-Version: 2
+Port-Version: 3
Description: A simple and easy-to-use library to enjoy videogames programming
Homepage: https://github.com/raysan5/raylib
Supports: !(arm|uwp)
Default-Features: use-audio
+Feature: hidpi
+Description: Support high-DPI displays
+
Feature: use-audio
Description: Build raylib with audio module
diff --git a/ports/raylib/portfile.cmake b/ports/raylib/portfile.cmake index 0d47a969f..ba63fff84 100644 --- a/ports/raylib/portfile.cmake +++ b/ports/raylib/portfile.cmake @@ -25,7 +25,9 @@ string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" SHARED) string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" STATIC)
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
- use-audio USE_AUDIO
+ FEATURES
+ hidpi SUPPORT_HIGH_DPI
+ use-audio USE_AUDIO
)
vcpkg_configure_cmake(
@@ -54,12 +56,6 @@ vcpkg_copy_pdbs() 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
${CURRENT_PACKAGES_DIR}/debug/include
${CURRENT_PACKAGES_DIR}/debug/share
diff --git a/ports/raylib/usage b/ports/raylib/usage index 936b74f50..94ce10978 100644 --- a/ports/raylib/usage +++ b/ports/raylib/usage @@ -1,5 +1,5 @@ The package @PORT@:@TARGET_TRIPLET@ provides CMake targets:
find_package(@PORT@ CONFIG REQUIRED)
- target_include_directories(main PRIVATE ${raylib_INCLUDE_DIRS})
- target_link_libraries(main PRIVATE ${raylib_LIBRARIES})
+ target_include_directories(main PRIVATE ${RAYLIB_INCLUDE_DIRS})
+ target_link_libraries(main PRIVATE ${RAYLIB_LIBRARIES})
diff --git a/ports/raylib/vcpkg-cmake-wrapper.cmake b/ports/raylib/vcpkg-cmake-wrapper.cmake index 81e9989ec..34484ea6f 100644 --- a/ports/raylib/vcpkg-cmake-wrapper.cmake +++ b/ports/raylib/vcpkg-cmake-wrapper.cmake @@ -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)
- get_filename_component(_raylib_lib_name ${raylib_LIBRARY} NAME)
+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)
+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
- debug ${CURRENT_INSTALLED_DIR}/debug/lib/${_raylib_lib_name}
- optimized ${CURRENT_INSTALLED_DIR}/lib/${_raylib_lib_name}
- )
+select_library_configurations(RAYLIB)
- set(raylib_LIBRARIES ${raylib_LIBRARY})
-endif()
+set(RAYLIB_INCLUDE_DIRS ${RAYLIB_INCLUDE_DIR})
+set(RAYLIB_LIBRARIES ${RAYLIB_LIBRARY})
|
