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
Using the library from Visual Studio implies manually adding the include folder #55
Comments
Interesting, thanks for reporting this. Are you not using CMake or the CMake target? I'm curious as to how thread-pool is being included. |
The easiest way to notice the problem is to install other vcpkg packages. We can notice that all the .h files and subdirectories (thread-pool folder is the equivalent here) are found directly under Here is how I'm using the library: I'm installing the threadpool from vcpkg, then I'm including it in a library this way: https://github.com/cosmin42/cpp-photobook/blob/main/PB/CMakeLists.txt . That library is then referenced in a visual studio project after it is built with At this point we should be able to build the Visual Studio project, however, for thread-pool, an additional step is needed in order to build: Adding the include folder manually to Visual Studio. If this is still not clear I think I can do a sample example. |
Hmm, this should work since you are linking to I'll have to investigate a bit further. I guess a simple solution would be to do what you propose since having multiple versions of the thread pool side by side is likely not to happen. I'd be open to a PR if you're willing to file it. |
When using the library from vcpkg along with VIsual Studio, the include path has to be added manually which should not be necessary.
Most of the vcpkg libraries have their include files directly under the
include
folder, while dp-thread pool have them underinclude\thread-pool-0.6.2
.The solution is suggested here: microsoft/vcpkg#34140
Here https://github.com/DeveloperPaul123/thread-pool/blob/079c447bbc011038705383f30acf83e011f407e4/CMakeLists.txt#L131C21-L131C83
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME}-${PROJECT_VERSION}/thread_pool
should be
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/thread_pool
The same for the other install command.
I can attempt a pull request if agreed.
Thank you.
The text was updated successfully, but these errors were encountered: