SuperWangKai / Urho3DCMakeTest

Testing CMake for Urho3D

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Project for CMake testing in Urho3D

1 Build on Windows

1.1 Prepare projects

  • Clone official Urho3D project under the same parent directory. You should see Urho3DCMakeTest and Urho3D are in the same folder.

folder stucture

1.2 Build Urho3D project

  • In the Urho3D directory, generate Visual Studio solution of Urho3D with command line like script\cmake_vs2019.bat BUILD_vs2019 -DURHO3D_64BIT=1 -DURHO3D_LUA=0 -DURHO3D_D3D11=1.
  • Open generated Visual Studio solution in BUILD_vs2019 and build Urho3D.

1.3 Build Urho3DCMakeTest project

  • Set URHO3D_HOME environment variable to the path of folder BUILD_vs2019 of Urho3D
  • mkdir BUILD_vs2019 inside Urho3DCMakeTest.
  • Generate the project with CMake using commandline like cd BUILD_vs2019 and cmake ..
  • Now you can see the Visual Studio solution is in BUILD_vs2019. You can build it with Visual Studio and run the sample.

2 Cross compiling Android app on Windows

Just like Urho3D, Gradle is used to build android application. Everything android related is put into android directory. Android SDK, Anroid NDK, MinGW and stuff are needed as dependencies on Windows.

  • Open cmd and cd android folder.
  • Executing gradlew.bat build or gradlew.bat build --parallel will build APK for you.
  • Known issue - Data, CoreData etc. folders should be copied manually to launcher-app/src/main/assets directory.
  • If everything is correct, APKs can be found at android/launcher-app/build/outputs/apk/

About

Testing CMake for Urho3D


Languages

Language:AngelScript 55.1%Language:Lua 20.6%Language:CMake 9.6%Language:HLSL 6.6%Language:GLSL 5.7%Language:C++ 1.1%Language:Kotlin 0.6%Language:HTML 0.4%Language:Batchfile 0.1%Language:Shell 0.0%