mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-21 19:27:56 +08:00
6234487442
* [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>
74 lines
2.2 KiB
CMake
74 lines
2.2 KiB
CMake
# https://github.com/raysan5/raylib/issues/388
|
|
vcpkg_fail_port_install(ON_ARCH "arm" ON_TARGET "uwp")
|
|
|
|
if(VCPKG_TARGET_IS_OSX OR VCPKG_TARGET_IS_LINUX)
|
|
message(
|
|
"raylib currently requires the following libraries from the system package manager:
|
|
libgl1-mesa-dev
|
|
libx11-dev
|
|
libxcursor-dev
|
|
libxinerama-dev
|
|
libxrandr-dev
|
|
These can be installed on Ubuntu systems via sudo apt install libgl1-mesa-dev libx11-dev libxcursor-dev libxinerama-dev libxrandr-dev"
|
|
)
|
|
endif()
|
|
|
|
vcpkg_from_github(
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
REPO raysan5/raylib
|
|
REF 7ef114d1da2c34a70bba5442497103441647d8f3 # 3.0.0
|
|
SHA512 e15df6f0f95d9580d6211459815f174496b1385c9797a682d372a03b1175c9eb38e51b3b27077346d5e1a2d6ee2d5c636e03e8fd3ca9a73a7fa2a67afd255bd2
|
|
HEAD_REF master
|
|
)
|
|
|
|
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" SHARED)
|
|
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" STATIC)
|
|
|
|
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
|
FEATURES
|
|
hidpi SUPPORT_HIGH_DPI
|
|
use-audio USE_AUDIO
|
|
)
|
|
|
|
vcpkg_configure_cmake(
|
|
SOURCE_PATH ${SOURCE_PATH}
|
|
PREFER_NINJA
|
|
OPTIONS
|
|
-DBUILD_EXAMPLES=OFF
|
|
-DBUILD_GAMES=OFF
|
|
-DSHARED=${SHARED}
|
|
-DSTATIC=${STATIC}
|
|
-DUSE_EXTERNAL_GLFW=OFF # externl glfw3 causes build errors on Windows
|
|
${FEATURE_OPTIONS}
|
|
OPTIONS_DEBUG
|
|
-DENABLE_ASAN=ON
|
|
-DENABLE_UBSAN=ON
|
|
-DENABLE_MSAN=OFF
|
|
OPTIONS_RELEASE
|
|
-DENABLE_ASAN=OFF
|
|
-DENABLE_UBSAN=OFF
|
|
-DENABLE_MSAN=OFF
|
|
)
|
|
|
|
vcpkg_install_cmake()
|
|
|
|
vcpkg_copy_pdbs()
|
|
|
|
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT})
|
|
|
|
file(REMOVE_RECURSE
|
|
${CURRENT_PACKAGES_DIR}/debug/include
|
|
${CURRENT_PACKAGES_DIR}/debug/share
|
|
)
|
|
|
|
if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
|
|
vcpkg_replace_string(
|
|
${CURRENT_PACKAGES_DIR}/include/raylib.h
|
|
"defined(USE_LIBTYPE_SHARED)"
|
|
"1 // defined(USE_LIBTYPE_SHARED)"
|
|
)
|
|
endif()
|
|
|
|
configure_file(${CMAKE_CURRENT_LIST_DIR}/usage ${CURRENT_PACKAGES_DIR}/share/${PORT}/usage @ONLY)
|
|
configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY)
|