Horde3D

Next-Generation Graphics Engine
It is currently 25.10.2020, 23:54

All times are UTC + 1 hour




Post new topic Reply to topic  [ 18 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Editor by CMake
PostPosted: 02.02.2012, 18:11 
Offline
Tool Developer

Joined: 13.11.2007, 11:07
Posts: 1149
Location: Germany
I just changed the old qmake makefile configuration of the editor to CMake that is already used for Horde3D. I only tested it under windows with Visual Studio 2005 and 2010. If there's someone who can test the new configuration under linux or mac os it would be very much appreciated. Although I would like only to read success messages, I would be pleased to have bug reports, too. :wink:


Top
 Profile  
Reply with quote  
 Post subject: Re: Editor by CMake
PostPosted: 02.02.2012, 20:52 
Offline

Joined: 15.09.2010, 18:31
Posts: 53
Quote:
CMake Error at CMakeLists.txt:14 (add_subdirectory):
The source directory

/home/shd/src/horde3d/trunk/Tools/Horde3DEditor/src/HordeSceneEditorCore

does not contain a CMakeLists.txt file.


-- Found Qt4: /usr/bin/qmake-qt4 (found version "4.8.0")
CMake Error at CMakeLists.txt:44 (SET_PROPERTY):
set_property could not find TARGET HordeSceneEditorCore. Perhaps it has
not yet been created

Didn't you forgot to commit Tools/Horde3DEditor/src/HordeSceneEditorCore/CMakeLists.txt ?


Top
 Profile  
Reply with quote  
 Post subject: Re: Editor by CMake
PostPosted: 02.02.2012, 22:48 
Offline
Tool Developer

Joined: 13.11.2007, 11:07
Posts: 1149
Location: Germany
Damn,... of course you're right. I just added it, and fixed some other problems with missing include directories I didn't have on my previous working copy because there were some old copies of the header files left.

But there was some error with VS2010 and Qt 4.8.0 (previously I tested it with Qt 4.7). I got unresolved assign operators of Qt classes like QString, QVariant, QImage and I think some others. Not sure if that's a problem of Qt, VS2010 or the editor itself. But since it builds fine with VS2005 and Qt 4.8 and VS2010 with Qt 4.7 I will postpone the work for another day.


Top
 Profile  
Reply with quote  
 Post subject: Re: Editor by CMake
PostPosted: 05.02.2012, 02:29 
Offline

Joined: 15.09.2010, 18:31
Posts: 53
Besides of i had to add -fPIC to my CXXFLAGS, and problem with lacking m_lod called in ColladaImporter.cpp it seems to work.
I don't really want to look myself how m_lod member should be defined, so everything after this stage us unknown for me, but compilation started, and configuration was proper up to ColladaImporter compilation.


Top
 Profile  
Reply with quote  
 Post subject: Re: Editor by CMake
PostPosted: 05.02.2012, 09:10 
Offline
Tool Developer

Joined: 13.11.2007, 11:07
Posts: 1149
Location: Germany
Thanks for the feedback. m_lod is defined in the ColladaImporter.ui. I added it yesterday. Maybe the ColladaImporter.ui was not updated by your make tool? What make system are you using? GNU make? Perhaps a make clean may fix the problem.

Regarding the -fpic flag. Where did you have to add it? To the HordeSceneEditorCore library? I thought fpic is only necessary for shared libraries, so the editor executable itself shouldn't need it, should it? Doesn't CMake add fpic to shared library projects itself?


Top
 Profile  
Reply with quote  
 Post subject: Re: Editor by CMake
PostPosted: 05.02.2012, 15:39 
Offline

Joined: 15.09.2010, 18:31
Posts: 53
as for -fPIC:
Linking CXX shared library libQTerrainNodeExtension.so
/usr/bin/ld: ../HordeSceneEditorCore/libHordeSceneEditorCore.a(MaterialComboBox.cpp.o): relocation R_X86_64_32S against `vtable for MaterialComboBox' can not be used when making a shared object; recompile with -fPIC

Tools/Horde3DEditor/src/HordeSceneEditor/GLWidget.cpp: GL/GLU.h should be GL/glu.h
Tools/Horde3DEditor/src/HordeSceneEditor/CMakeLists.txt: should contain "${CMAKE_CURRENT_SOURCE_DIR}"
I don't really know why sources have to be copied to Build (which would be nice to be 'build' since it's more convenient to type and standard name), but ui_HordeSceneEditor.h uses LuaController.h which isn't copied there.

As for 'proper' configuration, you should think about it yourself, but after applying three changes above, editor configured and compiled completely on my x86_64 Arch Linux.


Top
 Profile  
Reply with quote  
 Post subject: Re: Editor by CMake
PostPosted: 07.02.2012, 04:08 
Offline

Joined: 19.01.2012, 21:01
Posts: 55
I'm trying to get the editor to build in linux as well, but I'm not entirely familiar with cmake. Horde3d itself built fine but I have a few questions about building the editor:


First I checked out the beta5 compatible source:
Code:
svn co http://mm-werkstatt.informatik.uni-augsburg.de/public/Horde3D/trunk/Tools/Horde3DEditor/


In the wiki entry on building the editor, it mentioned having to create a sub directory for your build, so I made a build directory:
Code:
Hord3dEditor/build/

and ran
Code:
cmake -G"Unix Makefiles" ..

to build my makefile.

I could find a list of dependencies anywhere, and obviously I'm missing a few, but I'm also getting errors about not being able to find Horde3d:
Code:
CMake Error at CMakeLists.txt:22 (SET_PROPERTY):
  set_property could not find TARGET Horde3D.  Perhaps it has not yet been
  created.


CMake Error at CMakeLists.txt:23 (SET_PROPERTY):
  set_property could not find TARGET Horde3DUtils.  Perhaps it has not yet
  been created.


CMake Error at CMakeLists.txt:37 (SET_PROPERTY):
  set_property could not find TARGET Chicago.  Perhaps it has not yet been
  created.


CMake Error at CMakeLists.txt:38 (SET_PROPERTY):
  set_property could not find TARGET Knight.  Perhaps it has not yet been
  created.


CMake Error at CMakeLists.txt:39 (SET_PROPERTY):
  set_property could not find TARGET ColladaConv.  Perhaps it has not yet
  been created.


And I'm wondering what the proper method for telling the cmake file where I've built (and installed) Horde3d. Do I edit the CMakeLists.txt file somehow to point to my Horde binaries, or do I copy them into some sub folder under Horde3dEditor? I assumed cmake would look for them on the install path (/usr/local/lib, etc), but I must be mistaken.

I'm installing on Ubuntu 11.10 x64.


Top
 Profile  
Reply with quote  
 Post subject: Re: Editor by CMake
PostPosted: 07.02.2012, 09:40 
Offline
Tool Developer

Joined: 13.11.2007, 11:07
Posts: 1149
Location: Germany
shd wrote:
Tools/Horde3DEditor/src/HordeSceneEditor/CMakeLists.txt: should contain "${CMAKE_CURRENT_SOURCE_DIR}"
I don't really know why sources have to be copied to Build (which would be nice to be 'build' since it's more convenient to type and standard name), but ui_HordeSceneEditor.h uses LuaController.h which isn't copied there.

As for 'proper' configuration, you should think about it yourself, but after applying three changes above, editor configured and compiled completely on my x86_64 Arch Linux.

This was not intended, the ui_ files were previously created within the source directory. But CMake has the philosophy of making out of tree builds, which I think is something good in general. So there seem to be some old ui_ header files in your source directory, that should be deleted, because the new ui_ header files will be auto generated by CMake in the ${CMAKE_CURRENT_BINARY_DIR} that is already included in the INCLUDE_DIRECTORIES directive

@tshannon
You have to checkout the whole CB trunk http://mm-werkstatt.informatik.uni-augs ... e3D/trunk/ not only the editor.


Top
 Profile  
Reply with quote  
 Post subject: Re: Editor by CMake
PostPosted: 17.02.2012, 05:32 
Offline

Joined: 14.07.2011, 02:18
Posts: 20
I managed to get the editor to build on 64-bit Linux by compiling the editor core and QXmlTree as shared libraries, but I can't get the terrain extension to work.


Top
 Profile  
Reply with quote  
 Post subject: Re: Editor by CMake
PostPosted: 17.02.2012, 22:34 
Offline

Joined: 19.01.2012, 21:01
Posts: 55
Elnof wrote:
I managed to get the editor to build on 64-bit Linux by compiling the editor core and QXmlTree as shared libraries, but I can't get the terrain extension to work.


Thanks, I was just running into that issue.


Top
 Profile  
Reply with quote  
 Post subject: Re: Editor by CMake
PostPosted: 18.02.2012, 00:36 
Offline
Tool Developer

Joined: 13.11.2007, 11:07
Posts: 1149
Location: Germany
Maybe I will find some time in the next days to set up a virtual machine with linux to fix the cmake configuration. Thanks to all feedback.


Top
 Profile  
Reply with quote  
 Post subject: Re: Editor by CMake
PostPosted: 29.02.2012, 20:36 
Offline
Tool Developer

Joined: 13.11.2007, 11:07
Posts: 1149
Location: Germany
I finally got the time to test it under Kubuntu 12.04 Alpha 32bit and on a Mac mini with Mac OS X and compiled it successfully after a view changes. Thanks for all the feedback and if there have been some other issues introduced due to the latest changes for MacOS feel free to report it here! I usually only test the windows version.


Top
 Profile  
Reply with quote  
 Post subject: Re: Editor by CMake
PostPosted: 04.03.2012, 06:10 
Offline

Joined: 19.01.2012, 21:01
Posts: 55
Just did a fresh checkout and it built perfectly on Ubuntu 11.10 64bit.

Thanks,


Top
 Profile  
Reply with quote  
 Post subject: Re: Editor by CMake
PostPosted: 01.08.2012, 03:40 
Offline

Joined: 19.01.2012, 21:01
Posts: 55
FYI, I wasn't able to build the editor from trunk due to this typo I believe.

Revision 1142
http://mm-werkstatt.informatik.uni-augs ... aderData.h

Line 39
Code:
bool ShaderData::loadFX( const QByteArray& data );


I removed the ShaderData:: as it didn't appear to be necessary, and was able to compile past it.


Top
 Profile  
Reply with quote  
 Post subject: Re: Editor by CMake
PostPosted: 01.08.2012, 06:33 
Offline
Tool Developer

Joined: 13.11.2007, 11:07
Posts: 1149
Location: Germany
You're right! Thanks, fixed it.


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

All times are UTC + 1 hour


Who is online

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