diff --git a/cmake/macros/AddBugSplat.cmake b/cmake/macros/AddBugSplat.cmake index b8ab98a499..87e3ddf125 100644 --- a/cmake/macros/AddBugSplat.cmake +++ b/cmake/macros/AddBugSplat.cmake @@ -1,8 +1,22 @@ -macro(add_bugsplat) - find_package(BugSplat) +# +# AddBugSplat.cmake +# cmake/macros +# +# Created by Ryan Huffman on 02/09/16. +# Copyright 2016 High Fidelity, Inc. +# +# Distributed under the Apache License, Version 2.0. +# See the accompanying file LICENSE or http:#www.apache.org/licenses/LICENSE-2.0.html +# +macro(add_bugsplat) get_property(BUGSPLAT_CHECKED GLOBAL PROPERTY CHECKED_FOR_BUGSPLAT_ONCE) + if (NOT BUGSPLAT_CHECKED) + find_package(BugSplat) + set_property(GLOBAL PROPERTY CHECKED_FOR_NSIGHT_ONCE TRUE) + endif () + if (BUGSPLAT_FOUND) add_definitions(-DHAS_BUGSPLAT) diff --git a/cmake/modules/FindBugSplat.cmake b/cmake/modules/FindBugSplat.cmake index 48a9a0f41b..8bea1cb1e1 100644 --- a/cmake/modules/FindBugSplat.cmake +++ b/cmake/modules/FindBugSplat.cmake @@ -1,3 +1,14 @@ +# +# FindBugSplat.cmake +# cmake/modules +# +# Created by Ryan Huffman on 02/09/16. +# Copyright 2016 High Fidelity, Inc. +# +# Distributed under the Apache License, Version 2.0. +# See the accompanying file LICENSE or http:#www.apache.org/licenses/LICENSE-2.0.html +# + if (WIN32) include("${MACRO_DIR}/HifiLibrarySearchHints.cmake") hifi_library_search_hints("BugSplat")