Skip to content

Commit

Permalink
rtc_source/CMakeLists.txt: fix installation location
Browse files Browse the repository at this point in the history
  • Loading branch information
WolframRhodium committed Nov 8, 2023
1 parent aeb5092 commit a2ed05a
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions rtc_source/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@ cmake_minimum_required(VERSION 3.26)

project(BilateralGPU_RTC LANGUAGES CXX)

FIND_PACKAGE(CUDAToolkit REQUIRED)
find_package(CUDAToolkit REQUIRED)

add_library(bilateralgpu_rtc SHARED bilateral.cpp)

target_include_directories(bilateralgpu_rtc PRIVATE
${VAPOURSYNTH_INCLUDE_DIRECTORY}
${CMAKE_CUDA_TOOLKIT_INCLUDE_DIRECTORIES})

set_target_properties(bilateralgpu_rtc PROPERTIES
CXX_EXTENSIONS OFF
CXX_STANDARD 20
Expand All @@ -32,6 +34,12 @@ else()
target_link_libraries(bilateralgpu_rtc PRIVATE CUDA::nvrtc)
endif()

install(TARGETS bilateralgpu_rtc
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
if(WIN32)
install(TARGETS bilateralgpu_rtc RUNTIME)
elseif(DEFINED VS_INSTALL_DIR)
install(TARGETS bilateralgpu_rtc LIBRARY DESTINATION ${VS_INSTALL_DIR})
else()
install(TARGETS bilateralgpu_rtc
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
endif()

0 comments on commit a2ed05a

Please sign in to comment.