Horde3D

Next-Generation Graphics Engine
It is currently 28.04.2024, 06:38

All times are UTC + 1 hour




Post new topic Reply to topic  [ 59 posts ]  Go to page Previous  1, 2, 3, 4  Next

Prefered Build System for Horde3D
Poll ended at 14.05.2008, 20:06
CMake 57%  57%  [ 4 ]
waf 14%  14%  [ 1 ]
Other 29%  29%  [ 2 ]
Total votes : 7
Author Message
PostPosted: 01.05.2008, 14:25 
Offline

Joined: 14.04.2008, 15:06
Posts: 183
Location: Germany
Ok... I'm convinced that for non-command line users waf is not that good an idea.

The problem with the new version applies equally to cmake: At the moment there is 2.4 and 2.6 is in beta stage.
Regarding premake: I find it a bit strange that some major linux distributions don't include it.
But on the other hand the scripting language of cmake, especially regarding "if" and undefined variables is really strange.


I have attached a proof of concept cmake build environment for cmake 2.4. Tested only on Linux. Probably there will be linker errors.
cmake does not like spaces in file names, so I had to remove these spaces: Horde3D Engine, Horde3D Utils, Collada Converter.
Now unzip cmake-r?.zip inside the trunk folder which contains the directories Extensions and Horde3D. To prevent messing up the source directories create a new directory called "build". Go into that directory and call cmake: "cmake .." (maybe with your target specification if the default is wrong for you).
I have enabled the terrain extension by default in my cmake configuration. So uncomment the lines inside egExtension.cpp, remove the pragma and change the include path to "Extensions/Terrain/Source/extension.h".
I'm still thinking about a way to generate egExtensions.cpp automatically.


Attachments:
File comment: Proof of concept cmake build files
cmake-r1.zip [3.86 KiB]
Downloaded 556 times
Top
 Profile  
Reply with quote  
PostPosted: 03.05.2008, 13:09 
Offline

Joined: 08.11.2006, 03:10
Posts: 384
Location: Australia
I always prefer compiling from within an IDE (MSVS and CodeBlocks), so what I would like in a build system is for it to output IDE-workspace files (not to actually build the project)...

I think this approach is much better as it supports IDE compilation (outputting of workspaces) and cmd-line compilation (outputting of files for other build systems, such as make...).


Top
 Profile  
Reply with quote  
PostPosted: 03.05.2008, 22:08 
Offline

Joined: 22.11.2007, 17:05
Posts: 707
Location: Boston, MA
DarkAngel wrote:
I always prefer compiling from within an IDE (MSVS and CodeBlocks), so what I would like in a build system is for it to output IDE-workspace files (not to actually build the project)...
Ja, this is pretty much what CMake does. It outputs visual studio (or XCode on the Mac) project files, or builds directly from the command line.

@CodePoet: Those files seem to work for me, though I haven't tested them extensively.

_________________
Tristam MacDonald - [swiftcoding]


Top
 Profile  
Reply with quote  
PostPosted: 04.05.2008, 17:30 
Offline

Joined: 14.04.2008, 15:06
Posts: 183
Location: Germany
@swiftcoder: That's good. On which platform / environment have you done your tests?

I made a bit of progress today regarding easy enabling / disabling of extensions. I want to do a few more tests, then I'll upload the updated cmake environment here.

How should we handle the glfw dependency? The included libglfw.a does not work on 64bit Linux systems but is (more or less) silently ignored when a compatible libglfw.a exists in the search paths. Remove it? Include glfw as a whole and compile it on demand using cmake?


Top
 Profile  
Reply with quote  
PostPosted: 04.05.2008, 22:34 
Offline

Joined: 22.11.2007, 17:05
Posts: 707
Location: Boston, MA
Codepoet wrote:
@swiftcoder: That's good. On which platform / environment have you done your tests?
Mac, command line - I will test with XCode as well once I get the chance.

Codepoet wrote:
How should we handle the glfw dependency? Remove it? Include glfw as a whole and compile it on demand using cmake?
I would be tempted to include the whole thing - otherwise we will have to put together a pile of binaries for different platforms/architectures.

_________________
Tristam MacDonald - [swiftcoding]


Top
 Profile  
Reply with quote  
PostPosted: 05.05.2008, 12:04 
Offline

Joined: 14.04.2008, 15:06
Posts: 183
Location: Germany
cmake-r2.patch.zip:
* easy enabling / disabling of extensions using ccmake
* includes complete glfw 2.6.0 distribution

