[raylib] Fix the feature issue (#12783)

This commit is contained in:
Phoebe 2020-08-08 07:17:24 +08:00 committed by GitHub
parent 23fcc57ad1
commit 8121b4ec3d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 10 deletions

View File

@ -1,9 +1,10 @@
Source: raylib Source: raylib
Version: 3.0.0 Version: 3.0.0
Port-Version: 1 Port-Version: 2
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
Feature: non-audio Feature: use-audio
Description: Build raylib without audio module Description: Build raylib with audio module

View File

@ -25,8 +25,7 @@ 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
INVERTED_FEATURES use-audio USE_AUDIO
non-audio USE_AUDIO
) )
vcpkg_configure_cmake( vcpkg_configure_cmake(
@ -37,8 +36,8 @@ vcpkg_configure_cmake(
-DBUILD_GAMES=OFF -DBUILD_GAMES=OFF
-DSHARED=${SHARED} -DSHARED=${SHARED}
-DSTATIC=${STATIC} -DSTATIC=${STATIC}
-DUSE_AUDIO=${USE_AUDIO}
-DUSE_EXTERNAL_GLFW=OFF # externl glfw3 causes build errors on Windows -DUSE_EXTERNAL_GLFW=OFF # externl glfw3 causes build errors on Windows
${FEATURE_OPTIONS}
OPTIONS_DEBUG OPTIONS_DEBUG
-DENABLE_ASAN=ON -DENABLE_ASAN=ON
-DENABLE_UBSAN=ON -DENABLE_UBSAN=ON
@ -74,8 +73,5 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
) )
endif() endif()
# Install usage
configure_file(${CMAKE_CURRENT_LIST_DIR}/usage ${CURRENT_PACKAGES_DIR}/share/${PORT}/usage @ONLY) 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)
# Handle copyright
configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY)