Skip to content

Commit 024e5cb

Browse files
author
NeiroYT
committed
TBB fix
1 parent a6bd851 commit 024e5cb

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

3rdparty/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ add_subdirectory(googletest)
33
file(MAKE_DIRECTORY "${CMAKE_SOURCE_DIR}/3rdparty/TBB/build")
44

55
execute_process(
6-
COMMAND ${CMAKE_COMMAND} -S "${CMAKE_SOURCE_DIR}/3rdparty/TBB" -B "${CMAKE_SOURCE_DIR}/3rdparty/TBB/build" -DCMAKE_C_COMPILER_LAUNCHER=${CMAKE_C_COMPILER_LAUNCHER} -DCMAKE_CXX_COMPILER_LAUNCHER=${CMAKE_CXX_COMPILER_LAUNCHER} -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
6+
COMMAND ${CMAKE_COMMAND} -S "${CMAKE_SOURCE_DIR}/3rdparty/TBB" -B "${CMAKE_SOURCE_DIR}/3rdparty/TBB/build" -DCMAKE_C_COMPILER_LAUNCHER=${CMAKE_C_COMPILER_LAUNCHER} -DCMAKE_CXX_COMPILER_LAUNCHER=${CMAKE_CXX_COMPILER_LAUNCHER} -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -DTBB_OUTPUT_DIR_BASE=tbb
77
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}/3rdparty/TBB/build"
88
)
99
execute_process(
@@ -12,4 +12,4 @@ execute_process(
1212
)
1313

1414
option(TBB_TEST OFF)
15-
add_subdirectory(TBB)
15+
add_subdirectory(TBB)

src/layers/CMakeLists.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
11
file(GLOB_RECURSE layers_src *.cpp)
22
add_library(layers_lib STATIC "${LAYERS_HEADERS}" "${layers_src}")
33
target_link_libraries(layers_lib PUBLIC TBB::tbb)
4+
if (WIN32)
5+
string(TOLOWER ${CMAKE_BUILD_TYPE} lower_build)
6+
file(GLOB_RECURSE tbb_files "${CMAKE_SOURCE_DIR}/3rdparty/TBB/build/tbb_${lower_build}/tbb*")
7+
add_custom_command(TARGET layers_lib POST_BUILD
8+
COMMAND ${CMAKE_COMMAND} -E copy
9+
${tbb_files}
10+
"${CMAKE_BINARY_DIR}/bin/")
11+
endif()

0 commit comments

Comments
 (0)