Commit afb29a4c authored by andy's avatar andy
Browse files

ENH: Move the location of some libraries and fix installation

git-svn-id: http://svn.slicer.org/Slicer4/trunk@1267 3bd1e089-480b-0410-8dfb-8563597acbee
parent 03b10702
......@@ -166,7 +166,7 @@ int Slicer3_main(int argc, char *argv[])
int returnCode;
// Pass arguments to the Tcl script
cmd = "lappend auto_path $::SLICER_BUILD/SlicerBaseGUITcl; ";
cmd = "lappend auto_path $::SLICER_BUILD/lib/Slicer3/SlicerBaseGUITcl; ";
cmd += "package require SlicerBaseGUITcl; ";
returnCode = Slicer3_Tcl_Eval( interp, cmd.c_str() );
if ( returnCode )
......@@ -419,7 +419,7 @@ int Slicer3_main(int argc, char *argv[])
// --- SlicerDaemon Module
// need to source the slicerd.tcl script here
Slicer3_Tcl_Eval( interp, " \
source $::SLICER_BUILD/slicerd.tcl; slicerd_start \
source $::SLICER_BUILD/lib/Slicer3/slicerd.tcl; slicerd_start \
");
......@@ -538,7 +538,7 @@ int Slicer3_main(int argc, char *argv[])
//
std::string tclCommand = "set ::SLICER_PACKAGES(list) {};";
tclCommand += "set dirs [glob $::SLICER_BUILD/Modules/Packages/*]; ";
tclCommand += "set dirs [glob $::SLICER_BUILD/lib/Slicer3/Modules/Packages/*]; ";
tclCommand += "foreach d $dirs { ";
tclCommand += " if { [file exists $d/pkgIndex.tcl] } {";
tclCommand += " lappend ::SLICER_PACKAGES(list) [file tail $d];";
......
......@@ -166,7 +166,7 @@ CONFIGURE_FILE(
#
# install the tcl package for the gui
#
SET(SlicerBaseGUITcl_DIR ${Slicer3_BINARY_DIR}/SlicerBaseGUITcl)
SET(SlicerBaseGUITcl_DIR "${SLICER_LIBRARIES_DIR}/SlicerBaseGUITcl")
FILE(MAKE_DIRECTORY ${SlicerBaseGUITcl_DIR})
CONFIGURE_FILE(
......@@ -209,3 +209,8 @@ CONFIGURE_FILE(
${SlicerBaseGUITcl_DIR}/CsysSWidget.tcl
COPYONLY
)
# CMAke 2.4 does not have INSTALL(DIRECTORY ...) do it manually
#INSTALL(DIRECTORY "${Slicer3_BINARY_DIR}/SlicerBaseGUITcl"
# DESTINATION lib/Slicer3)
INSTALL(CODE "EXECUTE_PROCESS\(COMMAND \"${CMAKE_COMMAND}\" -E copy_directory \"${SLICER_LIBRARIES_DIR}/SlicerBaseGUITcl\" \"\${CMAKE_INSTALL_PREFIX}/lib/Slicer3/SlicerBaseGUITcl\"\)")
......@@ -34,6 +34,11 @@ SET (EXECUTABLE_OUTPUT_PATH ${Slicer3_BINARY_DIR}/bin/
CACHE PATH
"Single output directory for building all executables."
FORCE)
#
# Slicer libraries subdirectory
#
SET (SLICER_LIBRARIES_DIR "${Slicer3_BINARY_DIR}/lib/Slicer3")
# Add the testing directories
......@@ -158,12 +163,7 @@ IF(BUILD_DOCUMENTATION)
SUBDIRS(Utilities/Doxygen)
ENDIF(BUILD_DOCUMENTATION)
#INSTALL(DIRECTORY "${Slicer3_BINARY_DIR}/SlicerBaseGUITcl"
# DESTINATION SlicerBaseGUITcl)
# CMAke 2.4 does not have INSTALL(DIRECTORY ...) do it manually
#INSTALL(DIRECTORY "${Slicer3_BINARY_DIR}/Modules/Packages"
# DESTINATION Modules)
INSTALL(FILES "${Slicer3_BINARY_DIR}/slicerd.tcl"
DESTINATION .)
# DESTINATION lib/Slicer3/Modules)
INSTALL(CODE "EXECUTE_PROCESS\(COMMAND \"${CMAKE_COMMAND}\" -E copy_directory \"${SLICER_LIBRARIES_DIR}/Modules/Packages\" \"\${CMAKE_INSTALL_PREFIX}/lib/Slicer3/Modules/Packages\"\)")
......@@ -7,12 +7,12 @@ PROJECT(Editor)
# - copy over the tcl package files to the build directory
#
SET (Package_DIR ${Slicer3_BINARY_DIR}/Modules/Packages)
SET (Package_DIR ${SLICER_LIBRARIES_DIR}/Modules/Packages)
IF (NOT EXISTS ${Package_DIR})
FILE(MAKE_DIRECTORY ${Package_DIR})
ENDIF (NOT EXISTS ${Package_DIR})
SET(Editor_DIR ${Slicer3_BINARY_DIR}/Modules/Packages/Editor)
SET(Editor_DIR ${Package_DIR}/Editor)
FILE(MAKE_DIRECTORY ${Editor_DIR})
CONFIGURE_FILE( pkgIndex.tcl ${Editor_DIR}/pkgIndex.tcl COPYONLY)
......
......@@ -94,15 +94,29 @@ CONFIGURE_FILE(
CONFIGURE_FILE(
${SlicerDaemon_SOURCE_DIR}/Tcl/slicerd.tcl
${Slicer3_BINARY_DIR}/slicerd.tcl
${SLICER_LIBRARIES_DIR}/slicerd.tcl
)
CONFIGURE_FILE(
${SlicerDaemon_SOURCE_DIR}/Tcl/slicerget.tcl
${Slicer3_BINARY_DIR}/slicerget.tcl
${SLICER_LIBRARIES_DIR}/slicerget.tcl
)
CONFIGURE_FILE(
${SlicerDaemon_SOURCE_DIR}/Tcl/slicerput.tcl
${Slicer3_BINARY_DIR}/slicerput.tcl
${SLICER_LIBRARIES_DIR}/slicerput.tcl
)
INSTALL(FILES
"${SLICER_LIBRARIES_DIR}/slicerd.tcl"
DESTINATION lib/Slicer3)
INSTALL(FILES
"${SLICER_LIBRARIES_DIR}/slicerput.tcl"
DESTINATION lib/Slicer3)
INSTALL(FILES
"${SLICER_LIBRARIES_DIR}/slicerget.tcl"
DESTINATION lib/Slicer3)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment