diff options
Diffstat (limited to 'src/power/CMakeLists.txt')
-rw-r--r-- | src/power/CMakeLists.txt | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/power/CMakeLists.txt b/src/power/CMakeLists.txt index 42e001f..44b2109 100644 --- a/src/power/CMakeLists.txt +++ b/src/power/CMakeLists.txt @@ -26,25 +26,25 @@ profile_mof_generate("90_LMI_${PROVIDER_NAME}_Profile.mof.skel" "${TARGET_MOF}" # Require GLib pkg_check_modules(GLIB REQUIRED glib-2.0) +# Try to get Gio +pkg_check_modules(GIO gio-2.0) -include_directories(${CMAKE_CURRENT_BINARY_DIR} ${CMPI_INCLUDE_DIR} ${GLIB_INCLUDE_DIRS}) - -target_link_libraries(${LIBRARY_NAME} openlmicommon ${KONKRETCMPI_LIBRARIES} ${GLIB_LIBRARIES}) - -# Check if we have upower and link it -pkg_check_modules(UPOWER upower-glib) -if (${UPOWER_FOUND}) - add_definitions(-DHAS_UPOWER) - target_link_libraries(${LIBRARY_NAME} ${UPOWER_LIBRARIES}) - include_directories(${UPOWER_INCLUDE_DIRS}) -endif (${UPOWER_FOUND}) +if (${GIO_FOUND}) + add_definitions("-DHAS_GDBUS") + include_directories(${GIO_INCLUDE_DIRS}) + target_link_libraries(${LIBRARY_NAME} ${GIO_LIBRARIES}) +endif (${GIO_FOUND}) # Check if we have systemctl find_program(SYSTEMCTL NAMES systemctl) if (${SYSTEMCTL_FOUND}) - add_definitions(-DHAS_SYSTEMCTL) + add_definitions("-DHAS_SYSTEMCTL") endif (${SYSTEMCTL_FOUND}) +include_directories(${CMAKE_CURRENT_BINARY_DIR} ${CMPI_INCLUDE_DIR} ${GLIB_INCLUDE_DIRS}) + +target_link_libraries(${LIBRARY_NAME} openlmicommon ${KONKRETCMPI_LIBRARIES} ${GLIB_LIBRARIES}) + # Create registration file cim_registration(${PROVIDER_NAME} ${LIBRARY_NAME} ${MOF} share/openlmi-providers) |