Conversation
On windows static (vcpkg) the order of linking seems to be important and the main tbb lib must be first
bddcfdf to
272efed
Compare
|
|
||
|
|
||
| if(CCTAG_WITH_CUDA) | ||
| install(DIRECTORY "cctag" |
There was a problem hiding this comment.
What is the problem with this code?
There was a problem hiding this comment.
I see in the PR comment: "install the headers with an explicit list of files, otherwise empty directories may occur (e.g. cuda if cuda is disabled)".
If it's only for the empty folder, it increase the complexity too much for this small gain.
There was a problem hiding this comment.
also all the test directories were added.
This is not something that can be easily avoided with cmake
https://gitlab.kitware.com/cmake/cmake/-/issues/17122
other than using GLOB with all the problems it creates
https://stackoverflow.com/questions/55451084/cmake-files-matching-pattern-copies-empty-directories/55722518#55722518
And for the record I added this because vcpkg complains if you install empty directories
This PR fixes and improve cmake build system (no code is touched) and it should make easier the creation of the port file for vcpkg (https://github.com/alicevision/vcpkg/tree/ports/cctag)
A brief summary of the changes:
use GNUinstalldir
export the targets for in-tree build (it was missing)
print a build configuration summary at the end
all the build outputs are now found in directory named [Linux|Windows|Darwin] as standard in AV
Switch to modern cmake for Eigen, so now imported targets are used
add an option
CCTAG_EIGEN_NO_ALIGNto disable eigen alignment (@fabiencastan )Cuda support is not possible on windows unless Eigen 3.3.9 is used (as of now, not yet released, so using their develop branch): the minimum required version is in general 3.3.4, so a check is made when MSVC and Cuda are enabled to ensure the version is right otherwise cmake fails.
a fix in FindTBB to set the proper order of linking, apparently in static (under windows) tbb must be first
added properties VERSION and POSTFIX_DEBUG for all the targets
config.hpp and version.hpp are now placed in generated/cctag to allow `#include <cctag/version.hpp>
version.hpp has now a string for the full version
install the headers with an explicit list of files, otherwise empty directories may occur (e.g. cuda if cuda is disabled)
(NB there are obvious analogies with alicevision/popsift#92)