-
Notifications
You must be signed in to change notification settings - Fork 3
/
CMakeLists.txt
31 lines (24 loc) · 957 Bytes
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
cmake_minimum_required(VERSION 3.24)
set(CMAKE_CUDA_FLAGS -std=c++17) # must be set before CUDA detection
project(_jaxsplat LANGUAGES CXX CUDA)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CUDA_ARCHITECTURES native)
set(PYBIND11_NEWPYTHON ON)
find_package(pybind11 CONFIG REQUIRED)
include_directories(${CMAKE_CURRENT_LIST_DIR}/lib)
include_directories(${CMAKE_CUDA_TOOLKIT_INCLUDE_DIRECTORIES})
pybind11_add_module(
_jaxsplat
${CMAKE_CURRENT_LIST_DIR}/lib/ffi.cu
${CMAKE_CURRENT_LIST_DIR}/lib/ops.cu
${CMAKE_CURRENT_LIST_DIR}/lib/kernels/forward.cu
${CMAKE_CURRENT_LIST_DIR}/lib/kernels/backward.cu
${CMAKE_CURRENT_LIST_DIR}/lib/kernels/other.cu
)
if(DEFINED SKBUILD)
set(JAXSPLAT_INSTALL_DEST ${SKBUILD_PLATLIB_DIR})
else()
set(JAXSPLAT_INSTALL_DEST ${CMAKE_CURRENT_LIST_DIR})
endif()
message(STATUS "Installing _jaxsplat to ${JAXSPLAT_INSTALL_DEST}")
install(TARGETS _jaxsplat LIBRARY DESTINATION ${JAXSPLAT_INSTALL_DEST})