Przeglądaj źródła

Differentiate between batch option with CMake build option to prevent CMake warning on unused define. Reorder the position of optional CMake options according CMake usage documentation. Highlight the out-of-source build in change history.

Wei Tjong Yao 12 lat temu
rodzic
commit
363a4055ea
11 zmienionych plików z 15 dodań i 12 usunięć
  1. 1 1
      Docs/Urho3D.dox
  2. 1 0
      Readme.txt
  3. 1 1
      cmake_android.bat
  4. 3 3
      cmake_gcc.sh
  5. 2 0
      cmake_ios.sh
  6. 1 1
      cmake_macosx.sh
  7. 1 1
      cmake_mingw.bat
  8. 2 2
      cmake_vs2008.bat
  9. 1 1
      cmake_vs2010.bat
  10. 1 1
      cmake_vs2012.bat
  11. 1 1
      cmake_vs2013.bat

+ 1 - 1
Docs/Urho3D.dox

@@ -141,7 +141,7 @@ V1.3
 - Raspberry Pi support.
 - 64-bit build support.
 - HTTP client using the Civetweb library.
-- Enhanced CMake build scripts. Android build also uses CMake.
+- Enhanced CMake build scripts. Android build also uses CMake. Use out-of-source build on platform that supports it.
 - Rendering performance optimizations, optional %StaticModelGroup component for culling and lighting several objects as one unit.
 - A set of sample applications implemented in C++, AngelScript and Lua.
 - Automatic node/component handle member variable serialization for AngelScript script objects.

+ 1 - 0
Readme.txt

@@ -391,6 +391,7 @@ V1.3    - Lua scripting support.
         - 64-bit build support.
         - HTTP client using the Civetweb library.
         - Enhanced CMake build scripts. Android build also uses CMake.
+          Use out-of-source build on platform that supports it.
         - Rendering performance optimizations, optional StaticModelGroup
           component for culling and lighting several objects as one unit.
         - A set of sample applications implemented in C++, AngelScript and Lua.

+ 1 - 1
cmake_android.bat

@@ -48,4 +48,4 @@ if "%use_mklink%" == "1" (
 )
 cmake -E copy_if_different Docs\Doxyfile.in Doxyfile
 echo on
-cmake -E chdir %build% cmake -G "Unix Makefiles" -DANDROID=1 -DCMAKE_TOOLCHAIN_FILE=%source%\CMake\Toolchains\android.toolchain.cmake -DLIBRARY_OUTPUT_PATH_ROOT=. %source% %*
+cmake -E chdir %build% cmake -G "Unix Makefiles" -DANDROID=1 -DCMAKE_TOOLCHAIN_FILE=%source%\CMake\Toolchains\android.toolchain.cmake -DLIBRARY_OUTPUT_PATH_ROOT=.  %* %source%

+ 3 - 3
cmake_gcc.sh

@@ -120,9 +120,9 @@ GENERATOR="Unix Makefiles"
 
 # Create project with the respective Cmake generators
 OPT=
-msg "Native build" && cmake -E chdir Build cmake $OPT -G $GENERATOR $PLATFORM $SOURCE $@ && post_cmake Build
-[ $RASPI_TOOL ] && msg "Raspberry Pi build" && cmake -E chdir raspi-Build cmake $OPT -G $GENERATOR -DRASPI=1 -DCMAKE_TOOLCHAIN_FILE=$SOURCE/CMake/Toolchains/raspberrypi.toolchain.cmake $SOURCE $@ && post_cmake raspi-Build
-[ $ANDROID_NDK ] && msg "Android build" && cmake -E chdir android-Build cmake $OPT -G $GENERATOR -DANDROID=1 -DCMAKE_TOOLCHAIN_FILE=$SOURCE/CMake/Toolchains/android.toolchain.cmake -DLIBRARY_OUTPUT_PATH_ROOT=. $SOURCE $@ && post_cmake android-Build
+msg "Native build" && cmake -E chdir Build cmake $OPT -G $GENERATOR $PLATFORM $@ $SOURCE && post_cmake Build
+[ $RASPI_TOOL ] && msg "Raspberry Pi build" && cmake -E chdir raspi-Build cmake $OPT -G $GENERATOR -DRASPI=1 -DCMAKE_TOOLCHAIN_FILE=$SOURCE/CMake/Toolchains/raspberrypi.toolchain.cmake $@ $SOURCE && post_cmake raspi-Build
+[ $ANDROID_NDK ] && msg "Android build" && cmake -E chdir android-Build cmake $OPT -G $GENERATOR -DANDROID=1 -DCMAKE_TOOLCHAIN_FILE=$SOURCE/CMake/Toolchains/android.toolchain.cmake -DLIBRARY_OUTPUT_PATH_ROOT=. $@ $SOURCE && post_cmake android-Build
 unset IFS
 
 # Assume GCC user uses OpenGL, comment out below sed if this is not true

