Skip to content

Commit

Permalink
fix: include dir variables were not being set corectly
Browse files Browse the repository at this point in the history
Signed-off-by: Kenzo Lobos-Tsunekawa <kenzo.lobos@tier4.jp>
  • Loading branch information
knzo25 committed Feb 14, 2025
1 parent 3fe5e55 commit 0836bdd
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 12 deletions.
4 changes: 4 additions & 0 deletions cumm/cmake/cummConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,7 @@ endif()

set(CUMM_INCLUDE_PATH
${CUMM_INSTALL_PREFIX}/include)
set(CUMM_INCLUDE_DIR
${CUMM_INSTALL_PREFIX}/include)
set(CUMM_INCLUDE_DIRS
${CUMM_INSTALL_PREFIX}/include)
13 changes: 2 additions & 11 deletions spconv/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,33 +20,24 @@ configure_package_config_file(
INSTALL_DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/spconv
)


include_directories(include)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include)

add_subdirectory(src)
# tell parent spconv2 include path.
set(SPCONV2_INCLUDE_PATH ${${PROJECT_NAME}_SOURCE_DIR}/include PARENT_SCOPE)

#install (TARGETS spconv
# ARCHIVE DESTINATION lib
# LIBRARY DESTINATION lib
# RUNTIME DESTINATION bin)


# Install the shared library
install(TARGETS spconv
EXPORT spconvTargets
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} # If you also have a static library
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} # If you have executables
INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
)

# Install the header files
install(DIRECTORY include/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})




# Export the targets
install(EXPORT spconvTargets
FILE spconvTargets.cmake
Expand Down
21 changes: 20 additions & 1 deletion spconv/cmake/spconvConfig.cmake.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
@PACKAGE_INIT@
include(CMakeFindDependencyMacro)

include("${CMAKE_CURRENT_LIST_DIR}/spconvTargets.cmake")
find_dependency(CUDAToolkit)
find_dependency(OpenMP)

include("${CMAKE_CURRENT_LIST_DIR}/@PROJECT_NAME@Targets.cmake")
check_required_components("@PROJECT_NAME@")

if(DEFINED ENV{SPCONV_INSTALL_PREFIX})
set(SPCONV_INSTALL_PREFIX $ENV{SPCONV_INSTALL_PREFIX})
else()
get_filename_component(CMAKE_CURRENT_LIST_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
get_filename_component(SPCONV_INSTALL_PREFIX "${CMAKE_CURRENT_LIST_DIR}/../../../" ABSOLUTE)
endif()

set(SPCONV_INCLUDE_PATH
${SPCONV_INSTALL_PREFIX}/include)
set(SPCONV_INCLUDE_DIR
${SPCONV_INSTALL_PREFIX}/include)
set(SPCONV_INCLUDE_DIRS
${SPCONV_INSTALL_PREFIX}/include)

0 comments on commit 0836bdd

Please sign in to comment.