Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[github_actions] improve port compatibility #23202

Merged
merged 10 commits into from
Mar 15, 2022
Prev Previous commit
Next Next commit
fixes from review
cenit committed Mar 3, 2022

Unverified

No user is associated with the committer email.
commit e765053d3f33f7f4bc042bd93825791609f5a7e5
6 changes: 5 additions & 1 deletion scripts/buildsystems/vcpkg.cmake
Original file line number Diff line number Diff line change
@@ -397,14 +397,18 @@ function(z_vcpkg_add_vcpkg_to_cmake_path list suffix)
list(APPEND "${list}" "${vcpkg_paths}")
else()
list(INSERT "${list}" 0 "${vcpkg_paths}") # CMake 3.15 is required for list(PREPEND ...).
set(CMAKE_FIND_FRAMEWORK "LAST" PARENT_SCOPE)
endif()
set("${list}" "${${list}}" PARENT_SCOPE)
endfunction()
z_vcpkg_add_vcpkg_to_cmake_path(CMAKE_PREFIX_PATH "")
z_vcpkg_add_vcpkg_to_cmake_path(CMAKE_LIBRARY_PATH "/lib/manual-link")
z_vcpkg_add_vcpkg_to_cmake_path(CMAKE_FIND_ROOT_PATH "")

if(NOT VCPKG_PREFER_SYSTEM_LIBS)
set(CMAKE_FIND_FRAMEWORK "LAST" PARENT_SCOPE) # we assume that frameworks are usually system-wide libs, not vcpkg-built
set(CMAKE_FIND_APPBUNDLE "LAST" PARENT_SCOPE) # we assume that appbundles are usually system-wide libs, not vcpkg-built
cenit marked this conversation as resolved.
Show resolved Hide resolved
endif()

# If one CMAKE_FIND_ROOT_PATH_MODE_* variables is set to ONLY, to make sure that ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}
# and ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug are searched, it is not sufficient to just add them to CMAKE_FIND_ROOT_PATH,
# as CMAKE_FIND_ROOT_PATH specify "one or more directories to be prepended to all other search directories", so to make sure that