I am trying to use function find_package for my created package which is very simple for learning purposes.
This is how I create and install my own package:
This is the project where I try to use find_package method:
But I get this error after find_package command:
CMake Error in CMakeLists.txt:
Imported target "my_sort_lib" includes non-existent path
"/include/sort"
I thought, I wrote rules in this cmake lists during installation.
But I believe, installation and using the installed project are two different things.
If I understand you correctly, you’d like the build to somehow copy all the found DLLs into your build directory.
This is not how things work. You need to set the right execution environment in your IDE, so that all the needed DLLs are in your PATH.
I have no idea where one configures this in VSCode (which seems to be what you’re using).
IDEs normally have “Enviroment (variables)” section somewhere in the same window where you configure your target.
If you’re only using terminal, simple set PATH=%PATH%;C:\Program Files\whatever would suffice and you’ll be able to run your project.