if zm.conf exists, rename to zm.conf.new

pull/1863/head
Isaac Connor 2017-05-10 08:57:47 -04:00
parent f42004b4a1
commit ec85d9a6a7
1 changed files with 3 additions and 0 deletions

View File

@ -736,6 +736,9 @@ endif(zmconfgen_result EQUAL 0)
install(CODE "
if (NOT EXISTS \"${ZM_CONFIG_DIR}/zm.conf\")
file(INSTALL \"${CMAKE_CURRENT_BINARY_DIR}/zm.conf\" DESTINATION \"${ZM_CONFIG_DIR}\")
else (NOT EXISTS \"${ZM_CONFIG_DIR}/zm.conf\")
file(RENAME \"${CMAKE_CURRENT_BINARY_DIR}/zm.conf\" \"${CMAKE_CURRENT_BINARY_DIR}/zm.conf.new\")
file(INSTALL \"${CMAKE_CURRENT_BINARY_DIR}/zm.conf.new\" DESTINATION \"${ZM_CONFIG_DIR}\")
endif()
")