Closed ranjeethmahankali closed 7 months ago
@ranjeethmahankali Thanks for posting this issue,
For cmake projects, you need to pass CMAKE_TOOLCHAIN_FILE
through run commnd .\vcpkg.exe integrate install
https://github.com/microsoft/vcpkg?tab=readme-ov-file#using-vcpkg-with-cmake.
but I lack the knowledge of vcpkg to PR this change so I figured I'd report it here.
And you can add set(CMAKE_FIND_DEBUG_MODE 1)
in front of find_package
, which can display the specific find
information of cmake in the console. :)
@FrankXie05 You can quickly that this is a real port bug.
find_package(openmesh REQUIRED)
. However there is no such find module or config. It is only implemented via vcpkg-cmake-wrapper.cmake
. So it really requires the vcpkg CMake toolchain. OTOH the wrapper breaks the usage of the official CMake config because it prevents the config being loaded. I wonder who approved this...CMake Debug Log at F:/vcpkg/installed/x64-windows/share/OpenMesh/vcpkg-cmake-wrapper.cmake:12 (find_library):
find_library called with the following settings:
VAR: OPENMESHTOOLS_LIBRARY_RELEASE
NAMES: "OpenMeshTools"
"libOpenMeshTools"
Documentation: Path to a library.
Framework
Only Search Frameworks: 0
Search Frameworks Last: 1
Search Frameworks First: 0
AppBundle
Only Search AppBundle: 0
Search AppBundle Last: 1
Search AppBundle First: 0
NO_DEFAULT_PATH Enabled
find_library considered the following locations:
F:/vcpkg/installed/x64-windows/debug/vcpkg/installed/x64-windows/lib/()OpenMeshTools(\.lib)
F:/vcpkg/installed/x64-windows/debug/vcpkg/installed/x64-windows/lib/()libOpenMeshTools(\.lib)
F:/vcpkg/installed/x64-windows/debug/vcpkg/installed/x64-windows/()OpenMeshTools(\.lib)
F:/vcpkg/installed/x64-windows/debug/vcpkg/installed/x64-windows/()libOpenMeshTools(\.lib)
The item was found at
F:/vcpkg/installed/x64-windows/lib/OpenMeshTools.lib
Call Stack (most recent call first):
F:/vcpkg/scripts/buildsystems/vcpkg.cmake:813 (include)
CMakeLists.txt:19 (find_package)
-- Configuring done (7.9s)
-- Generating done (0.0s)
-- Build files have been written to: F:/usage/build
Yes, The fake find_packahe
is replaced by find_library
and find_path
in vcpkg-cmake-wrapper.cmake
.
Describe the bug The hint shown at the end when you install openmesh currently looks like this:
But this doesn't work anymore with newer versions of the port. The $ variables are empty, so there are no include dirs or libraries to link. My project wasn't building when I updated the
builtin-baseline
insidevcpkg.json
. I got my project to build with the following:Environment
To Reproduce Steps to reproduce the behavior:
Expected behavior The project builds.
Failure logs At first you'll see this:
If you change the argument of
find_package
fromopenmesh
toOpenMesh
, the above error goes away, but you'll still get linker errors. After you update the targets the project will build properly.Additional context My project now builds without any problems, but I lack the knowledge of vcpkg to PR this change so I figured I'd report it here. Thank you!