From 7892808b281c1df3c895e37f30d954b1dd43798a Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Mon, 4 Jan 2016 15:57:14 -0800 Subject: [PATCH] cleanup TargetNsight, remove extra debug --- cmake/macros/TargetNsight.cmake | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/cmake/macros/TargetNsight.cmake b/cmake/macros/TargetNsight.cmake index 4b7e87e9d3..3dc6d19c3c 100644 --- a/cmake/macros/TargetNsight.cmake +++ b/cmake/macros/TargetNsight.cmake @@ -1,20 +1,20 @@ -# +# # Copyright 2015 High Fidelity, Inc. # Created by Bradley Austin Davis on 2015/10/10 # # Distributed under the Apache License, Version 2.0. # See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html -# +# macro(TARGET_NSIGHT) - if (WIN32) - if (USE_NSIGHT) - # try to find the Nsight package and add it to the build if we find it - find_package(NSIGHT) - if (NSIGHT_FOUND) - include_directories(${NSIGHT_INCLUDE_DIRS}) - add_definitions(-DNSIGHT_FOUND) - target_link_libraries(${TARGET_NAME} "${NSIGHT_LIBRARIES}") - endif () - endif() - endif (WIN32) -endmacro() \ No newline at end of file + if (WIN32 AND USE_NSIGHT AND NOT NSIGHT_FIND_CALLED) + # try to find the Nsight package and add it to the build if we find it + find_package(NSIGHT) + set(NSIGHT_FIND_CALLED TRUE) + + if (NSIGHT_FOUND) + include_directories(${NSIGHT_INCLUDE_DIRS}) + add_definitions(-DNSIGHT_FOUND) + target_link_libraries(${TARGET_NAME} "${NSIGHT_LIBRARIES}") + endif () + endif () +endmacro()