Skip to content

Commit 5cb8b21

Browse files
committed
OMON-59
Fix for the build of Monitoring. The Monitoring would not see apmon when built with alibuild.
1 parent 4111977 commit 5cb8b21

File tree

2 files changed

+26
-19
lines changed

2 files changed

+26
-19
lines changed

cmake/FindAPMON.cmake

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,22 +6,25 @@
66
# APMON_INCLUDE_DIRS - The ApMon include directories
77
# APMON_LIBRARIES - The libraries needed to use ApMon
88
# APMON_DEFINITIONS - Compiler switches required for using ApMon
9+
# This script can use the following variables:
10+
# APMON_ROOT - Installation root to tell this module where to look.
911

1012
# Init
1113
include(FindPackageHandleStandardArgs)
1214

1315
# find includes
1416
find_path(APMON_INCLUDE_DIR ApMon.h
15-
PATHS /usr/local/include)
17+
HINTS ${APMON_ROOT}/include
18+
PATHS /usr/local/include)
1619
set(APMON_INCLUDE_DIRS ${APMON_INCLUDE_DIR})
1720

1821
# find library
19-
find_library(APMON_LIBRARY NAMES apmoncpp HINTS /usr/local)
22+
find_library(APMON_LIBRARY NAMES apmoncpp HINTS /usr/local ${APMON_ROOT}/lib)
2023
set(APMON_LIBRARIES ${APMON_LIBRARY})
2124

2225
# handle the QUIETLY and REQUIRED arguments and set APMON_FOUND to TRUE
2326
# if all listed variables are TRUE
24-
find_package_handle_standard_args(APMON "ApMon could not be found. Install package ApMon_cpp."
25-
APMON_LIBRARY APMON_INCLUDE_DIR)
27+
find_package_handle_standard_args(APMON "ApMon could not be found. Install package ApMon_cpp."
28+
APMON_LIBRARY APMON_INCLUDE_DIR)
2629

2730
mark_as_advanced(APMON_INCLUDE_DIR APMON_LIBRARY)

cmake/MonitoringDependencies.cmake

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5,25 +5,29 @@ find_package(CURL)
55
find_package(Configuration REQUIRED)
66

77
set(extra_deps "")
8-
if(APMON_FOUND)
8+
set(extra_deps_include "")
9+
if (APMON_FOUND)
910
list(APPEND extra_deps ${APMON_LIBRARIES})
10-
endif()
11-
if(CURL_FOUND)
11+
list(APPEND extra_deps_include ${APMON_INCLUDE_DIRS})
12+
endif ()
13+
if (CURL_FOUND)
1214
list(APPEND extra_deps ${CURL_LIBRARIES})
13-
endif()
15+
list(APPEND extra_deps_include ${CURL_INCLUDE_DIRS})
16+
endif ()
1417

1518
o2_define_bucket(
16-
NAME
17-
o2_monitoring_bucket
19+
NAME
20+
o2_monitoring_bucket
1821

19-
DEPENDENCIES
20-
${Configuration_LIBRARIES}
21-
${Boost_SYSTEM_LIBRARY}
22-
${Boost_FILESYSTEM_LIBRARY}
23-
${Boost_PROGRAM_OPTIONS_LIBRARY}
24-
${extra_deps}
22+
DEPENDENCIES
23+
${Configuration_LIBRARIES}
24+
${Boost_SYSTEM_LIBRARY}
25+
${Boost_FILESYSTEM_LIBRARY}
26+
${Boost_PROGRAM_OPTIONS_LIBRARY}
27+
${extra_deps}
2528

26-
SYSTEMINCLUDE_DIRECTORIES
27-
${Boost_INCLUDE_DIRS}
28-
${Configuration_INCLUDE_DIRS}
29+
SYSTEMINCLUDE_DIRECTORIES
30+
${Boost_INCLUDE_DIRS}
31+
${Configuration_INCLUDE_DIRS}
32+
${extra_deps_include}
2933
)

0 commit comments

Comments
 (0)