Another fix to properly find TBB using RKCOMMON_TBB_ROOT hint

This commit is contained in:
Johannes Günther
2020-05-27 20:00:51 +02:00
parent 94b01e9ee9
commit d7de299ede
+3 -3
View File
@@ -130,6 +130,9 @@ macro(rkcommon_create_tasking_target FROM_INSTALL)
set(RKCOMMON_TASKING_LIBS ${CMAKE_THREAD_LIBS_INIT})
if(RKCOMMON_TASKING_TBB)
if (NOT RKCOMMON_TBB_ROOT STREQUAL "")
set(TBB_ROOT ${RKCOMMON_TBB_ROOT})
endif()
if (${FROM_INSTALL})
find_dependency(TBB)
else()
@@ -138,9 +141,6 @@ macro(rkcommon_create_tasking_target FROM_INSTALL)
# CMP0074.
cmake_policy(SET CMP0074 NEW)
endif()
if (NOT RKCOMMON_TBB_ROOT STREQUAL "")
set(TBB_ROOT ${RKCOMMON_TBB_ROOT})
endif()
find_package(TBB 4.4 REQUIRED tbb tbbmalloc)
endif()