1 # - Find collada dom libraries
2 # Find the collada dom libraries and headers
4 # This module specifies the following variables:
5 # NVIDIAPERFSDK_INCLUDE_DIR
6 # NVIDIAPERFSDK_LIBRARIES
7 # NVIDIAPERFSDK_LIBRARY_DIRS
9 # Additionally the following more specialized variables are defined:
10 # NVIDIAPERFSDK_LIBRARY_DEBUG debug library
11 # NVIDIAPERFSDK_LIBRARY_RELEASE release library
13 # You can control where this module attempts to locate libraries and headers:
14 # NVIDIAPERFSDK_ROOT_DIR
15 # NVIDIAPERFSDK_INCLUDE_DIR
16 # NVIDIAPERFSDK_LIBRARY_DIR
19 # default include search paths
20 SET(__NVIDIAPERFSDK_INCLUDE_SEARCH_DIRS
24 /usr/local/include/colladadom
26 /usr/include/colladadom
29 /opt/local/include/colladadom
31 /opt/include/colladadom)
33 # default library search paths
34 SET(__NVIDIAPARFSDK_LIBRARY_SEARCH_DIRS
47 # handle NVIDIAPERFSDK_ROOT_DIR input variable
48 IF(NVIDIAPERFSDK_ROOT_DIR)
49 FILE(TO_CMAKE_PATH ${NVIDIAPERFSDK_ROOT_DIR} NVIDIAPERFSDK_ROOT_DIR)
51 SET(__NVIDIAPERFSDK_INCLUDE_SEARCH_DIRS "${NVIDIAPERFSDK_ROOT_DIR}/inc"
52 "${__NVIDIAPERFSDK_INCLUDE_SEARCH_DIRS}")
54 SET(__NVIDIAPERFSDK_LIBDIR_SUFFIX_IN "${CMAKE_SYSTEM_NAME}_${CMAKE_SYSTEM_PROCESSOR}")
56 STRING(TOLOWER ${__NVIDIAPERFSDK_LIBDIR_SUFFIX_IN} __NVIDIAPERFSDK_LIBDIR_SUFFIX)
58 SET(__NVIDIAPERFSDK_LIBRARY_SEARCH_DIRS "${NVIDIAPERFSDK_ROOT_DIR}/lib/${__NVIDIAPERFSDK_LIBDIR_SUFFIX}"
59 "${__NVIDIAPERFSDK_LIBRARY_SEARCH_DIRS}")
60 ENDIF(NVIDIAPERFSDK_ROOT_DIR)
62 # handle NVIDIAPERFSDK_INCLUDE_DIR input variable
63 IF(NVIDIAPERFSDK_INCLUDE_DIR)
64 FILE(TO_CMAKE_PATH ${NVIDIAPERFSDK_INCLUDE_DIR} NVIDIAPERFSDK_INCLUDE_DIR)
65 SET(__NVIDIAPERFSDK_INCLUDE_SEARCH_DIRS "${NVIDIAPERFSDK_INCLUDE_DIR}"
66 "${__NVIDIAPERFSDK_INCLUDE_SEARCH_DIRS}")
67 ENDIF(NVIDIAPERFSDK_INCLUDE_DIR)
69 # handle NVIDIAPERFSDK_LIBRARY_DIR input variable
70 IF(NVIDIAPERFSDK_LIBRARY_DIR)
71 FILE(TO_CMAKE_PATH ${NVIDIAPERFSDK_LIBRARY_DIR} NVIDIAPERFSDK_LIBRARY_DIR)
72 SET(__NVIDIAPERFSDK_LIBRARY_SEARCH_DIRS "${NVIDIAPERFSDK_LIBRARY_DIR}"
73 "${__NVIDIAPERFSDK_LIBRARY_SEARCH_DIRS}")
74 ENDIF(NVIDIAPERFSDK_LIBRARY_DIR)
78 FIND_PATH(NVIDIAPERFSDK_INCLUDE_DIR NVPerfSDK.h
79 PATHS ${__NVIDIAPERFSDK_INCLUDE_SEARCH_DIRS})
83 FIND_LIBRARY(NVIDIAPERFSDK_LIBRARY_RELEASE
85 PATHS ${__NVIDIAPERFSDK_LIBRARY_SEARCH_DIRS})
87 FIND_LIBRARY(NVIDIAPERFSDK_LIBRARY_DEBUG
89 PATHS ${__NVIDIAPERFSDK_LIBRARY_SEARCH_DIRS})
92 # handle the QUIETLY and REQUIRED arguments and set NVIDIAPERFSDK_FOUND to TRUE if
93 # all listed variables are TRUE
94 INCLUDE(FindPackageHandleStandardArgs)
95 FIND_PACKAGE_HANDLE_STANDARD_ARGS(NVIDIAPERFSDK DEFAULT_MSG NVIDIAPERFSDK_LIBRARY_RELEASE
96 NVIDIAPERFSDK_INCLUDE_DIR)
98 # set output variables
99 IF(NVIDIAPERFSDK_FOUND)
100 SET(NVIDIAPERFSDK_LIBRARIES "${NVIDIAPERFSDK_LIBRARY_RELEASE}")
101 ENDIF(NVIDIAPERFSDK_FOUND)