]> git.mxchange.org Git - flightgear.git/blob - CMakeModules/FindGooglePerfTools.cmake
initial commit for a python based terrasync client
[flightgear.git] / CMakeModules / FindGooglePerfTools.cmake
1 # - Try to find GooglePerfTools headers and libraries
2 #
3 # Usage of this module as follows:
4 #
5 #   find_package(GooglePerfTools)
6 #
7 # Variables used by this module, they can change the default behaviour and need
8 # to be set before calling find_package:
9 #
10 #  GooglePerfTools_ROOT_DIR  Set this variable to the root installation of
11 #                            GooglePerfTools if the module has problems finding
12 #                            the proper installation path.
13 #
14 # Variables defined by this module:
15 #
16 #  GooglePerfTools_FOUND              System has GooglePerfTools libs/headers
17 #  GooglePerfTools_LIBRARIES          The GooglePerfTools libraries
18 #  GooglePerfTools_INCLUDE_DIR        The location of GooglePerfTools headers
19
20 find_path(GooglePerfTools_ROOT_DIR
21   NAMES include/google/profiler.h
22 )
23
24 find_path(GooglePerfTools_INCLUDE_DIR
25   NAMES google/profiler.h
26   HINTS ${GooglePerfTools_ROOT_DIR}
27 )
28
29 find_library(GooglePerfTools_PROFILER_LIBRARY
30   NAMES profiler
31   HINTS ${GooglePerfTools_ROOT_DIR}
32 )
33
34 set(GooglePerfTools_LIBRARIES ${GooglePerfTools_PROFILER_LIBRARY})
35
36 include(FindPackageHandleStandardArgs)
37 find_package_handle_standard_args(GooglePerfTools
38   "Try setting GooglePerfTools_ROOT_DIR to root of your gperftools installation"
39   GooglePerfTools_LIBRARIES
40   GooglePerfTools_INCLUDE_DIR
41 )
42
43 mark_as_advanced(
44   GooglePerfTools_ROOT_DIR
45   GooglePerfTools_LIBRARIES
46   GooglePerfTools_PROFILER_LIBRARY
47   GooglePerfTools_INCLUDE_DIR
48 )