summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTomas Bzatek <tbzatek@redhat.com>2014-05-15 16:19:55 +0200
committerTomas Bzatek <tbzatek@redhat.com>2014-05-15 16:19:55 +0200
commit09432ee848ff28d470cfc43d54f84fca2073c1fc (patch)
treec900d3c36cafc4ffa299bf8466601c4f619d9868 /src
parent85a373f1a64a7b63f291fe9df9aabd89dd2835a9 (diff)
downloadopenlmi-providers-09432ee848ff28d470cfc43d54f84fca2073c1fc.tar.gz
openlmi-providers-09432ee848ff28d470cfc43d54f84fca2073c1fc.tar.xz
openlmi-providers-09432ee848ff28d470cfc43d54f84fca2073c1fc.zip
Include profile (un)registration in the (un)register-PROVIDER make targets
This is an attempt to include profile (un)registration within the (un)register-PROVIDER make target. This commit extends the cim_registration macro by an extra argument of the profile file or list of profile files. To preserve API of the CMake modules this extra argument is an variable arg in fact and does not need to be specified. Pass a list variable to specify multiple profile files.
Diffstat (limited to 'src')
-rw-r--r--src/account/CMakeLists.txt2
-rw-r--r--src/fan/CMakeLists.txt2
-rw-r--r--src/hardware/CMakeLists.txt5
-rw-r--r--src/journald/CMakeLists.txt2
-rw-r--r--src/logicalfile/CMakeLists.txt4
-rw-r--r--src/power/CMakeLists.txt2
-rw-r--r--src/realmd/CMakeLists.txt5
-rw-r--r--src/service-dbus/CMakeLists.txt5
-rw-r--r--src/service/CMakeLists.txt5
-rw-r--r--src/software-dbus/CMakeLists.txt5
10 files changed, 21 insertions, 16 deletions
diff --git a/src/account/CMakeLists.txt b/src/account/CMakeLists.txt
index 6390ae2..9d416c9 100644
--- a/src/account/CMakeLists.txt
+++ b/src/account/CMakeLists.txt
@@ -49,7 +49,7 @@ include_directories(${CMAKE_CURRENT_BINARY_DIR} ${CMPI_INCLUDE_DIR} ${GLIB_INCLU
target_link_libraries(${LIBRARY_NAME} openlmicommon ${KONKRETCMPI_LIBRARIES} ${GLIB_LIBRARIES} ${LIBUSER_LIBRARIES} openlmiindmanager)
# Create registration file
-cim_registration(${PROVIDER_NAME} ${LIBRARY_NAME} ${MOF} share/openlmi-providers)
+cim_registration(${PROVIDER_NAME} ${LIBRARY_NAME} ${MOF} share/openlmi-providers "${TARGET_MOF}")
install(TARGETS ${LIBRARY_NAME} DESTINATION lib${LIB_SUFFIX}/cmpi/)
install(PROGRAMS ${ACCOUNT_SCRIPT} DESTINATION libexec/pegasus)
diff --git a/src/fan/CMakeLists.txt b/src/fan/CMakeLists.txt
index 446e38b..7918a57 100644
--- a/src/fan/CMakeLists.txt
+++ b/src/fan/CMakeLists.txt
@@ -28,9 +28,9 @@ include_directories(${CMAKE_CURRENT_BINARY_DIR} ${CMPI_INCLUDE_DIR})
target_link_libraries(${LIBRARY_NAME} openlmicommon ${KONKRETCMPI_LIBRARIES} sensors)
# Create registration file
-cim_registration(${PROVIDER_NAME} ${LIBRARY_NAME} ${MOF} share/openlmi-providers)
set(TARGET_MOF "${CMAKE_BINARY_DIR}/mof/90_LMI_Fan_Profile.mof")
profile_mof_generate("90_LMI_Fan_Profile.mof.skel" "${TARGET_MOF}" "${CIM_CLASSES}")
+cim_registration(${PROVIDER_NAME} ${LIBRARY_NAME} ${MOF} share/openlmi-providers "${TARGET_MOF}")
install(TARGETS ${LIBRARY_NAME} DESTINATION lib${LIB_SUFFIX}/cmpi/)
install(FILES ${TARGET_MOF} DESTINATION share/openlmi-providers/)
diff --git a/src/hardware/CMakeLists.txt b/src/hardware/CMakeLists.txt
index 29b63d3..92a9ea6 100644
--- a/src/hardware/CMakeLists.txt
+++ b/src/hardware/CMakeLists.txt
@@ -34,13 +34,14 @@ include_directories(${CMAKE_CURRENT_BINARY_DIR} ${CMPI_INCLUDE_DIR} ${LIBPCI_INC
target_link_libraries(${LIBRARY_NAME} m openlmicommon ${KONKRETCMPI_LIBRARIES} ${LIBPCI_LIBRARIES})
# Create registration file
-cim_registration(${PROVIDER_NAME} ${LIBRARY_NAME} ${MOF} share/openlmi-providers)
-
set(TARGET_MOF "${CMAKE_BINARY_DIR}/mof/90_LMI_${PROVIDER_NAME}_Profile.mof")
profile_mof_generate("90_LMI_${PROVIDER_NAME}_Profile.mof.skel" "${TARGET_MOF}" "${CIM_CLASSES}")
set(TARGET_MOF_DMTF "${CMAKE_BINARY_DIR}/mof/90_LMI_${PROVIDER_NAME}_Profile_DMTF.mof")
configure_file("90_LMI_${PROVIDER_NAME}_Profile_DMTF.mof" "${TARGET_MOF_DMTF}" COPYONLY)
+set(TARGET_MOFS "${TARGET_MOF}" "${TARGET_MOF_DMTF}")
+cim_registration(${PROVIDER_NAME} ${LIBRARY_NAME} ${MOF} share/openlmi-providers "${TARGET_MOFS}")
+
install(TARGETS ${LIBRARY_NAME} DESTINATION lib${LIB_SUFFIX}/cmpi)
install(PROGRAMS ${CIMPROVAGT_SCRIPT} DESTINATION libexec/pegasus)
install(FILES ${TARGET_MOF} DESTINATION share/openlmi-providers/)
diff --git a/src/journald/CMakeLists.txt b/src/journald/CMakeLists.txt
index 7e956c0..63a5246 100644
--- a/src/journald/CMakeLists.txt
+++ b/src/journald/CMakeLists.txt
@@ -52,7 +52,7 @@ set(TARGET_MOF "${CMAKE_BINARY_DIR}/mof/90_LMI_Journald_Profile.mof")
profile_mof_generate("90_LMI_Journald_Profile.mof.skel" "${TARGET_MOF}" "${CIM_PROVIDERS_CLASSES}")
# Create registration file
-cim_registration(${PROVIDER_NAME} ${LIBRARY_NAME} ${MOF} share/openlmi-providers)
+cim_registration(${PROVIDER_NAME} ${LIBRARY_NAME} ${MOF} share/openlmi-providers "${TARGET_MOF}")
install(TARGETS ${LIBRARY_NAME} DESTINATION lib${LIB_SUFFIX}/cmpi/)
install(PROGRAMS ${CIMPROVAGT_SCRIPT} DESTINATION libexec/pegasus)
diff --git a/src/logicalfile/CMakeLists.txt b/src/logicalfile/CMakeLists.txt
index 14b33c5..9de6046 100644
--- a/src/logicalfile/CMakeLists.txt
+++ b/src/logicalfile/CMakeLists.txt
@@ -34,11 +34,11 @@ target_link_libraries(${LIBRARY_NAME} openlmicommon
${LIBSELINUX_LIBRARIES})
# Create registration file
-cim_registration(${PROVIDER_NAME} ${LIBRARY_NAME} ${MOF} share/openlmi-providers)
-
set(TARGET_MOF "${CMAKE_BINARY_DIR}/mof/90_LMI_LogicalFile_Profile.mof")
profile_mof_generate("90_LMI_LogicalFile_Profile.mof.skel" "${TARGET_MOF}" "${CIM_CLASSES}")
+cim_registration(${PROVIDER_NAME} ${LIBRARY_NAME} ${MOF} share/openlmi-providers "${TARGET_MOF}")
+
install(TARGETS ${LIBRARY_NAME} DESTINATION lib${LIB_SUFFIX}/cmpi)
install(PROGRAMS ${CIMPROVAGT_SCRIPT} DESTINATION libexec/pegasus)
install(FILES ${TARGET_MOF} DESTINATION share/openlmi-providers/)
diff --git a/src/power/CMakeLists.txt b/src/power/CMakeLists.txt
index 44b2109..05d5bbf 100644
--- a/src/power/CMakeLists.txt
+++ b/src/power/CMakeLists.txt
@@ -46,7 +46,7 @@ include_directories(${CMAKE_CURRENT_BINARY_DIR} ${CMPI_INCLUDE_DIR} ${GLIB_INCLU
target_link_libraries(${LIBRARY_NAME} openlmicommon ${KONKRETCMPI_LIBRARIES} ${GLIB_LIBRARIES})
# Create registration file
-cim_registration(${PROVIDER_NAME} ${LIBRARY_NAME} ${MOF} share/openlmi-providers)
+cim_registration(${PROVIDER_NAME} ${LIBRARY_NAME} ${MOF} share/openlmi-providers "${TARGET_MOF}")
install(TARGETS ${LIBRARY_NAME} DESTINATION lib${LIB_SUFFIX}/cmpi/)
install(PROGRAMS ${POWERMANAGEMENT_SCRIPT} DESTINATION libexec/pegasus)
diff --git a/src/realmd/CMakeLists.txt b/src/realmd/CMakeLists.txt
index dbf2e54..961c7b1 100644
--- a/src/realmd/CMakeLists.txt
+++ b/src/realmd/CMakeLists.txt
@@ -43,11 +43,12 @@ target_link_libraries(${LIBRARY_NAME}
)
# Create registration file
-cim_registration(${PROVIDER_NAME} ${LIBRARY_NAME} ${MOF} share/openlmi-providers)
-
set(TARGET_MOF "${CMAKE_BINARY_DIR}/mof/90_LMI_Realmd_Profile.mof")
profile_mof_generate("90_LMI_Realmd_Profile.mof.skel" "${TARGET_MOF}" "${CIM_CLASSES}")
+cim_registration(${PROVIDER_NAME} ${LIBRARY_NAME} ${MOF} share/openlmi-providers "${TARGET_MOF}")
+
+
install(TARGETS ${LIBRARY_NAME} DESTINATION lib${LIB_SUFFIX}/cmpi/)
install(PROGRAMS ${CIMPROVAGT_SCRIPT} DESTINATION libexec/pegasus)
install(FILES ${TARGET_MOF} DESTINATION share/openlmi-providers/)
diff --git a/src/service-dbus/CMakeLists.txt b/src/service-dbus/CMakeLists.txt
index 60a3d8a..02500f9 100644
--- a/src/service-dbus/CMakeLists.txt
+++ b/src/service-dbus/CMakeLists.txt
@@ -34,11 +34,12 @@ target_link_libraries(${LIBRARY_NAME}
${GIO_LIBRARIES})
# Create registration file
-cim_registration(${PROVIDER_NAME} ${LIBRARY_NAME} ${MOF} share/openlmi-providers)
-
set(TARGET_MOF "${CMAKE_BINARY_DIR}/mof/90_LMI_Service_Profile.mof")
profile_mof_generate("90_LMI_Service_Profile.mof.skel" "${TARGET_MOF}" "LMI_Service")
+cim_registration(${PROVIDER_NAME} ${LIBRARY_NAME} ${MOF} share/openlmi-providers "${TARGET_MOF}")
+
+
install(TARGETS ${LIBRARY_NAME} DESTINATION lib${LIB_SUFFIX}/cmpi)
install(PROGRAMS ${CIMPROVAGT_SCRIPT} DESTINATION libexec/pegasus)
install(FILES ${TARGET_MOF} DESTINATION share/openlmi-providers/)
diff --git a/src/service/CMakeLists.txt b/src/service/CMakeLists.txt
index 92e94dc..99f2cac 100644
--- a/src/service/CMakeLists.txt
+++ b/src/service/CMakeLists.txt
@@ -24,11 +24,12 @@ include_directories(${CMAKE_CURRENT_BINARY_DIR} ${CMPI_INCLUDE_DIR})
target_link_libraries(${LIBRARY_NAME} openlmicommon ${KONKRETCMPI_LIBRARIES})
# Create registration file
-cim_registration(${PROVIDER_NAME} ${LIBRARY_NAME} "60_LMI_Service.mof" share/openlmi-providers)
-
set(TARGET_MOF "${CMAKE_BINARY_DIR}/mof/90_LMI_Service_Profile.mof")
profile_mof_generate("90_LMI_Service_Profile.mof.skel" "${TARGET_MOF}" "LMI_Service")
+cim_registration(${PROVIDER_NAME} ${LIBRARY_NAME} "60_LMI_Service.mof" share/openlmi-providers "${TARGET_MOF}")
+
+
install(PROGRAMS util/servicedisc.sh util/serviceutil.sh DESTINATION libexec)
install(PROGRAMS ${CIMPROVAGT_SCRIPT} DESTINATION libexec/pegasus)
install(TARGETS ${LIBRARY_NAME} DESTINATION lib${LIB_SUFFIX}/cmpi)
diff --git a/src/software-dbus/CMakeLists.txt b/src/software-dbus/CMakeLists.txt
index 5202c33..04d8508 100644
--- a/src/software-dbus/CMakeLists.txt
+++ b/src/software-dbus/CMakeLists.txt
@@ -32,11 +32,12 @@ target_link_libraries(${LIBRARY_NAME}
${PACKAGEKIT_LIBRARIES})
# Create registration file
-cim_registration(${PROVIDER_NAME} ${LIBRARY_NAME} ${MOF} share/openlmi-providers)
-
set(TARGET_MOF "${CMAKE_BINARY_DIR}/mof/90_LMI_${PROVIDER_NAME}_Profile.mof")
profile_mof_generate("90_LMI_${PROVIDER_NAME}_Profile.mof.skel" "${TARGET_MOF}" "${CIM_CLASSES}")
+cim_registration(${PROVIDER_NAME} ${LIBRARY_NAME} ${MOF} share/openlmi-providers "${TARGET_MOF}")
+
+
install(TARGETS ${LIBRARY_NAME} DESTINATION lib${LIB_SUFFIX}/cmpi)
install(PROGRAMS ${CIMPROVAGT_SCRIPT} DESTINATION libexec/pegasus)
install(FILES ${TARGET_MOF} DESTINATION share/openlmi-providers/)