Skip to content

Commit 99ad4e1

Browse files
committed
[bvh] proper CMake target linking
1 parent 6edb39a commit 99ad4e1

3 files changed

Lines changed: 6 additions & 4 deletions

File tree

‎CMakeLists.txt‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -438,6 +438,7 @@ else()
438438
endif()
439439
add_subdirectory (montecarlo)
440440
if(geom)
441+
add_subdirectory (builtins/bvh) # hard coded builtin for geom/geom TODO mv to full builtin ROOT build option
441442
add_subdirectory (geom)
442443
endif()
443444
if(NOT WIN32)

‎builtins/bvh/src/bvh/v2/CMakeLists.txt‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ target_include_directories(bvh INTERFACE
1212

1313
set_target_properties(bvh PROPERTIES CXX_STANDARD 20)
1414

15+
add_library(bvh::bvh ALIAS bvh)
16+
1517
if (BVH_BUILD_C_API)
1618
add_subdirectory(c_api)
1719
endif()

‎geom/geom/CMakeLists.txt‎

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -128,12 +128,11 @@ ROOT_STANDARD_LIBRARY_PACKAGE(Geom
128128
Hist
129129
GenVector
130130
Imt
131+
LIBRARIES
132+
bvh::bvh
131133
)
132134

133-
target_include_directories(Geom PRIVATE res
134-
../../builtins/bvh/src # for bvh hard-coded builtin, forked from https://github.com/madmann91/bvh/commit/66e445b92f68801a6dd8ef943fe3038976ecb4ff
135-
# TODO: move this to a proper isolated builtin with find_package, and add ROOT builtin_bvh option
136-
)
135+
target_include_directories(Geom PRIVATE res)
137136
# GCC has bugs with -O3 or -Ofast that break Geom
138137
if(CMAKE_COMPILER_IS_GNUCXX)
139138
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5 OR CMAKE_SIZEOF_VOID_P LESS 8)

0 commit comments

Comments
 (0)