-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathCMakeLists.txt
50 lines (43 loc) · 1.5 KB
/
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#
# Copyright (C) 2023, Inria
# GRAPHDECO research group, https://team.inria.fr/graphdeco
# All rights reserved.
#
# This software is free for non-commercial, research and evaluation use
# under the terms of the LICENSE.md file.
#
# For inquiries contact george.drettakis@inria.fr
#
cmake_minimum_required(VERSION 3.16)
project(CudaDiffRast LANGUAGES CUDA CXX)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_EXTENSIONS OFF)
set(CMAKE_CUDA_STANDARD 17)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
add_library(CudaDiffRasterizer
cuda_rasterizer/backward.h
cuda_rasterizer/backward.cu
cuda_rasterizer/forward.h
cuda_rasterizer/forward.cu
cuda_rasterizer/auxiliary.h
cuda_rasterizer/rasterizer_impl.cu
cuda_rasterizer/rasterizer_impl.h
cuda_rasterizer/rasterizer.h
)
set_target_properties(CudaDiffRasterizer PROPERTIES CUDA_ARCHITECTURES "70;75;86")
target_include_directories(CudaDiffRasterizer PRIVATE third_party/glm ${CMAKE_CUDA_TOOLKIT_INCLUDE_DIRECTORIES})
target_include_directories(CudaDiffRasterizer
INTERFACE
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
$<INSTALL_INTERFACE:include>
)
install(TARGETS
CudaDiffRasterizer
EXPORT CudaDiffRasterizerTargets
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
)
install(FILES cuda_rasterizer/rasterizer.h DESTINATION include)
install(EXPORT CudaDiffRasterizerTargets
FILE CudaDiffRasterizerConfig.cmake
DESTINATION ${CMAKE_INSTALL_PREFIX}/cmake
)