From 32675443733a47680db1299485bb46b20b8c5a8e Mon Sep 17 00:00:00 2001 From: Alexander Neundorf Date: Fri, 26 Jan 2007 18:46:13 +0000 Subject: use install(CODE ...) instead of file(WRITE ... ) followed by install(SCRIPT ...) so this is: -less cmake code -now with qoutes so it should also work with path containing spaces -doesn't create an additionally small cmake file for every kde4_install_handbook() call, so it should run a bit faster Alex CCMAIL: winter@kde.org svn path=/trunk/KDE/kdelibs/; revision=627478 --- modules/KDE4Macros.cmake | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'modules/KDE4Macros.cmake') diff --git a/modules/KDE4Macros.cmake b/modules/KDE4Macros.cmake index 05e78566..bd98234b 100644 --- a/modules/KDE4Macros.cmake +++ b/modules/KDE4Macros.cmake @@ -224,9 +224,8 @@ macro (KDE4_INSTALL_HANDBOOK) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/index.cache.bz2 ${_books} ${_images} DESTINATION ${HTML_INSTALL_DIR}/en/${dirname}) # TODO symlinks on non-unix platforms if (UNIX) - # write a cmake script file which creates the symlink - file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/make_doc_symlink.cmake "exec_program(${CMAKE_COMMAND} ARGS -E create_symlink ${HTML_INSTALL_DIR}/en/common ${HTML_INSTALL_DIR}/en/${dirname}/common )\n") - install(SCRIPT ${CMAKE_CURRENT_BINARY_DIR}/make_doc_symlink.cmake) + # execute some cmake code on make install which creates the symlink + install(CODE "execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink \"${HTML_INSTALL_DIR}/en/common\" \"${HTML_INSTALL_DIR}/en/${dirname}/common\" )" ) endif (UNIX) endmacro (KDE4_INSTALL_HANDBOOK ) -- cgit v1.2.1