mirror of https://github.com/sipwise/sems.git
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>sayer/1.4-spce2.6
parent
6f049cb7b8
commit
d31c6fd18f
@ -1,17 +1,21 @@
|
||||
FOREACH (config_file ${sems_module_name} ${sems_config_files})
|
||||
# Check whether we providing a template for this config
|
||||
FIND_PATH(SEMS_${sems_module_name}_CONFIG_${config_file}_TEMPLATE ${config_file}.conf.cmake PATHS ${CMAKE_CURRENT_SOURCE_DIR}/etc)
|
||||
MACRO(SEMS_INSTALL_CONFIGS config_files)
|
||||
FOREACH (config_file ${config_files})
|
||||
# Check whether we providing a template for this config
|
||||
FIND_PATH(SEMS_${sems_module_name}_CONFIG_${config_file}_TEMPLATE ${config_file}.conf.cmake PATHS ${CMAKE_CURRENT_SOURCE_DIR}/etc)
|
||||
|
||||
IF (SEMS_${sems_module_name}_CONFIG_${config_file}_TEMPLATE)
|
||||
# If we do provide a template, then process it and create real
|
||||
# config
|
||||
CONFIGURE_FILE (
|
||||
${SEMS_${sems_module_name}_CONFIG_${config_file}_TEMPLATE}/${config_file}.conf.cmake
|
||||
${SEMS_${sems_module_name}_CONFIG_${config_file}_TEMPLATE}/${config_file}.conf
|
||||
)
|
||||
ENDIF (SEMS_${sems_module_name}_CONFIG_${config_file}_TEMPLATE)
|
||||
IF (SEMS_${sems_module_name}_CONFIG_${config_file}_TEMPLATE)
|
||||
# If we do provide a template, then process it and create real
|
||||
# config
|
||||
CONFIGURE_FILE (
|
||||
${SEMS_${sems_module_name}_CONFIG_${config_file}_TEMPLATE}/${config_file}.conf.cmake
|
||||
${SEMS_${sems_module_name}_CONFIG_${config_file}_TEMPLATE}/${config_file}.conf
|
||||
)
|
||||
ENDIF (SEMS_${sems_module_name}_CONFIG_${config_file}_TEMPLATE)
|
||||
|
||||
INSTALL(
|
||||
FILES ./etc/${config_file}.conf DESTINATION ${SEMS_CFG_PREFIX}/etc/sems/etc/
|
||||
)
|
||||
ENDFOREACH(config_file ${sems_module_name} ${sems_config_files})
|
||||
IF (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/etc/${config_file}.conf )
|
||||
INSTALL(
|
||||
FILES ${CMAKE_CURRENT_SOURCE_DIR}/etc/${config_file}.conf DESTINATION ${SEMS_CFG_PREFIX}/etc/sems/etc/
|
||||
)
|
||||
ENDIF (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/etc/${config_file}.conf )
|
||||
ENDFOREACH (config_file ${config_files})
|
||||
ENDMACRO(SEMS_INSTALL_CONFIGS)
|
||||
|
||||
Loading…
Reference in new issue