summaryrefslogtreecommitdiffstats
path: root/src/sssd/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'src/sssd/CMakeLists.txt')
-rw-r--r--src/sssd/CMakeLists.txt40
1 files changed, 40 insertions, 0 deletions
diff --git a/src/sssd/CMakeLists.txt b/src/sssd/CMakeLists.txt
new file mode 100644
index 0000000..2393a6f
--- /dev/null
+++ b/src/sssd/CMakeLists.txt
@@ -0,0 +1,40 @@
+# Names
+set(PROVIDER_NAME SSSD)
+set(LIBRARY_NAME cmpiLMI_${PROVIDER_NAME})
+set(MOF LMI_${PROVIDER_NAME}.mof)
+set(REG LMI_${PROVIDER_NAME}.reg)
+
+# CFLAGS
+set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -ggdb3 -O0")
+
+# Generate headers and sources from the MOF file
+konkretcmpi_generate(${MOF} CIM_PROVIDERS CIM_HEADERS CIM_CLASSES)
+
+# Include directories
+include_directories(${CMAKE_CURRENT_BINARY_DIR} ${CMPI_INCLUDE_DIR})
+
+# Source files
+set(provider_SRCS LMI_${PROVIDER_NAME}Provider.c)
+
+# Define library
+add_library(${LIBRARY_NAME} SHARED
+ ${provider_SRCS}
+ ${CIM_PROVIDERS}
+ ${CIM_HEADERS})
+
+target_link_libraries(${LIBRARY_NAME}
+ openlmicommon
+ ${KONKRETCMPI_LIBRARIES})
+
+# Create registration file
+cim_registration(${PROVIDER_NAME} ${LIBRARY_NAME} ${MOF} ${REG_INSTALL_DIR})
+
+# Install
+install(TARGETS ${LIBRARY_NAME} DESTINATION ${LIB_INSTALL_DIR})
+install(FILES ../../mof/${MOF} DESTINATION ${MOF_INSTALL_DIR})
+
+# Uninstall
+add_custom_target(uninstall-${PROVIDER_NAME}
+ rm ${REG_INSTALL_DIR}/${REG}
+ ${MOF_INSTALL_DIR}/${MOF}
+ ${LIB_INSTALL_DIR}/lib${LIBRARY_NAME}.so)