-
Notifications
You must be signed in to change notification settings - Fork 200
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
FindFruit from Cmake after installing via vcpkg.json #163
Comments
Hi, I suspect this is due to the vcpkg configuration, from my understanding it was written more as a way to use Fruit as a dependency of another project that uses vcpkg as opposed to a general way to install Fruit and then use it in various build systems (unless your project uses both cmake and vcpkg?). https://github.com/google/fruit/wiki/install has other options to install Fruit that (unlike vcpkg) are officially supported. If the other (non-vcpkg) options don't work well for you, can you explain your use case more in detail? |
I think it is because vcpkg is customizing the CMake configuration when installing fruit. If you look at ports/fruit/portfile.cmake, you will see that fruit is installed using a custom command provided by vcpkg. From my little research, it seems that the |
For this product and its build environment, it is actually Windows. Since I do a lot of Linux development and PowerShell handles forward slashes, when acceptable, we use forward slashes. We are using vcpkg.json to pull in several Boost libraries, OpenCL, and several other libraries across 60+ repositories being built with GitHub Actions. I am introducing DI using Fruit and it seemed the easiest way to add it. Plus we are building arm64 in addition to x64. vcpkg triplets constructed with the processor as a variable is convenient. tt4g, you have pointed out the issue being the portfile.cmake. I will create a story in our backlog and see if I can fix it at some point. Thank you. |
It seems that at least |
We have a VcpkgSupport.cmake file (in a git submodule ) that sets the CMAKE_TOOLCHAIN_FILE value along with a number of other VCPKG_* variables that is included prior to the project() command. Please feel free to pelt me with any other suggestions. It is always possible I overlooked something :). Thank you for your help. |
After installing Fruit via vcpkg.json, FindFruit() was not in the path. It was in the ./vcpkg/buildtrees/fruit/src/v3.7.1-b712e99c79.clean/cmake-modules/FindFruit.cmake. A file(GLOB_RECURSE...) found the file's path and I was able to add it to the CMAKE_MODULE_PATH and then call FindFruit(), but it would be nice FindFruit.cmake was automagically added to the path. Also the vcpkg include and libpath was not updated and had to be set manually. Is this a vcpkg port issue? Or something in Fruit's CMake support?
The text was updated successfully, but these errors were encountered: