Closed Nekto89 closed 4 years ago
This looks really nice -- just one question (I have never used this approach): can you take a look at the other commit #37 and let me know what the difference is? I'm planning to merge one of the two but am not familiar enough with this usage of Cmake. Thanks!
I don't know who will need to install both static and dynamic configurations in one package.
It's probably better to have same imported target names as in official package (TBB::tbb, TBB::tbbmalloc, TBB::tbbmalloc_proxy).
Additional config file in #37 will be more flexible because it will allow to add more information there in future (for example, TBB_INTERFACE_VERSION like in official TBBConfig.cmake).
hi @wjakob can you merge this one ?
I too would really like to do "find_package(tbb)" and have it work. I assume this pull request would achieve that, is there any plan to merge this in the near future?
It's up to @wjakob, please answer.
@wjakob should I change something?
Sorry about the big delay, I am maintaining many open source projects and my time for each one is quite limited. I am just going to merge this PR for now since it targets the shared exports, and that generally seem more useful to me. @tschw, if you are still interested in adding CMake exports for the static targets, can you adjust your pr #37 on top of this?
@wjakob maybe you could grant me write access so to avoid these delays
I can confirm that find_package(TBB)
works for me now. It creates a TBB::tbb
library I can link to successfully. Thanks everyone for making this available!
However, I don't see version support, so find_package(TBB 2019)
doesn't work. This is less important, but still might be nice. I'm no expert, but I think fix might be something like:
set(cmake_config_version_file "${CMAKE_CURRENT_BINARY_DIR}/TBBConfigVersion.cmake")
set(cmake_destination_directory "${CMAKE_INSTALL_LIBDIR}/cmake/tbb")
include(CMakePackageConfigHelpers)
write_basic_package_version_file("${cmake_config_version_file}" COMPATIBILITY AnyNewerVersion)
install(FILES "${cmake_config_version_file}" DESTINATION "${make_destination_directory}")
see #68
see #68
Ooooh. Thanks! That was fast!
This allows usage of "find_package(TBB)"