From f8eeb566ae4ec01568b989ccb31c862d5e34c153 Mon Sep 17 00:00:00 2001 From: Vladislav Vaintroub Date: Wed, 2 Dec 2009 17:17:14 +0100 Subject: [PATCH] Fix "command install() is not scriptable" cmake error --- scripts/install_scripts.cmake.in | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/scripts/install_scripts.cmake.in b/scripts/install_scripts.cmake.in index 145c5405de3..8d6d17ce1b5 100644 --- a/scripts/install_scripts.cmake.in +++ b/scripts/install_scripts.cmake.in @@ -109,15 +109,26 @@ IF(WIN32) SET(SH_FILES mysql_convert_table_format mysqld_multi) FOREACH(file ${PLIN_FILES}) - CONFIGURE_FILE(${file}.pl.in + CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/${file}.pl.in ${CMAKE_CURRENT_BINARY_DIR}/${file}.pl ESCAPE_QUOTES @ONLY) - INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/${file}.pl DESTINATION scripts) + + FILE(INSTALL DESTINATION + "${CMAKE_INSTALL_PREFIX}/scripts" TYPE FILE + PERMISSIONS OWNER_READ OWNER_WRITE + OWNER_EXECUTE GROUP_READ GROUP_EXECUTE + WORLD_READ WORLD_EXECUTE FILES + "${CMAKE_CURRENT_BINARY_DIR}/${file}.pl") ENDFOREACH() FOREACH(file ${SH_FILES}) - CONFIGURE_FILE(${file}.sh + CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/${file}.sh ${CMAKE_CURRENT_BINARY_DIR}/${file}.pl ESCAPE_QUOTES @ONLY) - INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/${file}.pl DESTINATION scripts) + FILE(INSTALL DESTINATION + "${CMAKE_INSTALL_PREFIX}/scripts" TYPE FILE + PERMISSIONS OWNER_READ OWNER_WRITE + OWNER_EXECUTE GROUP_READ GROUP_EXECUTE + WORLD_READ WORLD_EXECUTE FILES + "${CMAKE_CURRENT_BINARY_DIR}/${file}.pl") ENDFOREACH() ELSE() # On Unix, most of the files end up in the bin directory