- Timestamp:
- Dec 7, 2015, 10:23:36 PM (11 years ago)
- Branches:
- 1941-docker-image-to-test, devel, master
- Children:
- 63b6642
- Parents:
- b61a88b
- Location:
- tolbase
- Files:
-
- 2 added
- 4 edited
-
CMakeLists.txt (modified) (3 diffs)
-
bin/CMakeLists.txt (added)
-
bin/tolbase.sh (added)
-
generic/CMakeLists.txt (modified) (1 diff)
-
generic/tolbase.c (modified) (3 diffs)
-
lib/pkgIndex.tcl.in (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
tolbase/CMakeLists.txt
rb61a88b rd7aca32 1 1 cmake_minimum_required( VERSION 2.8 ) 2 2 project( TOLBASE ) 3 4 set( INSTALL_WITH_TOL 1 ) 3 5 4 6 set( CMAKE_MODULE_PATH … … 52 54 53 55 if( TCL_FOUND ) 56 message( STATUS "TK_LIBRARY_PATH = ${TK_LIBRARY_PATH}" ) 57 message( STATUS ${TCL_STUB_LIBRARY} ) 54 58 message( STATUS ${TCL_INCLUDE_PATH} ) 55 get_filename_component( CMAKE_INSTALL_PREFIX ${TCL_LIBRARY_PATH} PATH ) 59 message( STATUS ${TCL_LIBRARY_PATH} ) 60 if( INSTALL_WITH_TOL ) 61 set( CMAKE_INSTALL_PREFIX ${TOL_PREFIX_PATH} ) 62 else( INSTALL_WITH_TOL ) 63 get_filename_component( CMAKE_INSTALL_PREFIX ${TCL_LIBRARY_PATH} PATH ) 64 endif( INSTALL_WITH_TOL ) 56 65 if( WIN32 ) 57 66 string( REPLACE "\\" "/" CMAKE_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX} ) … … 65 74 CACHE INTERNAL "" ) 66 75 76 if( UNIX ) 77 add_subdirectory( bin ) 78 endif( UNIX ) 79 67 80 add_subdirectory( generic ) 68 81 add_subdirectory( lib ) -
tolbase/generic/CMakeLists.txt
rb61a88b rd7aca32 8 8 if ( WIN32 ) 9 9 set( CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -mwindows" ) 10 else ( WIN32 )11 # use, i.e. don't skip the full RPATH for the build tree12 SET(CMAKE_SKIP_BUILD_RPATH FALSE)13 14 # when building, don't use the install RPATH already15 # (but later on when installing)16 SET(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)17 18 SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")19 20 # add the automatically determined parts of the RPATH21 # which point to directories outside the build tree to the install RPATH22 SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)23 24 # the RPATH to be used when installing, but only if it's not a system directory25 LIST(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES "${CMAKE_INSTALL_PREFIX}/lib" isSystemDir)26 IF("${isSystemDir}" STREQUAL "-1")27 SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")28 ENDIF("${isSystemDir}" STREQUAL "-1")29 10 endif( WIN32 ) 30 11 -
tolbase/generic/tolbase.c
rb61a88b rd7aca32 14 14 #include "tk.h" 15 15 #include "locale.h" 16 #ifdef WIN32 16 17 #include <windows.h> 18 #endif 17 19 20 static int g_argc = 0; 21 static char **g_argv = NULL; 22 23 static 24 void SetupArgv( Tcl_Interp *interp ) 25 { 26 Tcl_Obj *argvPtr = Tcl_NewListObj(0, NULL); 27 int i; 28 for( i = 1; i < g_argc; i++ ) 29 { 30 Tcl_DString ds; 31 Tcl_ExternalToUtfDString(NULL, g_argv[i], -1, &ds); 32 Tcl_ListObjAppendElement(NULL, argvPtr, 33 Tcl_NewStringObj(Tcl_DStringValue(&ds), 34 Tcl_DStringLength(&ds))); 35 Tcl_DStringFree(&ds); 36 } 37 Tcl_SetVar2Ex(interp, "argv", NULL, argvPtr, TCL_GLOBAL_ONLY); 38 Tcl_SetVar2Ex(interp, "argc", NULL, Tcl_NewIntObj(g_argc-1), TCL_GLOBAL_ONLY); 39 } 18 40 19 41 #ifdef TK_TEST … … 39 61 */ 40 62 63 #ifdef WIN32 41 64 #pragma comment(linker, "/SUBSYSTEM:windows /ENTRY:mainCRTStartup") 65 #endif 42 66 43 67 int … … 139 163 */ 140 164 141 Tcl_PkgRequire( interp, "TolbaseApp", TOLBASE_VERSION, 1); 165 SetupArgv( interp ); 166 Tcl_VarEval( interp, "lappend", " auto_path", " [file join", 167 " [file dir [file dir ", Tcl_GetNameOfExecutable(), 168 " ] ] lib ]", NULL ); 169 if ( !Tcl_PkgRequire( interp, "TolbaseApp", TOLBASE_VERSION, 1) ) 170 { 171 printf( "%s\n", Tcl_GetStringResult( interp ) ); 172 Tcl_Exit( -1 ); 173 } 174 //Tcl_PkgRequire( interp, "TolbaseApp", TOLBASE_VERSION, 1); 142 175 return TCL_OK; 143 176 } -
tolbase/lib/pkgIndex.tcl.in
rb61a88b rd7aca32 5 5 lappend auto_path {%d} 6 6 source [ file join {%d} toltk init_toltk.tcl ] 7 package provide TolbaseApp @TOLBASE_VERSION_MAJOR@.@TOLBASE_VERSION_MINOR@ 7 8 } ]
Note: See TracChangeset
for help on using the changeset viewer.
