path error?

This commit is contained in:
A13501350
2025-09-20 22:11:24 +08:00
parent a05038ed5f
commit 3881488727
2 changed files with 10 additions and 2 deletions

View File

@@ -31,14 +31,12 @@ jobs:
$apachePath = "${{ github.workspace }}\apache-x86" $apachePath = "${{ github.workspace }}\apache-x86"
New-Item -ItemType Directory -Path $apachePath -Force New-Item -ItemType Directory -Path $apachePath -Force
choco install apache-httpd -y --force --forcex86 --params="`"/installLocation:$apachePath /noService`"" choco install apache-httpd -y --force --forcex86 --params="`"/installLocation:$apachePath /noService`""
# 设置环境变量供后续步骤使用
echo "APACHE_ROOT=$apachePath\Apache24" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append echo "APACHE_ROOT=$apachePath\Apache24" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
- name: Set Apache path for x64 - name: Set Apache path for x64
if: matrix.arch == 'x64' if: matrix.arch == 'x64'
shell: pwsh shell: pwsh
run: | run: |
# 对于 x64使用预装的 Apache
echo "APACHE_ROOT=C:\tools\Apache24" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append echo "APACHE_ROOT=C:\tools\Apache24" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
- name: Setup MSYS2 - name: Setup MSYS2
@@ -95,6 +93,15 @@ jobs:
$archFlag = "${{ matrix.arch }}" $archFlag = "${{ matrix.arch }}"
$cmakeArch = if ($archFlag -eq "x86") { "Win32" } else { "x64" } $cmakeArch = if ($archFlag -eq "x86") { "Win32" } else { "x64" }
$vcpkgIncludePath = "${{ github.workspace }}\build\vcpkg_installed\${{ matrix.arch }}-windows\include"
Write-Host "Checking vcpkg include path: $vcpkgIncludePath"
if (Test-Path -Path $vcpkgIncludePath) {
Write-Host "vcpkg include path exists. Contents:"
Get-ChildItem -Path $vcpkgIncludePath
} else {
Write-Host "vcpkg include path does not exist."
}
cmake ` cmake `
-DAPACHE_ROOT="$env:APACHE_ROOT" ` -DAPACHE_ROOT="$env:APACHE_ROOT" `
-DSSDEEP_ROOT="${{ github.workspace }}\ssdeep-install-${{ matrix.arch }}" ` -DSSDEEP_ROOT="${{ github.workspace }}\ssdeep-install-${{ matrix.arch }}" `

View File

@@ -199,6 +199,7 @@ endif()
option(WITH_YAJL "Enable YAJL support" OFF) option(WITH_YAJL "Enable YAJL support" OFF)
if(WITH_YAJL) if(WITH_YAJL)
# Manually find YAJL if config.cmake is not available (e.g., from vcpkg) # Manually find YAJL if config.cmake is not available (e.g., from vcpkg)
message(Finding YAJL in ${CMAKE_CURRENT_SOURCE_DIR}/build/vcpkg_installed/${ARCHITECTURE}-windows/include)
find_path(YAJL_INCLUDE_DIR yajl/yajl_common.h find_path(YAJL_INCLUDE_DIR yajl/yajl_common.h
PATHS "${CMAKE_CURRENT_SOURCE_DIR}/build/vcpkg_installed/${ARCHITECTURE}-windows/include" PATHS "${CMAKE_CURRENT_SOURCE_DIR}/build/vcpkg_installed/${ARCHITECTURE}-windows/include"
NO_DEFAULT_PATH NO_DEFAULT_PATH