Example of Multi-Platform Base Project with CMake Topic is solved

Problems building or running the engine, queries about how to use features etc.
Post Reply
User avatar
Cyberix3D
Gnoblar
Posts: 23
Joined: Tue Jan 17, 2023 10:25 pm
x 4
Contact:

Example of Multi-Platform Base Project with CMake

Post by Cyberix3D »

Hello,

I am currently working on a project that requires support for Windows, Android, and Emscripten, and I am using CMake as my build system.
I was wondering if anyone in the community has an example of a multi-platform base project that I could use as a starting point for my project, specifically using CMake as the build system.

If you have any experience with this type of setup, I would greatly appreciate any tips or examples you could provide.

Thanks in advance!

User avatar
sercero
Bronze Sponsor
Bronze Sponsor
Posts: 449
Joined: Sun Jan 18, 2015 4:20 pm
Location: Buenos Aires, Argentina
x 156

Re: Example of Multi-Platform Base Project with CMake

Post by sercero »

User avatar
Cyberix3D
Gnoblar
Posts: 23
Joined: Tue Jan 17, 2023 10:25 pm
x 4
Contact:

Re: Example of Multi-Platform Base Project with CMake

Post by Cyberix3D »

Thank you for your response.
I am interested in using OgreBites as a starting point for my project, but I am not sure how to go about building a separate application from it.
Is it as simple as taking the files and placing them in a new project, or are there additional configurations and files that I need to add?
Any additional information or guidance you can provide would be greatly appreciated.
Thank you in advance.

User avatar
sercero
Bronze Sponsor
Bronze Sponsor
Posts: 449
Joined: Sun Jan 18, 2015 4:20 pm
Location: Buenos Aires, Argentina
x 156

Re: Example of Multi-Platform Base Project with CMake

Post by sercero »

Here is the documentation for creating a new project using OGREBites among other components.
https://ogrecave.github.io/ogre/api/13/setup.html

I think that when you use OGREBites your app uses SDL2 for input and window creation.

I have a skeleton app base that I use for my projects but it was developed before @paroj created Bites and it uses OIS for input and OGRE internal windowing system, you are better off using OGREBites.

User avatar
Cyberix3D
Gnoblar
Posts: 23
Joined: Tue Jan 17, 2023 10:25 pm
x 4
Contact:

Re: Example of Multi-Platform Base Project with CMake

Post by Cyberix3D »

Thank you for the information. I'll take a look at the documentation.

Ryan8
Gnoblar
Posts: 17
Joined: Wed Jul 27, 2022 2:38 am
x 2

Re: Example of Multi-Platform Base Project with CMake

Post by Ryan8 »

In addition to OgreBites, there's also the EmptyProject from Ogre-Next/2.3. This uses CMake and is multiplatform.

paroj
OGRE Team Member
OGRE Team Member
Posts: 1994
Joined: Sun Mar 30, 2014 2:51 pm
x 1074
Contact:

Re: Example of Multi-Platform Base Project with CMake

Post by paroj »

while Bites is the code that enables multi-platform usability, the CMake ugliness that actually creates cross-platform packages can be found in the SampleBrowser:
https://github.com/OGRECave/ogre/blob/s ... eLists.txt

that code builds everything but Emscripten

User avatar
Cyberix3D
Gnoblar
Posts: 23
Joined: Tue Jan 17, 2023 10:25 pm
x 4
Contact:

Re: Example of Multi-Platform Base Project with CMake

Post by Cyberix3D »

Thank you for your assistance.
I will look into the examples you provided and see how I can incorporate them into my project.
I have already started constructing a CMakeLists.txt and I believe these examples will be very helpful in my efforts.

Post Reply