Hi,
in the trunk-cmake-build, we install everything into a single directory like
/usr/local/share/lyx2.0.
I would like to additionally install a smal shell script as "/usr/bin/lyx" 
beeing a wrap to call the actual executable.

Opinions?

        Kornel
-- 
Kornel Benko
kornel.be...@berlin.de
Index: development/cmake/scripts/lyx.sh.in
===================================================================
--- development/cmake/scripts/lyx.sh.in	(revision 0)
+++ development/cmake/scripts/lyx.sh.in	(revision 0)
@@ -0,0 +1,2 @@
+#! /bin/sh
+exec @CMAKE_INSTALL_PREFIX@/bin/lyx $*
Index: development/cmake/scripts/CMakeLists.txt
===================================================================
--- development/cmake/scripts/CMakeLists.txt	(revision 28711)
+++ development/cmake/scripts/CMakeLists.txt	(working copy)
@@ -8,5 +8,13 @@
 if (UNIX)
   set(_project "scripts")
   include(../PyCompile)
+
+  # it is ulikelly, that CMAKE_INSTALL_PREFIX == "/usr"
+  # but nonetheless we do not want to overwrite the actual
+  # executable itself.
+  if(NOT CMAKE_INSTALL_PREFIX STREQUAL "/usr")
+    configure_file("lyx.sh.in" "${CMAKE_BINARY_DIR}/lyx")
+    install(PROGRAMS "${CMAKE_BINARY_DIR}/lyx" DESTINATION "/usr/bin")
+  endif()
 endif()
 

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to