Skip to content

Commit

Permalink
Use proper vcpkg vars for detecting build environment OS
Browse files Browse the repository at this point in the history
This should fix these errors:

Make Warning at scripts/ports.cmake:167 (message):
  Unexpected UNKNOWN_READ_ACCESS on variable APPLE in script mode.

  This variable name insufficiently expresses whether it refers to the target
  system or to the host system.  Use a prefixed variable instead.

  - Variables providing information about the host:

    CMAKE_HOST_<SYSTEM>
    VCPKG_HOST_IS_<SYSTEM>

  - Variables providing information about the target:

    VCPKG_TARGET_IS_<SYSTEM>
    VCPKG_DETECTED_<VARIABLE> (using vcpkg_cmake_get_vars)

Call Stack (most recent call first):
  C:/code/ThirdParty-Packages-vcpkg/custom-ports/whispercpp-basic/portfile.cmake:2147483647 (z_vcpkg_warn_ambiguous_system_variables)
  • Loading branch information
mike-malburg committed Jun 17, 2024
1 parent cb89f5c commit 61059ca
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion custom-ports/whispercpp-basic/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ vcpkg_from_github(
0001-UpdateTargetName.patch
)

if(APPLE)
if(VCPKG_HOST_IS_OSX)
vcpkg_cmake_configure(
SOURCE_PATH ${SOURCE_PATH}
OPTIONS
Expand Down
2 changes: 1 addition & 1 deletion custom-ports/whispercpp/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ vcpkg_from_github(
HEAD_REF master
)

if(APPLE)
if(VCPKG_HOST_IS_OSX)
vcpkg_cmake_configure(
SOURCE_PATH ${SOURCE_PATH}
OPTIONS
Expand Down

0 comments on commit 61059ca

Please sign in to comment.