ba58279
From: Peter Lemenkov <lemenkov@gmail.com>
ba58279
Date: Wed, 17 Jun 2015 16:12:38 +0300
ba58279
Subject: [PATCH] Install DSM module config files if any
ba58279
ba58279
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
ba58279
ba58279
diff --git a/cmake/dsm.lib.rules.txt b/cmake/dsm.lib.rules.txt
ba58279
index 1358b48..230663d 100644
ba58279
--- a/cmake/dsm.lib.rules.txt
ba58279
+++ b/cmake/dsm.lib.rules.txt
ba58279
@@ -1,5 +1,7 @@
ba58279
 # A place for common parts of SEMS DSM modules rules
ba58279
 
ba58279
+INCLUDE(${CMAKE_SOURCE_DIR}/cmake/config.rules.txt)
ba58279
+
ba58279
 # We must add base apps/dsm directory as INCLUDEDIR
ba58279
 INCLUDE_DIRECTORIES (../..)
ba58279
 
ba58279
@@ -23,7 +25,15 @@ TARGET_LINK_LIBRARIES(sems_dsm_${sems_dsm_module_name} ${CMAKE_DL_LIBS} ${sems_d
ba58279
 SET_TARGET_PROPERTIES(sems_dsm_${sems_dsm_module_name} PROPERTIES OUTPUT_NAME ${sems_dsm_module_name})
ba58279
 SET_TARGET_PROPERTIES(sems_dsm_${sems_dsm_module_name} PROPERTIES PREFIX "")
ba58279
 
ba58279
+ADD_DEFINITIONS(-DMOD_NAME=\\\"${sems_dsm_module_name}\\\")
ba58279
+
ba58279
 INSTALL(
ba58279
 	TARGETS sems_dsm_${sems_dsm_module_name}
ba58279
 	LIBRARY DESTINATION ${SEMS_EXEC_PREFIX}/${SEMS_LIBDIR}/sems/dsm/
ba58279
 )
ba58279
+
ba58279
+IF(NOT DEFINED ${sems_dsm_module_name}_config_files)
ba58279
+	SEMS_INSTALL_CONFIGS("${sems_dsm_module_name}")
ba58279
+ELSE(NOT DEFINED ${sems_dsm_module_name}_config_files)
ba58279
+	SEMS_INSTALL_CONFIGS("${${sems_dsm_module_name}_config_files}")
ba58279
+ENDIF(NOT DEFINED ${sems_dsm_module_name}_config_files)