Browse Source

Enhanced cmake shell scripts to accept extra options from command line. Added documentation on how to enable 64bit for GCC build.

Wei Tjong Yao 12 years ago
parent
commit
b11cd0c11f
5 changed files with 14 additions and 6 deletions
  1. 2 0
      Docs/GettingStarted.dox
  2. 7 1
      Readme.txt
  3. 3 3
      cmake_eclipse.sh
  4. 1 1
      cmake_gcc.sh
  5. 1 1
      cmake_macosx.sh

+ 2 - 0
Docs/GettingStarted.dox

@@ -43,6 +43,8 @@ For Eclipse on Linux, import the Eclipse's project(s) generated by CMake into th
 For GCC, execute make (by default, cmake_gcc.sh specifies to make a RelWithDebInfo build).\n
 For Xcode on Mac OS X, open Urho3D.xcodeproj and build.
 
+Currently CMake build configuration has been set to compile Urho3D as 32bit by default for non-MSVC/non-Windows platform. To enable 64bit build, pass the option "-DENABLE_64BIT=1" explicitly when invoking cmake_eclipse.sh/cmake_macosx.sh/cmake_gcc.sh. Alternatively, you can modify the main CMakeLists.txt to enable 64bit by default for non-MSVC/non-Windows platform.
+
 After the build is complete, the programs can be run from the Bin directory.
 
 To run from the Visual Studio debugger, set the Urho3D project as the startup project and enter its relative path and filename into Properties -> Debugging -> Command: ..\\Bin\\Urho3D.exe. Additionally, entering -w into Debugging -> Command Arguments is highly recommended. This enables startup in windowed mode: without it running into an exception or breakpoint will be obnoxious as the mouse cursor will likely be hidden. To actually make Urho3D.exe do something useful, it must be supplied with the name of the script file it should load and run. You can try for example the following arguments: `Scripts/NinjaSnowWar.as -w`. To make the Urho3D examples start faster on Windows & Direct3D9 mode, run CompileAllShaders.bat from the Bin directory first.

+ 7 - 1
Readme.txt

@@ -166,6 +166,12 @@ RelWithDebInfo build).
 
 For Xcode on Mac OS X, open Urho3D.xcodeproj and build.
 
+Currently CMake build configuration has been set to compile Urho3D as 32bit by
+default for non-MSVC/non-Windows platform. To enable 64bit build, pass the
+option "-DENABLE_64BIT=1" explicitly when invoking cmake_eclipse.sh/
+cmake_macosx.sh/cmake_gcc.sh. Alternatively, you can modify the main CMakeLists.txt
+to enable 64bit by default for non-MSVC/non-Windows platform.
+
 After the build is complete, the programs can be run from the Bin directory.
 
 To run from the Visual Studio debugger, set the Urho3D project as the startup
@@ -334,4 +340,4 @@ V1.1    - Object and scene model refactoring.
         - Added OpenGL and cross-platform support.
         - Switched to kNet library for networking.
 
-V1.0    - Original release.
+V1.0    - Original release.

+ 3 - 3
cmake_eclipse.sh

@@ -1,9 +1,9 @@
 rm -f CMakeCache.txt
 proj=`pwd`
 mkdir -p ../Urho3D-Eclipse-build/Release ../Urho3D-Eclipse-build/Debug ../Urho3D-Eclipse-build/RelWithDebInfo
-cmake -E chdir ../Urho3D-Eclipse-build/Release cmake -G"Eclipse CDT4 - Unix Makefiles" -DCMAKE_BUILD_TYPE=Release $proj
-cmake -E chdir ../Urho3D-Eclipse-build/Debug cmake -G"Eclipse CDT4 - Unix Makefiles" -DCMAKE_BUILD_TYPE=Debug $proj
-cmake -E chdir ../Urho3D-Eclipse-build/RelWithDebInfo cmake -G"Eclipse CDT4 - Unix Makefiles" -DCMAKE_BUILD_TYPE=RelWithDebInfo $proj
+cmake -E chdir ../Urho3D-Eclipse-build/Release cmake -G"Eclipse CDT4 - Unix Makefiles" -DCMAKE_BUILD_TYPE=Release $proj $@
+cmake -E chdir ../Urho3D-Eclipse-build/Debug cmake -G"Eclipse CDT4 - Unix Makefiles" -DCMAKE_BUILD_TYPE=Debug $proj $@
+cmake -E chdir ../Urho3D-Eclipse-build/RelWithDebInfo cmake -G"Eclipse CDT4 - Unix Makefiles" -DCMAKE_BUILD_TYPE=RelWithDebInfo $proj $@
 sed -i.bak 's/OpenGL/Direct3D9/g' Doxyfile
 #
 # Create symbolic links in the respective Eclipse configuration subdir to allow running Urho3D within the Eclipse itself

+ 1 - 1
cmake_gcc.sh

@@ -1,3 +1,3 @@
 rm -f CMakeCache.txt
-cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=RelWithDebInfo
+cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=RelWithDebInfo $@
 sed -i.bak 's/OpenGL/Direct3D9/g' Doxyfile

+ 1 - 1
cmake_macosx.sh

@@ -1,5 +1,5 @@
 rm -f CMakeCache.txt
-cmake -G "Xcode" 
+cmake -G "Xcode" $@
 sed -i.bak 's/lastKnownFileType = sourcecode; name = "as_callfunc_arm_xcode.S"/lastKnownFileType = sourcecode.asm; name = "as_callfunc_arm_xcode.S"/g' Urho3D.xcodeproj/project.pbxproj
 sed -i.bak 's/OpenGL/Direct3D9/g' Doxyfile
 #