Revision: 41262
http://brlcad.svn.sourceforge.net/brlcad/?rev=41262&view=rev
Author: starseeker
Date: 2010-11-06 04:00:18 +0000 (Sat, 06 Nov 2010)
Log Message:
-----------
OK, referred to the trunk bwish to figure this out - need the auto_path set by
tclcad_auto_path if the default init fails - I'm not sure why we wouldn't want
to use the tclcad paths for bwish by default, so just put the call in until
it's clear why we shouldn't. Add the paths we need for this CMake build
configuration - looks like we'll need at least one, probably two more entries
in brlcad_config.h to make this properly generic. Take care of that after
fixing itk build. It is interesting that tclsh succeeds but btclsh does not
(by itself) - are we missing some init code from tclsh?
Modified Paths:
--------------
brlcad/branches/cmake/src/bwish/CMakeLists.txt
brlcad/branches/cmake/src/bwish/main.c
brlcad/branches/cmake/src/libtclcad/tclcadAutoPath.c
brlcad/branches/cmake/src/other/CMakeLists.txt
Modified: brlcad/branches/cmake/src/bwish/CMakeLists.txt
===================================================================
--- brlcad/branches/cmake/src/bwish/CMakeLists.txt 2010-11-06 02:24:50 UTC
(rev 41261)
+++ brlcad/branches/cmake/src/bwish/CMakeLists.txt 2010-11-06 04:00:18 UTC
(rev 41262)
@@ -5,9 +5,17 @@
${TK_INCLUDE_PATH}
)
+BRLCAD_ADDEXEC(btclsh "cmd.c input.c main.c tcl.c" "libbu libtclcad libtermio")
+
IF(BRLCAD-ENABLE_TK)
BRLCAD_ADDEXEC(bwish "cmd.c input.c main.c tcl.c" "libtclcad libdm
libtermio ${X11_LIBRARIES} ${X11_Xi_LIB} libdm")
SET_TARGET_PROPERTIES(bwish PROPERTIES COMPILE_DEFINITIONS "BWISH=1")
ENDIF(BRLCAD-ENABLE_TK)
-BRLCAD_ADDEXEC(btclsh "cmd.c input.c main.c tcl.c" "libbu libtclcad libtermio")
+IF(ITCL_LIBRARY MATCHES "^itcl$")
+ ADD_DEPENDENCIES(btclsh itcl)
+ENDIF(ITCL_LIBRARY MATCHES "^itcl$")
+
+IF(ITK_LIBRARY MATCHES "^itk$")
+ ADD_DEPENDENCIES(bwish itcl itk)
+ENDIF(ITK_LIBRARY MATCHES "^itk$")
Modified: brlcad/branches/cmake/src/bwish/main.c
===================================================================
--- brlcad/branches/cmake/src/bwish/main.c 2010-11-06 02:24:50 UTC (rev
41261)
+++ brlcad/branches/cmake/src/bwish/main.c 2010-11-06 04:00:18 UTC (rev
41262)
@@ -71,6 +71,8 @@
int init_tcl = 1;
int init_itcl = 1;
+ /* Go ahead and add the BRL-CAD paths */
+ tclcad_auto_path(interp);
#ifdef BWISH
int init_tk = 1;
int init_itk = 1;
@@ -86,23 +88,14 @@
#endif
- /* Go ahead and add the BRL-CAD paths - if there is anything
- * installed there we want to use it in preference to anything
- * in system path */
- /* if (Tcl_Eval(interp, "set auto_path [linsert $auto_path 0
/usr/brlcad/lib]") != TCL_OK) {
- bu_log("Tcl_Eval ERROR:\n%s\n", Tcl_GetStringResult(interp));
- return TCL_ERROR;
- }*/
- tclcad_auto_path(interp);
-
- /* Initialize Tcl */
+ /* Initialize Itcl */
if (Tcl_Eval(interp, "package require Itcl") != TCL_OK) {
bu_log("Tcl_Eval ERROR:\n%s\n", Tcl_GetStringResult(interp));
return TCL_ERROR;
}
#ifdef BWISH
- /* Initialize Tk */
+ /* Initialize Itk */
if (Tcl_Eval(interp, "package require Itk") != TCL_OK) {
bu_log("Tcl_Eval ERROR:\n%s\n", Tcl_GetStringResult(interp));
return TCL_ERROR;
Modified: brlcad/branches/cmake/src/libtclcad/tclcadAutoPath.c
===================================================================
--- brlcad/branches/cmake/src/libtclcad/tclcadAutoPath.c 2010-11-06
02:24:50 UTC (rev 41261)
+++ brlcad/branches/cmake/src/libtclcad/tclcadAutoPath.c 2010-11-06
04:00:18 UTC (rev 41262)
@@ -213,6 +213,8 @@
/* if uninstalled, add search paths for source invocation */
if (from_built) {
+ bu_vls_printf(&auto_path, "%c%s%clib%ctcl8.5",BU_PATH_SEPARATOR,
BUILD_BINARY_DIR, BU_DIR_SEPARATOR, BU_DIR_SEPARATOR);
+ bu_vls_printf(&auto_path, "%c%s%clib",BU_PATH_SEPARATOR,
BUILD_BINARY_DIR, BU_DIR_SEPARATOR);
bu_vls_printf(&auto_path, "%c%s%csrc%cother%ctcl%cunix",
BU_PATH_SEPARATOR, srcpath, BU_DIR_SEPARATOR,
BU_DIR_SEPARATOR, BU_DIR_SEPARATOR, BU_DIR_SEPARATOR);
bu_vls_printf(&auto_path, "%c%s%csrc%cother%ctcl%clibrary",
Modified: brlcad/branches/cmake/src/other/CMakeLists.txt
===================================================================
--- brlcad/branches/cmake/src/other/CMakeLists.txt 2010-11-06 02:24:50 UTC
(rev 41261)
+++ brlcad/branches/cmake/src/other/CMakeLists.txt 2010-11-06 04:00:18 UTC
(rev 41262)
@@ -183,6 +183,7 @@
IF(BRLCAD_BUILD_LOCAL_ITK)
ADD_SUBDIRECTORY(incrTcl/itk)
ADD_DEPENDENCIES(itk itcl tcl tk)
+ SET(ITK_LIBRARY itk CACHE STRING "ITK_LIBRARY" FORCE)
SET(ITK_VERSION "3.3" CACHE STRING "ITK_VERSION" FORCE)
ELSE(BRLCAD_BUILD_LOCAL_ITK)
SET(ITK_VERSION "${ITCL_PACKAGE_VERSION}" CACHE STRING "ITK_VERSION" FORCE)
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
The Next 800 Companies to Lead America's Growth: New Video Whitepaper
David G. Thomson, author of the best-selling book "Blueprint to a
Billion" shares his insights and actions to help propel your
business during the next growth cycle. Listen Now!
http://p.sf.net/sfu/SAP-dev2dev
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits