From cbb63f0e45340f6dd2cc9f360ed4da15c745186f Mon Sep 17 00:00:00 2001 From: Naoto Yamaguchi Date: Wed, 22 Nov 2023 07:54:57 +0900 Subject: Support for cluster api binding Existing AGL Instrument Cluster is not implement cluster service only a framework library. This task aim to support cluster service. In 1st step, cluster-refgui will be controlled by cluster-service demo signal. This patch a part of this task. Bug-AGL: SPEC-4991 Change-Id: I1dfdf3a6b9691f536bb96cd197feac89f4137540 Signed-off-by: Naoto Yamaguchi --- CMakeLists.txt | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 88159e5..79b168e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,18 +8,25 @@ set(CMAKE_AUTOUIC ON) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(INSTALL_DIRECTORY "/opt/apps") +find_package(PkgConfig REQUIRED) find_package(Qt5Core REQUIRED) find_package(Qt5Qml REQUIRED) find_package(Qt5Gui REQUIRED) find_package(Qt5QuickCompiler REQUIRED) +pkg_check_modules(CLUSTERAPI REQUIRED cluster-api-systemd) + include_directories( "${Qt5Core_INCLUDE_DIRS}" "${Qt5Qml_INCLUDE_DIRS}" "${Qt5Gui_INCLUDE_DIRS}" ) -set(SOURCES Application/main.cpp) +set(SOURCES + Application/main.cpp + Application/cluster-service.cpp + Application/cluster-service.hxx + ) qt5_add_resources( RESOURCES @@ -37,7 +44,17 @@ add_executable( ${RESOURCES} ) -target_link_libraries(${PROJECT_NAME} Qt5::Core Qt5::Qml Qt5::Gui) +target_link_libraries( + ${PROJECT_NAME} + Qt5::Core + Qt5::Qml + Qt5::Gui + ${CLUSTERAPI_LIBRARIES} +) + +link_directories( ${CLUSTERAPI_LIBRARY_DIRS} ) +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CLUSTERAPI_CXX_FLAGS} ${CLUSTERAPI_C_FLAGS}") +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${CLUSTERAPI_C_FLAGS}") if(NOT DEFINED APPS_INST_DIR) set(APPS_INST_DIR /opt/apps) -- cgit 1.2.3-korg