Fix "command install() is not scriptable" cmake error

This commit is contained in:
Vladislav Vaintroub 2009-12-02 17:17:14 +01:00
parent 1407b6f1ec
commit f8eeb566ae

View file

@ -109,15 +109,26 @@ IF(WIN32)
SET(SH_FILES mysql_convert_table_format mysqld_multi) SET(SH_FILES mysql_convert_table_format mysqld_multi)
FOREACH(file ${PLIN_FILES}) 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) ${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() ENDFOREACH()
FOREACH(file ${SH_FILES}) 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) ${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() ENDFOREACH()
ELSE() ELSE()
# On Unix, most of the files end up in the bin directory # On Unix, most of the files end up in the bin directory