From 813d5e5ba03c141f86f069eac6a26ebac0fb858c Mon Sep 17 00:00:00 2001 From: Ryan Huffman <ryanhuffman@gmail.com> Date: Thu, 11 Feb 2016 08:17:05 -0800 Subject: [PATCH] Add headers and proper bugsplat checking to cmake files --- cmake/macros/AddBugSplat.cmake | 18 ++++++++++++++++-- cmake/modules/FindBugSplat.cmake | 11 +++++++++++ 2 files changed, 27 insertions(+), 2 deletions(-) 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")