Skip to content

Commit

Permalink
Merge pull request #39 from ARM-software/issue-37
Browse files Browse the repository at this point in the history
Issue #37: Resolve MXML from target system by pkg-config when not usi…
  • Loading branch information
bengaineyarm authored Dec 19, 2022
2 parents 4fdd081 + 751214e commit 17ae804
Show file tree
Hide file tree
Showing 16 changed files with 27 additions and 18 deletions.
2 changes: 1 addition & 1 deletion daemon/AtraceDriver.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#define ATRACEDRIVER_H

#include "SimpleDriver.h"
#include "mxml/mxml.h"
#include <mxml.h>

class FtraceDriver;

Expand Down
15 changes: 12 additions & 3 deletions daemon/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,16 @@ INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/cmake/compiler-flags.cmake)
ADD_SUBDIRECTORY(ipc/proto)

# Find the external dependencies
FIND_PACKAGE(mxml CONFIG REQUIRED)
IF (ENABLE_VCPKG)
FIND_PACKAGE(mxml CONFIG REQUIRED)
SET(MXML_TARGET mxml)
ELSE()
INCLUDE(FindPkgConfig)
pkg_search_module(PKG_MXML REQUIRED IMPORTED_TARGET "mxml>=3")
SET(MXML_TARGET PkgConfig::PKG_MXML)
INCLUDE_DIRECTORIES(SYSTEM ${PKG_MXML_INCLUDE_DIRS} ${PKG_MXML_INCLUDEDIR})
ENDIF()

FIND_PACKAGE(Threads REQUIRED)
SET(Boost_USE_MULTITHREADED ON)
FIND_PACKAGE(Boost 1.75 REQUIRED COMPONENTS
Expand Down Expand Up @@ -687,7 +696,7 @@ TARGET_LINK_LIBRARIES(gatord
PRIVATE Threads::Threads
PRIVATE atomic
PRIVATE device
PRIVATE mxml
PRIVATE ${MXML_TARGET}
PRIVATE Boost::boost
PRIVATE Boost::filesystem
PRIVATE Boost::regex
Expand Down Expand Up @@ -750,7 +759,7 @@ ENDIF()

IF(EXISTS ${CLANG_TIDY})
# ## CMAKE_xxx_CLANG_TIDY need to be before the ADD_EXECUTABLE
OPTION(ENABLE_CLANG_TIDY_DURING_BUILD "Compile and tidy at the same time" ON)
OPTION(ENABLE_CLANG_TIDY_DURING_BUILD "Compile and tidy at the same time" OFF)

IF(ENABLE_CLANG_TIDY_DURING_BUILD)
SET(CMAKE_C_CLANG_TIDY )
Expand Down
2 changes: 1 addition & 1 deletion daemon/CapturedXML.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#include <set>

#include <dirent.h>
#include <mxml/mxml.h>
#include <mxml.h>

/* Basic target OS detection */
#undef GATOR_TARGET_OS
Expand Down
2 changes: 1 addition & 1 deletion daemon/ConfigurationXMLParser.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#include "Configuration.h"
#include "Logging.h"
#include "OlyUtility.h"
#include "mxml/mxml.h"
#include <mxml.h>

#include <regex>
#include <string>
Expand Down
2 changes: 1 addition & 1 deletion daemon/CounterXML.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#include "SessionData.h"
#include "lib/String.h"
#include "logging/global_log.h"
#include "mxml/mxml.h"
#include <mxml.h>
#include "xml/MxmlUtils.h"
#include "xml/PmuXML.h"

Expand Down
2 changes: 1 addition & 1 deletion daemon/Driver.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

#include "CapturedSpe.h"
#include "Constant.h"
#include "mxml/mxml.h"
#include <mxml.h>

#include <cstdint>
#include <optional>
Expand Down
2 changes: 1 addition & 1 deletion daemon/SessionData.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#include "Time.h"
#include "lib/SharedMemory.h"
#include "linux/smmu_identifier.h"
#include "mxml/mxml.h"
#include <mxml.h>

#include <cstdint>
#include <list>
Expand Down
2 changes: 1 addition & 1 deletion daemon/SessionXML.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#ifndef SESSION_XML_H
#define SESSION_XML_H

#include "mxml/mxml.h"
#include <mxml.h>

struct ImageLinkList;

Expand Down
2 changes: 1 addition & 1 deletion daemon/TtraceDriver.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#define TTRACEDRIVER_H

#include "SimpleDriver.h"
#include "mxml/mxml.h"
#include <mxml.h>

class FtraceDriver;

Expand Down
2 changes: 1 addition & 1 deletion daemon/android/ThermalDriver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include "IBlockCounterFrameBuilder.h"
#include "Logging.h"
#include "SessionData.h"
#include "mxml/mxml.h"
#include <mxml.h>

#include <array>
#include <cstdint>
Expand Down
2 changes: 1 addition & 1 deletion daemon/ipc/proto/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Copyright (C) 2022 by Arm Limited. All rights reserved.

find_package(Protobuf REQUIRED CONFIG)
find_package(Protobuf REQUIRED)

set(GENERATED_DIR ${CMAKE_CURRENT_LIST_DIR}/generated)
file(MAKE_DIRECTORY ${GENERATED_DIR})
Expand Down
2 changes: 1 addition & 1 deletion daemon/mali_userspace/MaliGPUClockPolledDriver.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#include "Logging.h"
#include "MaliGPUClockPolledDriverCounter.h"
#include "PolledDriver.h"
#include "mxml/mxml.h"
#include <mxml.h>

#include <cstdint>
#include <cstdlib>
Expand Down
2 changes: 1 addition & 1 deletion daemon/xml/EventsXML.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#include "EventCode.h"
#include "lib/Span.h"
#include "linux/perf/PerfEventGroupIdentifier.h"
#include "mxml/mxml.h"
#include <mxml.h>

#include <map>
#include <memory>
Expand Down
2 changes: 1 addition & 1 deletion daemon/xml/MxmlUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#ifndef MXML_UTILS_H
#define MXML_UTILS_H

#include "mxml/mxml.h"
#include <mxml.h>

#include <memory>
#include <string>
Expand Down
2 changes: 1 addition & 1 deletion daemon/xml/PmuXMLParser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#include "lib/FsEntry.h"
#include "lib/String.h"
#include "lib/Utils.h"
#include "mxml/mxml.h"
#include <mxml.h>

#include <algorithm>
#include <cstring>
Expand Down
2 changes: 1 addition & 1 deletion vcpkg_registry/ports/mxml/3.0.0/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ set_target_properties(${PROJECT_NAME} PROPERTIES PUBLIC_HEADER ${CMAKE_SOURCE_DI
install(
TARGETS ${PROJECT_NAME}
EXPORT ${PROJECT_NAME}Export
PUBLIC_HEADER DESTINATION include/${PROJECT_NAME}
PUBLIC_HEADER DESTINATION include
)

# Generate and install package cmake file, so it can be found with
Expand Down

0 comments on commit 17ae804

Please sign in to comment.