Now in patch format:
Before applying you have to remove the spaces in the directory names of Horde3D/Source/...; a patch that does this would contain all the files there, so it's for now easier this way.
Patching:
patch -p1 --dry-run < cmake.patch
To really apply omit --dry-run.


Top
 Profile  
Reply with quote  
PostPosted: 16.05.2008, 18:03 
Offline

Joined: 14.04.2008, 15:06
Posts: 183
Location: Germany
Is there still interest in a new build system based on cmake? Has someone tested the current version under Windows with Visual Studio?


Top
 Profile  
Reply with quote  
PostPosted: 16.05.2008, 20:24 
Offline
Tool Developer

Joined: 13.11.2007, 11:07
Posts: 1150
Location: Germany
Yes of course. Unfortunately I hadn't time to look at your files yet. Sorry for that. I will test them on linux and windows, and if it'll work fine, I will integrate them in the SVN.


Top
 Profile  
Reply with quote  
PostPosted: 16.05.2008, 20:45 
Offline

Joined: 14.04.2008, 15:06
Posts: 183
Location: Germany
Volker: Take your time. It would be great to have this in the 1.0 release.


I'll add an install target in the next days. Any ideas where to put the files under Windows / Mac by default?


Top
 Profile  
Reply with quote  
PostPosted: 16.05.2008, 21:41 
Offline

Joined: 22.11.2007, 17:05
Posts: 707
Location: Boston, MA
Codepoet wrote:
I'll add an install target in the next days. Any ideas where to put the files under Windows / Mac by default?
I am going to have to tweak these a little bit for the Mac, hopefully in the next couple of days. Basically it has to build a 'framework bundle' (as opposed to a shared library) named 'Horde3D.framework', and it needs to be installed into '/Library/Frameworks/'.

I will post as soon as I have it tweaked.

_________________
Tristam MacDonald - [swiftcoding]


Top
 Profile  
Reply with quote  
PostPosted: 19.05.2008, 13:00 
Offline

Joined: 14.04.2008, 15:06
Posts: 183
Location: Germany
cmake build system now includes install target for linux platforms.
Horde3D.so --> lib
Horde3DUtils.so --> lib
C++ Bindings --> include/horde3d
An arbitrary prefix can be specified using ccmake.

cmake-r3.patch.zip

Instructions for applying: see above (cmake-r2.patch post)


Top
 Profile  
Reply with quote  
PostPosted: 19.05.2008, 17:24 
Offline

Joined: 26.03.2008, 02:58
Posts: 160
Hi codepoet, I just want to thank you for all the effort you have put into the CMake build system, i really appreciate it.

I Haven't had time to test it, but will do so next thursday. Keep up the good work.


Top
 Profile  
Reply with quote  
PostPosted: 19.05.2008, 18:23 
Offline

Joined: 18.05.2008, 17:47
Posts: 96
I'd like plain make file more but cmake is fine too.
there are other tools like scons, premake etc... more or less they are the same, so in my opinion cmake fits well
thanks :)


Top
 Profile  
Reply with quote  
PostPosted: 19.05.2008, 18:54 
Offline

Joined: 14.04.2008, 15:06
Posts: 183
Location: Germany
kal wrote:
I'd like plain make file more but cmake is fine too.
there are other tools like scons, premake etc... more or less they are the same, so in my opinion cmake fits well
thanks :)

You get plain make files under Linux by using cmake. The idea was to have a consistent and cross platform build system with optional IDE integration. cmake does that and was easy enough to implement so far.


Top
 Profile  
Reply with quote  
PostPosted: 21.05.2008, 14:39 
Offline
Tool Developer

Joined: 13.11.2007, 11:07
Posts: 1150
Location: Germany
Finally I started with testing your CMake patch. Unfortunately I didn't get GNU patch to integrate it correctly so I had to apply it manually.

So far I came across two problems. The first one was a missing
Code:
target_link_libraries(Horde3DUtils Horde3D)
in the CMakeFiles.txt of the Horde3D Utils configuration.

This was solved easily. The second problem does not make sense to me.
All the samples are linking against the correct version of glfw.lib. But for some reason I got linker errors to all glfw functions, that they can't be resolved.
e.g.
Code:
unresolved external symbol __imp__glfwGetTime@0 referenced in function "void __stdcall keyPressListener(int,int)" (?keyPressListener@@YGXHH@Z)

Does anyone know what may be the problem in this case? I guess it has something to do with the "Compile as C Code" settings for the glfw Library. But I coudn't solve it in a rush.

Compiler used was Visual Studio 2005 SP1


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 59 posts ]  Go to page Previous  1, 2, 3, 4  Next

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 14 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