Browse Source

Reversed the parameter handling logic in cmake_xxxx.bat and to make it consistent with their shell script counterpart. Updated the documentation accordingly. Reverted back main CMakeLists.txt.

Wei Tjong Yao 12 years ago
parent
commit
0a712e2e6a
7 changed files with 21 additions and 42 deletions
  1. 2 2
      CMakeLists.txt
  2. 1 3
      Docs/GettingStarted.dox
  3. 4 8
      Readme.txt
  4. 2 2
      cmake_android.bat
  5. 4 9
      cmake_vs2008.bat
  6. 4 9
      cmake_vs2010.bat
  7. 4 9
      cmake_vs2012.bat

+ 2 - 2
CMakeLists.txt

@@ -278,7 +278,7 @@ add_subdirectory (ThirdParty/STB)
 add_subdirectory (ThirdParty/JO)
 add_subdirectory (ThirdParty/JO)
 
 
 # Alternative Lua bindings. Uncomment the following line to enable
 # Alternative Lua bindings. Uncomment the following line to enable
-set (ENABLE_LUA 1)
+# set (ENABLE_LUA 1)
 if (ENABLE_LUA)
 if (ENABLE_LUA)
     add_definitions (-DENABLE_LUA)
     add_definitions (-DENABLE_LUA)
     add_subdirectory (ThirdParty/Lua)
     add_subdirectory (ThirdParty/Lua)
@@ -309,7 +309,7 @@ if (NOT USE_OPENGL)
 endif ()
 endif ()
 
 
 # Urho3D extras. Uncomment to enable
 # Urho3D extras. Uncomment to enable
-set (ENABLE_EXTRAS 1)
+# set (ENABLE_EXTRAS 1)
 if (ENABLE_EXTRAS)
 if (ENABLE_EXTRAS)
     add_subdirectory (Extras/OgreBatchConverter)
     add_subdirectory (Extras/OgreBatchConverter)
     add_subdirectory (Extras/CharacterDemo)
     add_subdirectory (Extras/CharacterDemo)

+ 1 - 3
Docs/GettingStarted.dox

@@ -85,9 +85,7 @@ To run from Xcode on iPhone/iPad Simulator, edit the Product Scheme to set "Run"
 
 
 \section Building_64bit Desktop 64bit build
 \section Building_64bit Desktop 64bit build
 
 
-Currently CMake build configuration has been set to compile Urho3D as 32bit by default. To enable 64bit build for Visual Studio, run one of the cmake_vs20xx.bat by passing the option "ENABLE_64BIT" explicitly. This overrides CMake to use a 64bit solution generator.
-
-To enable 64bit build for non-MSVC/non-Windows platform, 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.
+Currently CMake build configuration has been set to compile Urho3D as 32bit by default. To enable 64bit build, run the provided cmake_xxxx.bat or cmake_xxxx.sh by passing the option "-DENABLE_64BIT=1" explicitly. For Visual Studio on Windows platform, this option also overrides CMake to use a 64bit solution generator. Alternatively, you can modify the main CMakeLists.txt to enable 64bit by default.
 
 
 \section Building_Shaders Compiling Direct3D shaders
 \section Building_Shaders Compiling Direct3D shaders
 
 

+ 4 - 8
Readme.txt

@@ -254,14 +254,10 @@ Desktop 64bit build
 -------------------
 -------------------
 
 
 Currently CMake build configuration has been set to compile Urho3D as 32bit by
 Currently CMake build configuration has been set to compile Urho3D as 32bit by
-default. To enable 64bit build for Visual Studio, run one of the cmake_vs20xx.bat
-by passing the option "ENABLE_64BIT" explicitly. This overrides CMake to use a 64bit
-solution generator.
-
-To enable 64bit build for non-MSVC/non-Windows platform, 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.
+default. To enable 64bit build, run the provided cmake_xxxx.bat or cmake_xxxx.sh
+by passing the option "-DENABLE_64BIT=1" explicitly. For Visual Studio on Windows
+platform, this option also overrides CMake to use a 64bit solution generator.
+Alternatively, you can modify the main CMakeLists.txt to enable 64bit by default.
 
 
 
 
 Compiling Direct3D shaders
 Compiling Direct3D shaders

+ 2 - 2
cmake_android.bat

@@ -1,2 +1,2 @@
-@del /F CMakeCache.txt
-cmake -G "Unix Makefiles" -DANDROID=1 -DCMAKE_TOOLCHAIN_FILE=Android/android.toolchain.cmake -DLIBRARY_OUTPUT_PATH_ROOT=Android  -DCMAKE_BUILD_TYPE=Release %*
+@del /F CMakeCache.txt
+cmake -G "Unix Makefiles" -DANDROID=1 -DCMAKE_TOOLCHAIN_FILE=Android/android.toolchain.cmake -DLIBRARY_OUTPUT_PATH_ROOT=Android -DCMAKE_BUILD_TYPE=Release %*

+ 4 - 9
cmake_vs2008.bat

@@ -1,9 +1,4 @@
-@del /F CMakeCache.txt
-@if /I "%1" == "ENABLE_64BIT" (set "arch= Win64") else (set "arch=")
-@set "DEFINE="
-@for %%n in (%*) do @call :concat %%n
-cmake -G "Visual Studio 9 2008%arch%" %DEFINE%
-@goto :eof
-:concat
-@set "DEFINE=%DEFINE% -D%1=1"
-@goto :eof
+@del /F CMakeCache.txt
+@set "arch="
+@for %%n in (%*) do @if "%%n" == "-DENABLE_64BIT" (set "arch= Win64")
+cmake -G "Visual Studio 9 2008%arch%" %*

+ 4 - 9
cmake_vs2010.bat

@@ -1,9 +1,4 @@
-@del /F CMakeCache.txt
-@if /I "%1" == "ENABLE_64BIT" (set "arch= Win64") else (set "arch=")
-@set "DEFINE="
-@for %%n in (%*) do @call :concat %%n
-cmake -G "Visual Studio 10%arch%" %DEFINE%
-@goto :eof
-:concat
-@set "DEFINE=%DEFINE% -D%1=1"
-@goto :eof
+@del /F CMakeCache.txt
+@set "arch="
+@for %%n in (%*) do @if "%%n" == "-DENABLE_64BIT" (set "arch= Win64")
+cmake -G "Visual Studio 10%arch%" %*

+ 4 - 9
cmake_vs2012.bat

@@ -1,9 +1,4 @@
-@del /F CMakeCache.txt
-@if /I "%1" == "ENABLE_64BIT" (set "arch= Win64") else (set "arch=")
-@set "DEFINE="
-@for %%n in (%*) do @call :concat %%n
-cmake -G "Visual Studio 11%arch%" %DEFINE%
-@goto :eof
-:concat
-@set "DEFINE=%DEFINE% -D%1=1"
-@goto :eof
+@del /F CMakeCache.txt
+@set "arch="
+@for %%n in (%*) do @if "%%n" == "-DENABLE_64BIT" (set "arch= Win64")
+cmake -G "Visual Studio 11%arch%" %*