-
Notifications
You must be signed in to change notification settings - Fork 235
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
Allow KTX_VERSION_FULL to be manually specified #922
Conversation
What is the information contained in the downloaded tar.gz? Is it the name of the git tag? |
Oh, maybe this was not clear. When we go to the release tab here to the latest version https://github.com/KhronosGroup/KTX-Software/releases/tag/v4.3.2 At the bottom we can download the tar.gz snapshot of this repository: Which gives a link to https://github.com/KhronosGroup/KTX-Software/archive/refs/tags/v4.3.2.tar.gz If you download this file and try to build from source, you will get a 0.0.0.0 version number because it is failing to resolve the Version number from git. This PR is allowing to specify the version to cmake when we know about it (we download a specific version through a tag), so we can build this repository without doing a git checkout by just using the artifacts. This is a requirement for Alpine Linux to be able to build from tar.gz. Hope that clarifies. |
The only bit that wasn't, and still isn't, clear is "automatically from the tar.gz downloaded". I get you download the artifacts for a particular tag and I get that absent the git repo the version.cmake does not produce a version. Is the automatic part something in the tar.gz, which is implied by "from" or is it that your scripts request a particular tag and use that same tag name when creating the full version? I want to understand how easy or otherwise it is for your system to create a totally nonsense version number. In this scenario how do you correctly create the various version.h files that are included in the commands to support their |
Ok, the number is specified when we download a version. So, it's not totally nonsense, because it is the actual tag on this repo. And this repo is using the actual tag to make the version number, so we are matching this accordingly. But to explain this further, the following should explain how packages in Alpine Linux are built: Alpine linux is using a custom build system to build packages. This is stored in an APKBUILD file in their repo. For example, at this line, You see the version number: https://gitlab.alpinelinux.org/alpine/aports/-/blob/master/community/allegro/APKBUILD#L4 # Contributor: Bart Ribbers <[email protected]>
# Maintainer: Bart Ribbers <[email protected]>
pkgname=allegro
pkgver=5.2.9.1 At the following line here https://gitlab.alpinelinux.org/alpine/aports/-/blob/master/community/allegro/APKBUILD#L27 you have the URL to GitHub to download the package: source="https://github.com/liballeg/allegro5/releases/download/$pkgver/allegro-$pkgver.tar.gz"
subpackages="$pkgname-dev" The download package is matching the git version.
With this PR, I can pass the |
That being said, I think I checked only libktx, but looking at cmake scripts, for tools, it looks like we are delegating this to |
I could propagate the tag to the mkversion with e.g a special argument like |
|
Are you working on this? |
Yes, I will do it on my spare time. |
@MarkCallow so I have pushed a fix that propagates the version to mkversion, but it seems that there was a discrepancy between the version expected for tools (prefixed with v) and the lib itself. All tool tests are checking that the --version is including the prefix set_tests_properties(
ktx2ktx2-test.version
PROPERTIES
PASS_REGULAR_EXPRESSION "^ktx2ktx2 v[0-9][0-9\\.]+"
) What would you prefer to see? Keeping the existing behavior or normalizing version across all tools so that |
Oh, actually, that's because a few lines later in version.cmake
|
I have started to open a PR on alpine with the latest fixes from this PR here to give an example of how the KTX package will be prepared there. |
The intent is that the version emitted by a tool's That you can pass -DKTX_VERSION_FULL to CMake should be documented somewhere. I don't think it should be a cache variable given how easy it is to inadvertently have CMake used values stored in the cache. |
The name change to |
But as I said earlier, KTX-Software/cmake/version.cmake Line 160 in 110f049
This line was actually overriding |
Sorry. I missed that line. |
1.3.290 is the first release of official iOS support and first with support for Windows arm64. Stop using binaries of SDL2, assimp and glew libraries stored in repo because an updated SDL2 is needed for 1.3.290 and more platforms are now supported. Dependencies for iOS, macOS and Windows are now obtained through vcpkg. Those for Linux through the package manager as before. Thus remove other_lib, other_include/{SDL2,assimp} and other_include/GL/{glew,glxew,wglew}.h. Move the modified Vulkan manifest files to tests/loadtests/appfwSDL/VulkanAppSDL. This incidentally fixes #763. These changes plus removal of the hacks for finding the iOS components in older Vulkan SDKs means a major revamp of the load tests-related CMake files. vcpkg is used in manifest mode so installation of dependencies is automatic once vcpkg is installted. This use of vcpkg led to a reshuffle of the root CMakeLists.txt to put some options before the project() comment so their values can be used to set VCPKG-related variables. Deployment target for iOS is bumped to 12.0 and for macOS to 11.0 to match what is supported by this Vulkan SDK. The PR also fixes some unrelated problems: 1. A syntax error in scripts/mkversion most likely introduced by PR #922. It is unclear why CI did not fail with this. 2. Use of a query in `scripts/build_win.ps1 that returned process architecture not machine architecture. VS2022 Developer PowerShells are x86 processes leading to failure with the old query. Use Get-ComputerInfo instead. 3. Also in `scripts/build_win.ps1`, a warning when `PYTHON` is defined on the CMake configure command line if FEATURE_PYTHON is not ON.
Hello,
I would like to add ktx as a package to Alpine Linux, and one requirement is to be able to build from a tar.gz published from v4.3.2) but the current
cmake/version.cmake
is forcing to build from the original git repo, while when building within Alpine aports, we specify the version ourselves as part of the Alpine build system (automatically from the tar.gz downloaded).This PR is making a small change to
cmake/version.cmake
to allow to passKTX_VERSION_FULL
to cmake.