-
Notifications
You must be signed in to change notification settings - Fork 6.7k
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
include ITK #22641
Comments
If you use the itk from vcpkg, please ensure that your project contains the following:
CMakeLists.txt:
|
I'm sure of my cmake-toolchain is right. And the main problem is why i can't use the example in ITK docs. I proposed the issue in ITK issues. And they thought the error was caused by vcpkg. |
Thanks for pointing to the documentation. It gives another entry for #20190. It is a pity that not only the documented pattern of usage is not working, but also the vcpkg tool is promoting wrong usage patterns. |
Describe the bug
I used vcpkg to manage the inclusion. In the CMakeLists.txt of my project, I included ITK. But the error occured. The content of CMakeLists is same as the example given by ITK docs.
Environment
Failure logs
The log was given by MSVC
CMake Error at F:/Github/vcpkg/scripts/buildsystems/vcpkg.cmake:540 (_add_executable): Target "TestDll" links to target "GTest::Main" but the target was not found. Perhaps a find_package() call is missing for an IMPORTED target, or an ALIAS target is missing?
Additional context
CMakeLists.txt
The text was updated successfully, but these errors were encountered: