Browse Source

Fix #3

Apparently, CMake versions < 2.8 expect the FILES keyword in the
file(INSTALL) command.
tags/1.1
Timo Röhling 11 years ago
parent
commit
69a58fa09b
1 changed files with 4 additions and 4 deletions
  1. 4
    4
      postinstall.cmake.in

+ 4
- 4
postinstall.cmake.in View File

12
 endif()
12
 endif()
13
 
13
 
14
 if(INIT_FLAVOR AND NOT EXISTS "$ENV{DESTDIR}/etc/default/@PROJECT_NAME@")
14
 if(INIT_FLAVOR AND NOT EXISTS "$ENV{DESTDIR}/etc/default/@PROJECT_NAME@")
15
-	file(INSTALL "@CMAKE_CURRENT_SOURCE_DIR@/@PROJECT_NAME@.default" DESTINATION "/etc/default" RENAME "@PROJECT_NAME@")
15
+	file(INSTALL FILES "@CMAKE_CURRENT_SOURCE_DIR@/@PROJECT_NAME@.default" DESTINATION "/etc/default" RENAME "@PROJECT_NAME@")
16
 endif()
16
 endif()
17
 
17
 
18
 if(INIT_FLAVOR STREQUAL "sysv")
18
 if(INIT_FLAVOR STREQUAL "sysv")
19
-	file(INSTALL "@CMAKE_CURRENT_BINARY_DIR@/@PROJECT_NAME@.init" TYPE PROGRAM DESTINATION "/etc/init.d" RENAME "@PROJECT_NAME@")
19
+	file(INSTALL FILES "@CMAKE_CURRENT_BINARY_DIR@/@PROJECT_NAME@.init" TYPE PROGRAM DESTINATION "/etc/init.d" RENAME "@PROJECT_NAME@")
20
 	if(INSSERV)
20
 	if(INSSERV)
21
 		execute_process(
21
 		execute_process(
22
 			COMMAND ${INSSERV} -p "$ENV{DESTDIR}/etc/init.d" @PROJECT_NAME@
22
 			COMMAND ${INSSERV} -p "$ENV{DESTDIR}/etc/init.d" @PROJECT_NAME@
23
 		)
23
 		)
24
 	endif()
24
 	endif()
25
 elseif(INIT_FLAVOR STREQUAL "upstart")
25
 elseif(INIT_FLAVOR STREQUAL "upstart")
26
-	file(INSTALL "@CMAKE_CURRENT_BINARY_DIR@/@PROJECT_NAME@.upstart" DESTINATION "/etc/init" RENAME "@PROJECT_NAME@.conf")
26
+	file(INSTALL FILES "@CMAKE_CURRENT_BINARY_DIR@/@PROJECT_NAME@.upstart" DESTINATION "/etc/init" RENAME "@PROJECT_NAME@.conf")
27
 endif()
27
 endif()
28
 
28
 
29
 if(GENERATE_SRS_SECRET AND DD AND BASE64 AND EXISTS "/dev/urandom" AND NOT EXISTS "$ENV{DESTDIR}/etc/${SECRET_FILE}")
29
 if(GENERATE_SRS_SECRET AND DD AND BASE64 AND EXISTS "/dev/urandom" AND NOT EXISTS "$ENV{DESTDIR}/etc/${SECRET_FILE}")
35
 		ERROR_QUIET
35
 		ERROR_QUIET
36
 		OUTPUT_STRIP_TRAILING_WHITESPACE
36
 		OUTPUT_STRIP_TRAILING_WHITESPACE
37
 	)
37
 	)
38
-file(INSTALL "@CMAKE_CURRENT_BINARY_DIR@/${SECRET_FILE}" DESTINATION "/etc" FILE_PERMISSIONS OWNER_READ OWNER_WRITE)
38
+file(INSTALL FILES "@CMAKE_CURRENT_BINARY_DIR@/${SECRET_FILE}" DESTINATION "/etc" FILE_PERMISSIONS OWNER_READ OWNER_WRITE)
39
 file(REMOVE "@CMAKE_CURRENT_BINARY_DIR@/${SECRET_FILE}")
39
 file(REMOVE "@CMAKE_CURRENT_BINARY_DIR@/${SECRET_FILE}")
40
 endif()
40
 endif()

Loading…
Cancel
Save