Revision: 41241
          http://brlcad.svn.sourceforge.net/brlcad/?rev=41241&view=rev
Author:   starseeker
Date:     2010-11-03 17:12:00 +0000 (Wed, 03 Nov 2010)

Log Message:
-----------
Teach CMake how to make the tclsh8.5 link - can't do it just by setting the 
VERSION variable, since that gives us tclsh-8.5

Modified Paths:
--------------
    brlcad/branches/cmake/src/other/tcl/CMakeLists.txt

Modified: brlcad/branches/cmake/src/other/tcl/CMakeLists.txt
===================================================================
--- brlcad/branches/cmake/src/other/tcl/CMakeLists.txt  2010-11-03 16:05:58 UTC 
(rev 41240)
+++ brlcad/branches/cmake/src/other/tcl/CMakeLists.txt  2010-11-03 17:12:00 UTC 
(rev 41241)
@@ -157,6 +157,7 @@
 
 SC_TCL_CFG_ENCODING()
 
+SET(TCL_LINK_LIBS "")
 SC_TCL_LINK_LIBS()
 
 # TODO - look over SC_ENABLE_SHARED, SC_CONFIG_CFLAGS and SC_ENABLE_SYMBOLS
@@ -700,7 +701,8 @@
 add_executable(tclsh ${TCLSH_SRCS})
 target_link_libraries(tclsh tcl ${EXTRA_TCLSH_LIBS})
 install(TARGETS tclsh DESTINATION bin)
-install(TARGETS tclsh DESTINATION bin RENAME 
tclsh${TCL_MAJOR_VERSION}.${TCL_MINOR_VERSION})
-
-install(FILES library/init.tcl DESTINATION 
lib/tcl${TCL_MAJOR_VERSION}.${TCL_MINOR_VERSION})
-install(FILES library/auto.tcl DESTINATION 
lib/tcl${TCL_MAJOR_VERSION}.${TCL_MINOR_VERSION})
+# Regrettably, setting the VERSION variable on the tclsh target produces a 
symlink with a dash (which is a sensible default but
+# inconsistent with standard tcl practice) and I don't see how to alter that.  
This is the workaround.
+GET_FILENAME_COMPONENT(TCLSH_INSTALL_NAME ${CMAKE_INSTALL_PREFIX}/bin/tclsh 
ABSOLUTE)
+FILE(WRITE ${CMAKE_BINARY_DIR}/CMakeTmp/tclsh_make_symlink.cmake 
"exec_program(${CMAKE_COMMAND} ARGS -E create_symlink ${TCLSH_INSTALL_NAME} 
${TCLSH_INSTALL_NAME}${TCL_MAJOR_VERSION}.${TCL_MINOR_VERSION})")
+set_target_properties(tclsh PROPERTIES POST_INSTALL_SCRIPT 
${CMAKE_BINARY_DIR}/CMakeTmp/tclsh_make_symlink.cmake) 


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
Achieve Improved Network Security with IP and DNS Reputation.
Defend against bad network traffic, including botnets, malware, 
phishing sites, and compromised hosts - saving your company time, 
money, and embarrassment.   Learn More! 
http://p.sf.net/sfu/hpdev2dev-nov
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to