diff options
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 21 |
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) |