-
Notifications
You must be signed in to change notification settings - Fork 6.6k
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
find_package(VTK) causes IMPORTED_LOCATION not set for imported target "EXPAT::EXPAT" error in x64-linux #20237
Comments
VTK comes with its own vcpkg/ports/vtk/FindExpat.patch Lines 11 to 16 in 8275003
In the last line, what was meant is probably |
cmake_minimum_required(VERSION 3.10)
project(sample)
find_package(VTK REQUIRED)
add_executable(sample test.cpp)
target_link_libraries(sample PRIVATE ${VTK_LIBRARIES})
Oh, it's a warning message in my side. |
The expat wrapper sets
This policy is set as soon as you use |
In installed/x64-linux/share/vtk/VTK-vtk-module-find-packages.cmake: Remove the internal |
But even then, vcpkg will use the expat wrapper. |
@dg0yt vtk will use them both: call
|
Environment
To Reproduce
Please see below CMakeLists.txt to reproduce the error
In x64-linux, a simple
mkdir build && cd build && cmake ..
shows the below errorAfter some debugging, I realized that if I insert
set(CMAKE_BUILD_TYPE "Release")
the error will go away, e.g.However, cmake config should not fail even if
CMAKE_BUILD_TYPE
is not set. Would appreciate if someone can fix this.The text was updated successfully, but these errors were encountered: