Skip to content

Commit

Permalink
[METADATA] Define the COMSERVERS with a user friendly name. (#326)
Browse files Browse the repository at this point in the history
* [METADATA] Define the COMSERVERS with a user friendly name.

* Update CMakeLists.txt

* Update FindLibDRM.cmake

* Rename FindLibDRM.cmake to Findlibdrm.cmake
  • Loading branch information
pwielders authored Nov 12, 2024
1 parent 481b87f commit f5fec17
Show file tree
Hide file tree
Showing 5 changed files with 65 additions and 55 deletions.
2 changes: 1 addition & 1 deletion DisplayInfo/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ find_package(CompileSettingsDebug CONFIG REQUIRED)
find_package(BCM_HOST QUIET)
find_package(NEXUS QUIET)
find_package(NXCLIENT QUIET)
find_package(LibDRM QUIET)
find_package(libdrm QUIET)

add_library(${MODULE_NAME} SHARED
DisplayInfo.cpp
Expand Down
48 changes: 0 additions & 48 deletions DisplayInfo/cmake/FindLibDRM.cmake

This file was deleted.

59 changes: 59 additions & 0 deletions DisplayInfo/cmake/Findlibdrm.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# If not stated otherwise in this file or this component's license file the
# following copyright and licenses apply:
#
# Copyright 2020 Metrological B.V.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

find_package(PkgConfig)

if(${PKG_CONFIG_FOUND})

# Just check if the libdrm.pc exist, and create the PkgConfig::libdrm target
# No version requirement (yet)
pkg_check_modules(libdrm QUIET IMPORTED_TARGET libdrm)

include(FindPackageHandleStandardArgs)

# Sets the FOUND variable to TRUE if all required variables are present and set
find_package_handle_standard_args(
libdrm
REQUIRED_VARS
libdrm_INCLUDE_DIRS
libdrm_CFLAGS
libdrm_LDFLAGS
libdrm_LIBRARIES
VERSION_VAR
libdrm_VERSION
)

find_library(libdrm_ACTUAL_LIBRARY NAMES drm
HINTS ${libdrm_LIBRARY_DIRS} )

if(libdrm_FOUND AND NOT TARGET libdrm::libdrm)
add_library(libdrm::libdrm UNKNOWN IMPORTED)
set_target_properties(libdrm::libdrm PROPERTIES
IMPORTED_LOCATION "${libdrm_ACTUAL_LIBRARY}"
INTERFACE_LINK_LIBRARIES "${libdrm_LIBRARIES}"
INTERFACE_COMPILE_OPTIONS "${libdrm_CFLAGS}"
INTERFACE_INCLUDE_DIRECTORIES "${libdrm_INCLUDE_DIRS}"
)
endif()

mark_as_advanced(libdrm_INCLUDE_DIRS libdrm_LIBRARIES)

else()

message(STATUS "Unable to locate PkgConfig")

endif()
9 changes: 4 additions & 5 deletions OpenCDMi/FrameworkRPC.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -105,18 +105,17 @@ namespace Plugin {
};

class ExternalAccess : public RPC::Communicator {
private:
public:
ExternalAccess() = delete;
ExternalAccess(const ExternalAccess&) = delete;
ExternalAccess& operator=(const ExternalAccess&) = delete;

public:
ExternalAccess(
const Core::NodeId& source,
const Core::NodeId& sourceNode,
Exchange::IAccessorOCDM* parentInterface,
const string& proxyStubPath,
const Core::ProxyType<RPC::InvokeServer> & engine)
: RPC::Communicator(source, proxyStubPath, Core::ProxyType<Core::IIPCServer>(engine))
const Core::ProxyType<RPC::InvokeServer>& engine)
: RPC::Communicator(sourceNode, proxyStubPath, Core::ProxyType<Core::IIPCServer>(engine), _T("@OCDM"))
, _parentInterface(parentInterface)
{
Open(Core::infinite);
Expand Down
2 changes: 1 addition & 1 deletion SecurityAgent/SecurityAgent.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ namespace Plugin {
PluginHost::IAuthenticate* parentInterface,
const Core::ProxyType<RPC::InvokeServer>& engine
)
: RPC::Communicator(source, proxyStubPath, Core::ProxyType<Core::IIPCServer>(engine))
: RPC::Communicator(source, proxyStubPath, Core::ProxyType<Core::IIPCServer>(engine), _T("@SecurityAgent"))
, _parentInterface(parentInterface)
{
if (_parentInterface != nullptr){
Expand Down

0 comments on commit f5fec17

Please sign in to comment.