diff options
Diffstat (limited to 'blt/library/pkgIndex.tcl.in')
-rw-r--r-- | blt/library/pkgIndex.tcl.in | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/blt/library/pkgIndex.tcl.in b/blt/library/pkgIndex.tcl.in new file mode 100644 index 00000000000..ee93e9dc2cd --- /dev/null +++ b/blt/library/pkgIndex.tcl.in @@ -0,0 +1,29 @@ +# Tcl package index file, version 1.0 + +proc LoadBLT { version dir } { + + set suffix [info sharedlibextension] + regsub {\.} $version {} version_no_dots + + # Determine whether to load the normal BLT library or + # the "lite" tcl-only version. + + if { [info commands tk] == "tk" } { + set library BLT${version_no_dots}${suffix} + } else { + set library BLTlite${version_no_dots}${suffix} + } + + global tcl_platform + if { $tcl_platform(platform) == "unix" } { + set library [file join $dir lib${library}] + } + load $library BLT +} + +set version "%VERSION%" +set libdir "%LIB_DIR%" + +package ifneeded BLT $version [list LoadBLT $version $libdir] + +# End of package index file |