From 9e01681203e7c168e525491a424e215b512e1ae0 Mon Sep 17 00:00:00 2001 From: Radek Novacek Date: Tue, 24 Jul 2012 10:09:38 +0200 Subject: power: correctly register and install --- src/power/CMakeLists.txt | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'src/power/CMakeLists.txt') diff --git a/src/power/CMakeLists.txt b/src/power/CMakeLists.txt index 12cfeb0..d7c7e4c 100644 --- a/src/power/CMakeLists.txt +++ b/src/power/CMakeLists.txt @@ -24,7 +24,6 @@ include_directories(${CMAKE_CURRENT_BINARY_DIR} ${CMPI_INCLUDE_DIR} ${GLIB_INCLU target_link_libraries(${LIBRARY_NAME} ${KONKRETCMPI_LIBRARIES} ${GLIB_LIBRARIES}) -install(TARGETS ${LIBRARY_NAME} DESTINATION lib${LIB_SUFFIX}/cmpi) # Check if we have upower and link it pkg_check_modules(UPOWER upower-glib) if (${UPOWER_FOUND}) @@ -39,9 +38,8 @@ if (${SYSTEMCTL_FOUND}) add_definitions(-DHAS_SYSTEMCTL) endif (${SYSTEMCTL_FOUND}) -install(FILES ${CMAKE_CURRENT_BINARY_DIR}/src/Linux_PowerManagement.registration DESTINATION share/sblim-cmpi-power/) -install(FILES Linux_PowerManagement.mof DESTINATION share/sblim-cmpi-power/) -install(FILES provider-register.sh DESTINATION share/sblim-cmpi-power/) +# Create registration file +cim_registration(${PROVIDER_NAME} ${LIBRARY_NAME} ${MOF}) + +install(TARGETS ${LIBRARY_NAME} DESTINATION lib${LIB_SUFFIX}/cmpi/) -add_custom_target(register - ${CMAKE_CURRENT_SOURCE_DIR}/provider-register.sh -m ${CMAKE_CURRENT_SOURCE_DIR}/Linux_PowerManagement.mof -r ${CMAKE_CURRENT_BINARY_DIR}/src/Linux_PowerManagement.registration) -- cgit