File tree Expand file tree Collapse file tree 4 files changed +535
-16
lines changed
Expand file tree Collapse file tree 4 files changed +535
-16
lines changed Original file line number Diff line number Diff line change 1+ # - Try to find the O2 Common package include dirs and libraries
2+ # Author: Barthelemy von Haller
3+ #
4+ # This script will set the following variables:
5+ # Common_FOUND - System has Common
6+ # Common_INCLUDE_DIRS - The Common include directories
7+ # Common_LIBRARIES - The libraries needed to use Common
8+ # Common_DEFINITIONS - Compiler switches required for using Common
9+ #
10+ # This script can use the following variables:
11+ # Common_ROOT - Installation root to tell this module where to look. (it tries LD_LIBRARY_PATH otherwise)
12+
13+ # Init
14+ include (FindPackageHandleStandardArgs)
15+
16+ # find includes
17+ find_path (COMMON_INCLUDE_DIR Timer.h
18+ HINTS ${Common_ROOT} /include ENV LD_LIBRARY_PATH PATH_SUFFIXES "../include/Common" "../../include/Common" )
19+ # Remove the final "Common"
20+ get_filename_component (COMMON_INCLUDE_DIR ${COMMON_INCLUDE_DIR} DIRECTORY )
21+ set (Common_INCLUDE_DIRS ${COMMON_INCLUDE_DIR} )
22+
23+ # find library
24+ find_library (COMMON_LIBRARY NAMES Common HINTS ${Common_ROOT} /lib ENV LD_LIBRARY_PATH)
25+ set (Common_LIBRARIES ${COMMON_LIBRARY} )
26+
27+ # handle the QUIETLY and REQUIRED arguments and set COMMON_FOUND to TRUE
28+ # if all listed variables are TRUE
29+ find_package_handle_standard_args(Common "Common could not be found. Install package Common or set Common_ROOT to its root installation directory."
30+ COMMON_LIBRARY COMMON_INCLUDE_DIR)
31+
32+ if (${COMMON_FOUND} )
33+ message (STATUS "Common found : ${Common_LIBRARIES} " )
34+ endif ()
35+
36+ mark_as_advanced (COMMON_INCLUDE_DIR COMMON_LIBRARY)
You can’t perform that action at this time.
0 commit comments