Horde3D

Next-Generation Graphics Engine
It is currently 22.12.2024, 08:00

All times are UTC + 1 hour




Post new topic Reply to topic  [ 6 posts ] 
Author Message
PostPosted: 20.08.2012, 20:12 
Offline

Joined: 20.08.2012, 19:35
Posts: 3
Hello everyone,

This is my first post after some days reading around, I'm just starting out with C++ and I'd like to create an application using Horde3D which can be compiled on Windows/OSX with the same codebase (or with minimum efforts).

Ideally, in the world of Python or PHP, I would create a project folder with some files and import some external libraries. All the application specific content, pipelines, compiled binaries etc. should be stored together in the project folder.
If possible I'd prefer to use plain text editors instead of large IDEs, but then how should I proceed to compile the projects on the different platforms?
Or, is there a way to share the IDE project files/solutions across the platforms? (Like Eclipse CDT, Codeblocks etc...)

Any help is highly appreciated, thank you! :)


Top
 Profile  
Reply with quote  
PostPosted: 20.08.2012, 21:58 
Offline
Tool Developer

Joined: 13.11.2007, 11:07
Posts: 1150
Location: Germany
Why not do it like in the samples?

Use CMake for the project and GLFW for the OpenGL context initialization. Horde3D is already cross plattform compatible.


Top
 Profile  
Reply with quote  
PostPosted: 21.08.2012, 10:17 
Offline

Joined: 20.08.2012, 19:35
Posts: 3
Sorry if that may sound stupid but I'm not yet comfortable with C++ and Horde3D.

If I understand correctly, the workflow should be:

- Create my cpp/h files in some directory
- Create the CMakeLists file
- Run cmake on Windows/OSX to generate the VisualStudio/Xcode project files to compile

How can I reference the Horde3D path to include it in my files? Would a symlink work?
Is there a way to create the CMakeLists files dynamically?


Thanks for your patience


Top
 Profile  
Reply with quote  
PostPosted: 21.08.2012, 21:31 
Offline
Tool Developer

Joined: 13.11.2007, 11:07
Posts: 1150
Location: Germany
The way you described it should be working. The samples are doing just the same. You could reference only the binaries of the Horde3D libraries in your project without having to add the source code to your CMake project as it is done in the samples. But you can do it if you want.

If you're not familiar with the general workflow of CMake, C++ and Horde3D I guess it would be the best, if you copy one of the samples (maybe the knight sample) rename it, and add it to the CMake project of Horde3D. This way you should be able to start your own project in only a few simple steps.


Regarding the dynamic creation of CMakeList files I'm not aware of any tool. There is a CMake GUI but as I've never used it myself, I can't tell you what it is good for.


Top
 Profile  
Reply with quote  
PostPosted: 22.08.2012, 01:45 
Offline

Joined: 15.09.2010, 18:31
Posts: 53
Volker wrote:
Regarding the dynamic creation of CMakeList files I'm not aware of any tool. There is a CMake GUI but as I've never used it myself, I can't tell you what it is good for.

CMake GUI is only an visual alternative to 'cmake' command for building prepared CMake project.

My CMakeLists.txt was looking for source files in directories i wanted, and then after short regexp i had my source list inside a variable ready. It's just a couple lines of script.
It's not a 'right' solution though, because CMake is expecting you to change your CMakeLists.txt when new sources are added. It's using this information to regenerate all its scripts and 'cache', so you would have to regenerate the cache manually. You could add this as your IDEs prebuild command, but this would slow down your building times.

As for more complete IDE support i don't know any but you might check if kdevelop, or qt creator has some.

CMakeLists.txt generation isn't widely supported, because generally people don't do that. You're not spending that much time by preparing this kind of script, and none automatic generator can be as flexible as your custom script.


Top
 Profile  
Reply with quote  
PostPosted: 22.08.2012, 10:54 
Offline

Joined: 20.08.2012, 19:35
Posts: 3
Thank you for the clarifications, I'll try doing some tests!


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 13 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group