+ 2 - 0
cmake_ios.sh

@@ -21,3 +21,5 @@
 #
 
 $( dirname $0 )/cmake_macosx.sh -DIOS=1 $@
+
+# vi: set ts=4 sw=4 expandtab:

+ 1 - 1
cmake_macosx.sh

@@ -33,7 +33,7 @@ rm -rf Build/CMakeCache.txt Build/CMakeFiles
 rm -rf {../build,.,build}/CMakeCache.txt {../build,.,build}/CMakeFiles
 
 # Create project with the Xcode generator
-cmake -E chdir Build cmake -G "Xcode" $SOURCE $@
+cmake -E chdir Build cmake -G "Xcode" $@ $SOURCE
 
 # Below temporary fix may no longer be required by newer version of CMake
 sed -i.bak 's/lastKnownFileType = sourcecode; name = "as_callfunc_arm_xcode.S"/lastKnownFileType = sourcecode.asm; name = "as_callfunc_arm_xcode.S"/g' Build/*.xcodeproj/project.pbxproj

+ 1 - 1
cmake_mingw.bat

@@ -30,4 +30,4 @@ if exist Build\CMakeFiles. rd /S /Q Build\CMakeFiles
 if exist Source\CMakeFiles. rd /S /Q Source\CMakeFiles
 cmake -E copy_if_different Docs\Doxyfile.in Doxyfile
 echo on
-cmake -E chdir Build cmake -G "MinGW Makefiles" ..\Source %*
+cmake -E chdir Build cmake -G "MinGW Makefiles" %* ..\Source

+ 2 - 2
cmake_vs2008.bat

@@ -33,11 +33,11 @@ set "version=9 2008"
 :loop
 if not "%1" == "" (
     if "%1" == "-DENABLE_64BIT" if "%~2" == "1" set "arch= Win64"
-    if "%1" == "-DVERSION" set "version=%~2"
+    if "%1" == "VERSION" set "version=%~2"
     shift
     shift
     goto loop
 )
 cmake -E copy_if_different Docs\Doxyfile.in Doxyfile
 echo on
-cmake -E chdir Build cmake -G "Visual Studio %version%%arch%" ..\Source %*
+cmake -E chdir Build cmake -G "Visual Studio %version%%arch%" %* ..\Source

+ 1 - 1
cmake_vs2010.bat

@@ -20,4 +20,4 @@
 :: THE SOFTWARE.
 ::
 
-@cmake_vs2008.bat -DVERSION=10 %*
+@cmake_vs2008.bat VERSION=10 %*

+ 1 - 1
cmake_vs2012.bat

@@ -20,4 +20,4 @@
 :: THE SOFTWARE.
 ::
 
-@cmake_vs2008.bat -DVERSION=11 %*
+@cmake_vs2008.bat VERSION=11 %*

+ 1 - 1
cmake_vs2013.bat

@@ -20,4 +20,4 @@
 :: THE SOFTWARE.
 ::
 
-@cmake_vs2008.bat -DVERSION=12 %*
+@cmake_vs2008.bat VERSION=12 %*