-
Notifications
You must be signed in to change notification settings - Fork 14
ome-files does not correctly load dependencies when imported in CMake #85
Comments
Hi Sean, I've opened a PR to rectify the missing log component: ome/ome-common-cpp#51 However, There is a caveat though.
only the first line will invoke Our workaround in the meantime is to run https://github.com/openmicroscopy/ome-files-performance/blob/master/cmake/BoostChecks.cmake#L40 Here we include all the needed components plus If you have any ideas for how to better work around this |
Hi Roger, Thanks for the quick reply. I'm no CMake expert so that workaround sounds good to me, I'll bear it in mind if I run into any more boost related issues. Slightly off topic but it might be useful to have a minimal example of a working CMake project incorporating ome-files - it took me a while to figure out what was needed above, even if it's fairly obvious in retrospect. Cheers |
Hi Sean, Yes, definitely agreed on the need for some standalone examples which demonstate what you need to do to build. We do have some examples in ome-files (docs/sphinx/examples) but it's still tied into the main project's cmake build, so isn't properly standalone. I've added https://trello.com/c/bNE1EV2E/17-add-example-cmake-build-for-examples for this; I'll try to get this done for the next release. |
I'm trying to integrating ome-files in a CMake C++ project. In my hands, the following is a minimal CMakeLists.txt to successfully build a ome-files project. I am building on macOS 10.12.6 with clang 4.0.
If I exclude the
find_package(Boost COMPONENTS log iostreams)
line (or use different boost components) CMake fails with the following error:As far as I understand,
find_package(OMEFiles REQUIRED)
should automatically import its dependencies and this line should not be required. This error occurs when using either the downloaded ome-files build or when using a freshly compiling super-build fromhead
.I have the build working now but thought I'd let you know as it look a while to figure this out.
The text was updated successfully, but these errors were encountered: