Skip to content

Commit

Permalink
cmake setup nvperf
Browse files Browse the repository at this point in the history
  • Loading branch information
gralkapk committed Jul 27, 2023
1 parent 696c829 commit 6a718ef
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ megamol_feature_option(VR_INTEROP "Enable MegaMol-Unity VR Interop via Spout2."
set(CMAKE_DISABLE_SOURCE_CHANGES ON)
set(CMAKE_DISABLE_IN_SOURCE_BUILD ON)

# NVPerf option
option(MEGAMOL_USE_NVPERF "Enable NVPerf support" OFF)

# Catch deprecated options before project()
include(cmake/deprecation_warning.cmake)

Expand Down
8 changes: 8 additions & 0 deletions core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,14 @@ if (MEGAMOL_USE_TRACY)
target_link_libraries(${PROJECT_NAME} PUBLIC Tracy::TracyClient)
endif ()

# NVPerf
if (MEGAMOL_USE_NVPERF)
find_package(NvPerf REQUIRED)
find_package(NvPerfUtility REQUIRED)
target_link_libraries(${PROJECT_NAME} PUBLIC NvPerf-shared NvPerfUtility NvPerfUtilityImportsRyml)
target_compile_definitions(${PROJECT_NAME} PUBLIC MEGAMOL_USE_NVPERF)
endif()

# Install resources
install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/resources/ DESTINATION "share/resources")

Expand Down

0 comments on commit 6a718ef

Please sign in to comment.