Skip to content

Commit

Permalink
Fix CMake install logic
Browse files Browse the repository at this point in the history
  • Loading branch information
madmann91 committed May 20, 2024
1 parent cf8160c commit 2d6dc4e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ if (PROJECT_IS_TOP_LEVEL)
if (BUILD_TESTING)
add_subdirectory(test)
endif()
endif()

include(cmake/Install.cmake)
include(cmake/Install.cmake)
endif()
9 changes: 7 additions & 2 deletions cmake/Install.cmake
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
set(bvh_targets bvh)
if (BVH_BUILD_C_API)
list(APPEND bvh_targets bvh_c)
endif()

install(
TARGETS bvh_c
TARGETS ${bvh_targets}
EXPORT bvh_exports
RUNTIME DESTINATION bin/
LIBRARY DESTINATION lib/
Expand All @@ -8,7 +13,7 @@ install(
install(
EXPORT bvh_exports
FILE bvh-targets.cmake
NAMESPACE bvh::v2
NAMESPACE bvh::v2::
DESTINATION lib/cmake/bvh/v2/)

include(CMakePackageConfigHelpers)
Expand Down

0 comments on commit 2d6dc4e

Please sign in to comment.