Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CMake docs. #2

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Home.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ If you're looking for an older release see the [Torque 3D Archive](wiki/Torque-3

### Working On Your Project
* [Using the Project Manager](wiki/Project-Manager)
* [Using CMake for build project](wiki/Use_CMake_project_generator)
* [Creating a New Project Based on a Template](wiki/Creating-a-New-Project-Based-on-a-Template)
* [Compiling Torque 3D on Windows](wiki/Compiling-Torque-3D-on-Windows)
* [Compiling Torque 3D on Linux](wiki/Compiling-Torque-3D-on-Linux)
Expand Down
50 changes: 50 additions & 0 deletions Use_CMake_project_generator.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
CMake project generator
-----------------------------

* Start CMake(cmake-gui)

![](images/CmakeDocs/cmake-gui_windows_start.png)


* `ProjectName` will be used later, and you have to choose one to use the same in the following steps. For example: `TestProject`
* Set `Where is the source code`: Full path to Torque3D root directory. For example `G:\Torque3D`

![](images/CmakeDocs/t3d_root_dir.png)

* Set `Where to build de binaries`: Full path to Torque3D to build CMake cache and MSVC solution files. `Torque root path` + `/My Projects/` + `ProjectName` + `/buildFiles/CMake`
For example: `G:/Torque3D/My Projects/TestProject/buildFiles/CMake`

![](images/CmakeDocs/cmake_windows_configure_paths_example.png)

* Click on `Configure` button

![](images/CmakeDocs/cmake_windows_configure_generator.png)

* Select generator for solution files and click finish.
* We will see this error message. Is normal, we have to set the name of the project.

![](images/CmakeDocs/cmake_windows_configure_first_error.png)

* Set 'TORQUE_APP_NAME' to your `ProjectName`. For example: `TestProject`

![](images/CmakeDocs/cmake_windows_configure_set_app_name.png)

* Click on `Configure` button. Red are new configuration variables.

![](images/CmakeDocs/cmake_windows_configure_first_ok.png)

* Change `TORQUE_TEMPLATE` if you want to use Empty or other template
* On Linux you need to select `TORQUE_BUILD_TYPE`(Debug, Release or RelWithDebugInfo)
* Click on `Configure` button.

![](images/CmakeDocs/cmake_windows_configure_end.png)

* Click on `Generate` button.
* Go to `Where to build de binaries` dir for find generated files. For example: `G:\Torque3D\My Projects\TestProject\buildFiles\CMake`

![](images/CmakeDocs/cmake_windows_solution_files.png)

* Build Torque3D with generated files.
* Build `INSTALL` project/target first and ONLY ONE. `INSTALL` project build all projects and then copy template files on your game directory.
* For future builds use `ALL_BUILD`.
* That's all :D
Binary file added images/CmakeDocs/cmake-gui_windows_start.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/CmakeDocs/cmake_windows_configure_end.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/CmakeDocs/cmake_windows_solution_files.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/CmakeDocs/t3d_root_dir.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.