Skip to content

Commit d760709

Browse files
committed
fixes to get the independent ReadoutCard to compile with alibuild
1 parent 455e07c commit d760709

File tree

4 files changed

+535
-16
lines changed

4 files changed

+535
-16
lines changed

cmake/FindCommon.cmake

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
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)

cmake/FindInfoLogger.cmake

Whitespace-only changes.

0 commit comments

Comments
 (0)