-
Notifications
You must be signed in to change notification settings - Fork 7.4k
[vcpkg_find_acquire_program] Enable find_acquire(PKGCONFIG) #12626
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
Changes from all commits
301ea0e
7ae5d73
7806cb3
9741bb5
038474c
f97c634
b52521e
7b44cc8
ad122ed
c3b48d4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -378,6 +378,47 @@ function(vcpkg_find_acquire_program VAR) | |
| set(URL "https://github.com/aria2/aria2/releases/download/release-1.34.0/aria2-1.34.0-win-32bit-build1.zip") | ||
| set(ARCHIVE "aria2-1.34.0-win-32bit-build1.zip") | ||
| set(HASH 2a5480d503ac6e8203040c7e516a3395028520da05d0ebf3a2d56d5d24ba5d17630e8f318dd4e3cc2094cc4668b90108fb58e8b986b1ffebd429995058063c27) | ||
| elseif(VAR MATCHES "PKGCONFIG") | ||
| set(PROGNAME pkg-config) | ||
| if(ENV{PKG_CONFIG}) | ||
| debug_message(STATUS "PKG_CONFIG found in ENV! Using $ENV{PKG_CONFIG}") | ||
| set(PKGCONFIG $ENV{PKG_CONFIG} PARENT_SCOPE) | ||
| return() | ||
| elseif(CMAKE_HOST_WIN32) | ||
| set(PROG_PATH_SUBDIR "${DOWNLOADS}/tools/${PROGNAME}/0.29.2-1") | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It seems very strange to have
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That's a good point. I can change it, but that would invoke a total rebuild of the tree. |
||
| set(PKGCONFIG "${PROG_PATH_SUBDIR}/mingw32/bin/pkg-config.exe") | ||
| if(NOT EXISTS "${PKGCONFIG}") | ||
| vcpkg_download_distfile(PKGCONFIG_ARCHIVE | ||
| URLS "https://repo.msys2.org/mingw/i686/mingw-w64-i686-pkg-config-0.29.2-1-any.pkg.tar.xz" | ||
| SHA512 3b1b706a24d9aef7bbdf3ce4427aaa813ba6fbd292ed9dda181b4300e117c3d59a159ddcca8b013fd01ce76da2d95d590314ff9628c0d68a6966bac4842540f0 | ||
| FILENAME mingw-w64-i686-pkg-config-0.29.2-1-any.pkg.tar.xz | ||
| ) | ||
| vcpkg_download_distfile(LIBWINPTHREAD_ARCHIVE | ||
| URLS "https://repo.msys2.org/mingw/i686/mingw-w64-i686-libwinpthread-git-8.0.0.5906.c9a21571-1-any.pkg.tar.zst" | ||
| SHA512 2c3d9e6b2eee6a4c16fd69ddfadb6e2dc7f31156627d85845c523ac85e5c585d4cfa978659b1fe2ec823d44ef57bc2b92a6127618ff1a8d7505458b794f3f01c | ||
| FILENAME mingw-w64-i686-libwinpthread-git-8.0.0.5906.c9a21571-1-any.pkg.tar.zst | ||
| ) | ||
| file(REMOVE_RECURSE ${PROG_PATH_SUBDIR} ${PROG_PATH_SUBDIR}.tmp) | ||
| file(MAKE_DIRECTORY ${PROG_PATH_SUBDIR}.tmp) | ||
| vcpkg_execute_required_process( | ||
| ALLOW_IN_DOWNLOAD_MODE | ||
| COMMAND ${CMAKE_COMMAND} -E tar xzf ${LIBWINPTHREAD_ARCHIVE} | ||
| WORKING_DIRECTORY ${PROG_PATH_SUBDIR}.tmp | ||
| ) | ||
| vcpkg_execute_required_process( | ||
| ALLOW_IN_DOWNLOAD_MODE | ||
| COMMAND ${CMAKE_COMMAND} -E tar xzf ${PKGCONFIG_ARCHIVE} | ||
| WORKING_DIRECTORY ${PROG_PATH_SUBDIR}.tmp | ||
| ) | ||
| file(RENAME ${PROG_PATH_SUBDIR}.tmp ${PROG_PATH_SUBDIR}) | ||
| endif() | ||
| set(${VAR} "${${VAR}}" PARENT_SCOPE) | ||
| return() | ||
| else() | ||
| set(BREW_PACKAGE_NAME pkg-config) | ||
| set(APT_PACKAGE_NAME pkg-config) | ||
| set(PATHS "/bin" "/usr/bin" "/usr/local/bin") | ||
| endif() | ||
| else() | ||
| message(FATAL "unknown tool ${VAR} -- unable to acquire.") | ||
| endif() | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why did this change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On one of the CI machines, there was a extant
geogram_${GEOGRAM_VERSION}.tar.gzfile with the previous version's hash.Renaming the file resolved the conflict.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see; it just looks odd to have that variable
GEOGRAM_VERSIONbut this be a hardcoded constant. Not necessarily worth resetting CI over but it's confusing nonetheless