Closed miyanyan closed 1 year ago
You can control the port version that needs to be called through the manifest mode.
You can control the port version that needs to be called through the manifest mode.
I got this error when I wanted to update opencolorio to v2.3.0, the CMakeLists.txt of opencolorio v2.3.0 changed find package function, so if version: unknown
is allowed in vcpkg, I can modify share/cmake/modules/FindExtPackages.cmake
like this:
from
# ocio_handle_dependency will call find_package
if(OCIO_BUILD_APPS)
# NOTE: Depending of the compiler version lcms2 2.2 does not compile with
# C++17 so, if you change the lcms2 version update the code to compile
# lcms2 and dependencies with C++17 or higher i.e. remove the cap of C++
# version in Findlcms2.cmake and src/apps/ociobakelut/CMakeLists.txt.
# lcms2
# https://github.com/mm2/Little-CMS
ocio_handle_dependency( lcms2 REQUIRED ALLOW_INSTALL
MIN_VERSION 2.2
RECOMMENDED_VERSION 2.2
RECOMMENDED_VERSION_REASON "Latest version tested with OCIO")
endif()
to
if(OCIO_BUILD_APPS)
# NOTE: Depending of the compiler version lcms2 2.2 does not compile with
# C++17 so, if you change the lcms2 version update the code to compile
# lcms2 and dependencies with C++17 or higher i.e. remove the cap of C++
# version in Findlcms2.cmake and src/apps/ociobakelut/CMakeLists.txt.
# lcms2
# https://github.com/mm2/Little-CMS
ocio_handle_dependency( lcms2 REQUIRED ALLOW_INSTALL )
endif()
Who provides an lcms2
cmake package with version information?
The CMake config provided by vcpkg is unofficial, even if not decorated this way, and doesn't offer version information. The port comes with its own CMakeLists.txt...
There is a new release 2.15 which features a meson build system. vcpkg should switch, and maybe there is an official cmake config generated now.
Last not least most providers chose the port name lcms2
(and lcms
for versions < 2), and I always stumble over vcpkg not using the common name. Maybe time to switch?
https://repology.org/project/lcms/versions
yeah, the port name also makes me confused...
If you use the classic find_package()
to find a library, only the latest version of the library will be found in vcpkg
. If you want to use a fixed version, you can use it in manifest
mode.
If the port name is inconsistent with the upstream port name, we will modify it as much as possible to make the name consistent.
Thanks for posting this issue. Please reopen this issue if this is still a problem for you.
Describe the bug I got an version error when use:
or
Environment
To Reproduce Steps to reproduce the behavior:
Expected behavior find exact version of lcms
Additional context I find that in
port/lcms/CMakeLists.txt
:I don't how cmake version works, maybe should set some vars like
PACKAGE_FIND_VERSION