Index: /osgVisual/CMakeLists.txt
===================================================================
--- /osgVisual/CMakeLists.txt	(revision 50)
+++ /osgVisual/CMakeLists.txt	(revision 51)
@@ -3,4 +3,15 @@
 PROJECT(osgVisual)
 #SET(CMAKE_MODULE_PATH "${osgVisual_SOURCE_DIR}/../CMakeModules;${CMAKE_MODULE_PATH}")
+
+#INCLUDE( CheckTypeSize )
+#CHECK_TYPE_SIZE( "void*" SIZE_OF_VOID_P )
+IF( CMAKE_SIZEOF_VOID_P EQUAL 4 )
+    MESSAGE( STATUS "32 bit architecture detected" )
+    SET(DESTINATION_ARCH "x86")
+ENDIF()
+IF( CMAKE_SIZEOF_VOID_P EQUAL 8 )
+    MESSAGE( STATUS "64 bit architecture detected" )
+    SET(DESTINATION_ARCH "x64")
+ENDIF()
 
 # Get OSG Settings
@@ -9,5 +20,5 @@
 FIND_PACKAGE(OpenGL REQUIRED)
 
-# Module sky-silverlining - At the moment only for Win32, will be opened to Unix asap
+# Module sky-silverlining - At the moment only for Win32, will be opened to Unix ASAP
 # OPTION( OPTION_VAR "description string" [initial value] )
 IF ( WIN32 )
@@ -28,6 +39,11 @@
 		)
 		
-		SET(SILVERLINING_LIBRARY_RELEASE $ENV{SILVERLINING_PATH}\\lib\\vc8\\win32\\SilverLining-MT-DLL.lib CACHE FILEPATH "Select the release library of Sundog-Soft's Silverlining SDK to link against." )
-		SET(SILVERLINING_LIBRARY_DEBUG $ENV{SILVERLINING_PATH}\\lib\\vc8\\win32\\SilverLining-MTD-DLL.lib CACHE FILEPATH "Select the debug library of Sundog-Soft's Silverlining SDK to link against." )
+		IF (DESTINATION_ARCH STREQUAL "x86")
+			SET(SILVERLINING_ARCH "win32")
+		ELSEIF ( DESTINATION_ARCH STREQUAL "x64" )
+			SET(SILVERLINING_ARCH "x64")
+		ENDIF ()
+		SET(SILVERLINING_LIBRARY_RELEASE $ENV{SILVERLINING_PATH}\\lib\\vc9\\${SILVERLINING_ARCH}\\SilverLining-MT-DLL.lib CACHE FILEPATH "Select the release library of Sundog-Soft's Silverlining SDK to link against." )
+		SET(SILVERLINING_LIBRARY_DEBUG $ENV{SILVERLINING_PATH}\\lib\\vc9\\${SILVERLINING_ARCH}\\SilverLining-MTD-DLL.lib CACHE FILEPATH "Select the debug library of Sundog-Soft's Silverlining SDK to link against." )
 		SET(SILVERLINING_INCLUDE_DIR "$ENV{SILVERLINING_PATH}\\Public Headers" CACHE PATH "Enter the path to the the public Include directory of Sundog-Soft's Silverlining SDK" )
 		SET(SILVERLINING_LICENSEE "Your user name" CACHE STRING "Enter your Silverlining licensee name. If you license available, osgVisual will work with silverlining as 5 minute demo with the default value." )
@@ -145,4 +161,5 @@
 		INCLUDE_DIRECTORIES(${EXTLINK_VCL_INCLUDE_DIR})
 		ADD_DEFINITIONS( "-DUSE_EXTLINK_VCL" )
+		#Linking: VCL uses #pragma to link, no need for linking configuration in CMAKE
 	ELSE(USE_EXTLINK_VCL)
 		SET(SOURCES
@@ -243,4 +260,8 @@
 	SET(USERFILE_COMMAND_ARGUMENTS_DEBUG "-C center --window 100 100 800 600 -m D:/OpenSceneGraph/VPB-Testdatensatz/DB_Small/database.ive -p salzburg.path" CACHE STRING "Command arguments (VS Project settings)" )
 	SET(USERFILE_REMOTE_MACHINE_DEBUG ${USER_NAME} CACHE STRING "Remote Debugging Machine (VS Project settings)")
+	IF (DESTINATION_ARCH STREQUAL "x64")
+		SET(USERFILE_ENVIRONMENT "PATH=%OSG_X64%;%PATH%" CACHE STRING "Environment Variables that VS should merge on thy fly with system environment to run osgVisual (VS Project settings)")
+	ENDIF ()
+
 
     # Only do this if one doesn't already exist
Index: /osgVisual/VC80.vcproj.user.template
===================================================================
--- /osgVisual/VC80.vcproj.user.template	(revision 50)
+++ /osgVisual/VC80.vcproj.user.template	(revision 51)
@@ -21,5 +21,5 @@
 				PDBPath=""
 				SQLDebugging=""
-				Environment=""
+				Environment="@USERFILE_ENVIRONMENT@"
 				EnvironmentMerge="true"
 				DebuggerFlavor="0"
@@ -49,5 +49,5 @@
 				PDBPath=""
 				SQLDebugging=""
-				Environment=""
+				Environment="@USERFILE_ENVIRONMENT@"
 				EnvironmentMerge="true"
 				DebuggerFlavor="0"
@@ -77,5 +77,5 @@
 				PDBPath=""
 				SQLDebugging=""
-				Environment=""
+				Environment="@USERFILE_ENVIRONMENT@"
 				EnvironmentMerge="true"
 				DebuggerFlavor=""
@@ -105,5 +105,5 @@
 				PDBPath=""
 				SQLDebugging=""
-				Environment=""
+				Environment="@USERFILE_ENVIRONMENT@"
 				EnvironmentMerge="true"
 				DebuggerFlavor=""
Index: /osgVisual/VC90.vcproj.user.template
===================================================================
--- /osgVisual/VC90.vcproj.user.template	(revision 50)
+++ /osgVisual/VC90.vcproj.user.template	(revision 51)
@@ -21,5 +21,5 @@
 				PDBPath=""
 				SQLDebugging=""
-				Environment=""
+				Environment="@USERFILE_ENVIRONMENT@"
 				EnvironmentMerge="true"
 				DebuggerFlavor="0"
@@ -49,5 +49,5 @@
 				PDBPath=""
 				SQLDebugging=""
-				Environment=""
+				Environment="@USERFILE_ENVIRONMENT@"
 				EnvironmentMerge="true"
 				DebuggerFlavor="0"
@@ -77,5 +77,5 @@
 				PDBPath=""
 				SQLDebugging=""
-				Environment=""
+				Environment="@USERFILE_ENVIRONMENT@"
 				EnvironmentMerge="true"
 				DebuggerFlavor=""
@@ -105,5 +105,5 @@
 				PDBPath=""
 				SQLDebugging=""
-				Environment=""
+				Environment="@USERFILE_ENVIRONMENT@"
 				EnvironmentMerge="true"
 				DebuggerFlavor=""
