Skip to content

Commit

Permalink
[raylib] Fix the feature issue (microsoft#12783)
Browse files Browse the repository at this point in the history
  • Loading branch information
PhoebeHui authored Aug 7, 2020
1 parent 23fcc57 commit 8121b4e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
7 changes: 4 additions & 3 deletions ports/raylib/CONTROL
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
Source: raylib
Version: 3.0.0
Port-Version: 1
Port-Version: 2
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: non-audio
Description: Build raylib without audio module
Feature: use-audio
Description: Build raylib with audio module
10 changes: 3 additions & 7 deletions ports/raylib/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@ string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" SHARED)
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" STATIC)

vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
INVERTED_FEATURES
non-audio USE_AUDIO
use-audio USE_AUDIO
)

vcpkg_configure_cmake(
Expand All @@ -37,8 +36,8 @@ vcpkg_configure_cmake(
-DBUILD_GAMES=OFF
-DSHARED=${SHARED}
-DSTATIC=${STATIC}
-DUSE_AUDIO=${USE_AUDIO}
-DUSE_EXTERNAL_GLFW=OFF # externl glfw3 causes build errors on Windows
${FEATURE_OPTIONS}
OPTIONS_DEBUG
-DENABLE_ASAN=ON
-DENABLE_UBSAN=ON
Expand Down Expand Up @@ -74,8 +73,5 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
)
endif()

# Install usage
configure_file(${CMAKE_CURRENT_LIST_DIR}/usage ${CURRENT_PACKAGES_DIR}/share/${PORT}/usage @ONLY)

# Handle copyright
configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY)
configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY)

0 comments on commit 8121b4e

Please sign in to comment.