aboutsummaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorNaoto Yamaguchi <naoto.yamaguchi@aisin.co.jp>2023-11-22 07:54:57 +0900
committerNaoto Yamaguchi <naoto.yamaguchi@aisin.co.jp>2023-11-26 20:12:00 +0900
commitcbb63f0e45340f6dd2cc9f360ed4da15c745186f (patch)
tree471935b3ce3238f7bb402942ba8c530cf7892500 /CMakeLists.txt
parent5b7127cac34bf44a9d9e58c02b44939955d50890 (diff)
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 <naoto.yamaguchi@aisin.co.jp>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt21
1 files changed, 19 insertions, 2 deletions
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)