Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/supermerill/SuperSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorStephen Hurd <deuce@synchro.net>2022-04-28 19:23:53 +0300
committerGitHub <noreply@github.com>2022-04-28 19:23:53 +0300
commit38e5d16449d4ccfd69aba0bfb5dead11fc3de44a (patch)
tree7216e46d1efe2785c354bff975773b4ca366c4d6 /cmake
parent0163d30540e4db608c1a8db195536cb5cfdfe170 (diff)
Fix reading TBB version (#2766)
Diffstat (limited to 'cmake')
-rw-r--r--cmake/modules/FindTBB.cmake.in6
1 files changed, 5 insertions, 1 deletions
diff --git a/cmake/modules/FindTBB.cmake.in b/cmake/modules/FindTBB.cmake.in
index a7eafa545..2177170cb 100644
--- a/cmake/modules/FindTBB.cmake.in
+++ b/cmake/modules/FindTBB.cmake.in
@@ -195,7 +195,11 @@ if(NOT TBB_FOUND)
##################################
if(TBB_INCLUDE_DIRS)
- file(READ "${TBB_INCLUDE_DIRS}/tbb/tbb_stddef.h" _tbb_version_file)
+ if (EXISTS "${TBB_INCLUDE_DIRS}/tbb/tbb_stddef.h")
+ file(READ "${TBB_INCLUDE_DIRS}/tbb/tbb_stddef.h" _tbb_version_file)
+ else()
+ file(READ "${TBB_INCLUDE_DIRS}/tbb/version.h" _tbb_version_file)
+ endif()
string(REGEX REPLACE ".*#define TBB_VERSION_MAJOR ([0-9]+).*" "\\1"
TBB_VERSION_MAJOR "${_tbb_version_file}")
string(REGEX REPLACE ".*#define TBB_VERSION_MINOR ([0-9]+).*" "\\1"