CMake build system for Cthugha *looking for testers*

Discussion area about developing or extending OGRE, adding plugins for it or building applications on it. No newbie questions please, use the Help forum for that.
Locked
User avatar
jacmoe
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 20570
Joined: Thu Jan 22, 2004 10:13 am
Location: Denmark
Contact:

Re: CMake build system for Cthugha *looking for testers*

Post by jacmoe » Sat Sep 05, 2009 6:20 am

So, the morale of this:
Don't install Boost in C:\boost\boost_1_38 - just use C:\boost on Windows. ...

<edit>
I know that this really has nothing to do with Ogre as the find_boost script is shipped with CMake.
</edit>
0 x
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.

CABAListic
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 2903
Joined: Thu Jan 18, 2007 2:48 pm
Contact:

Re: CMake build system for Cthugha *looking for testers*

Post by CABAListic » Sat Sep 05, 2009 7:27 am

It'd be a good idea to report this to the CMake devs :)
0 x

User avatar
jacmoe
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 20570
Joined: Thu Jan 22, 2004 10:13 am
Location: Denmark
Contact:

Re: CMake build system for Cthugha *looking for testers*

Post by jacmoe » Sat Sep 05, 2009 9:23 am

Alright. :)
Now something for the Ogre devs ->

In debug mode, the include path to Boost is not set (correctly).
In release mode it's fine: include and linking paths works excellently.
Without me using any environment variable or adding any Boost path to anywhere.
Only using CMake.

But, debug mode is not working that way..
I haven't got as far as to the linking stage, so I don't know if it's library paths as well.
The CMakeCache looks fine.
Must be something specific to debug mode somewhere in the Ogre CMake scripts.
It borks on OgreThreadHeadersBoost.h :(
0 x
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.

CABAListic
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 2903
Joined: Thu Jan 18, 2007 2:48 pm
Contact:

Re: CMake build system for Cthugha *looking for testers*

Post by CABAListic » Sat Sep 05, 2009 9:39 am

Huh, that sounds suspicious. In CMake, there is no way to define separate include paths for debug and release builds, at least not for Visual Studio. If it really does not set include paths for debug builds while release builds are working fine, then this sounds like a CMake bug... or at least, I don't know what could be wrong in our scripts, right now.
0 x

User avatar
jacmoe
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 20570
Joined: Thu Jan 22, 2004 10:13 am
Location: Denmark
Contact:

Re: CMake build system for Cthugha *looking for testers*

Post by jacmoe » Sat Sep 05, 2009 9:49 am

I'll triple check my own settings, and go through the Ogre CMake scripts. :wink:
But, yes: it's weird.
0 x
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.

User avatar
Klaim
Old One
Posts: 2565
Joined: Sun Sep 11, 2005 1:04 am
Location: Paris, France
Contact:

Re: CMake build system for Cthugha *looking for testers*

Post by Klaim » Sat Sep 05, 2009 9:52 am

jacmoe wrote:So, the morale of this:
Don't install Boost in C:\boost\boost_1_38 - just use C:\boost on Windows. ...
Are you serious? (not tried Ogre with CMake yet, but following the discussion)
0 x

User avatar
jacmoe
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 20570
Joined: Thu Jan 22, 2004 10:13 am
Location: Denmark
Contact:

Re: CMake build system for Cthugha *looking for testers*

Post by jacmoe » Sat Sep 05, 2009 9:58 am

I am dead serious. :)
The find_boost script is hard-coded like this:
SET(_boost_INCLUDE_SEARCH_DIRS
C:/boost/include
C:/boost
"$ENV{ProgramFiles}/boost"
/sw/local/include
)
and:
SET(_boost_LIBRARIES_SEARCH_DIRS
C:/boost/lib
C:/boost
"$ENV{ProgramFiles}/boost/boost_${Boost_MAJOR_VERSION}_${Boost_MINOR_VERSION}_${Boost_SUBMINOR_VERSION}/lib"
"$ENV{ProgramFiles}/boost"
/sw/local/lib
)
Notice that you can install it in Program Files as well - but I never install libraries in directories with spaces in their name, just in case..
C:\boost is a safe bet. :wink:

<edit>
Notice the inconsistency:
"$ENV{ProgramFiles}/boost/boost_${Boost_MAJOR_VERSION}_${Boost_MINOR_VERSION}_${Boost_SUBMINOR_VERSION}/lib"
but no C:/boost/boost_${Boost_MAJOR_VERSION}_${Boost_MINOR_VERSION}_${Boost_SUBMINOR_VERSION} check..
Meaning that C:/boost/boost_38_4 will fail..
0 x
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.

User avatar
Klaim
Old One
Posts: 2565
Joined: Sun Sep 11, 2005 1:04 am
Location: Paris, France
Contact:

Re: CMake build system for Cthugha *looking for testers*

Post by Klaim » Sat Sep 05, 2009 10:00 am

O__o

I never installed boost in C:, I have a disk for all my projects and libs, and it's not C: . I know companies where they do the same thing (for some reasons).
It's an issue for me.
0 x

User avatar
jacmoe
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 20570
Joined: Thu Jan 22, 2004 10:13 am
Location: Denmark
Contact:

Re: CMake build system for Cthugha *looking for testers*

Post by jacmoe » Sat Sep 05, 2009 10:02 am

Luckily, it checks the environment variables too:
BOOST_INCLUDEDIR, BOOST_LIBRARYDIR and BOOST_ROOT :wink:
But that's not setup by the Boost installer.
0 x
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.

User avatar
Klaim
Old One
Posts: 2565
Joined: Sun Sep 11, 2005 1:04 am
Location: Paris, France
Contact:

Re: CMake build system for Cthugha *looking for testers*

Post by Klaim » Sat Sep 05, 2009 10:27 am

Oh ok so it's good to know that you have to set it manually.
0 x

User avatar
jacmoe
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 20570
Joined: Thu Jan 22, 2004 10:13 am
Location: Denmark
Contact:

Re: CMake build system for Cthugha *looking for testers*

Post by jacmoe » Sat Sep 05, 2009 10:44 am

CABAListic wrote:Huh, that sounds suspicious. In CMake, there is no way to define separate include paths for debug and release builds, at least not for Visual Studio. If it really does not set include paths for debug builds while release builds are working fine, then this sounds like a CMake bug... or at least, I don't know what could be wrong in our scripts, right now.
Sounds suspicious, yes - because it's not true: for some reason I can't build Ogre in either configuration now. :wink:
Doesn't matter if I set the paths or not.
Can't find it.
I used to be able to build Cthugha.. Very strange.
0 x
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.

User avatar
jacmoe
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 20570
Joined: Thu Jan 22, 2004 10:13 am
Location: Denmark
Contact:

Re: CMake build system for Cthugha *looking for testers*

Post by jacmoe » Sat Sep 05, 2009 11:04 am

I mean: I used to be able to use Cthugha without worrying about Boost in my own projects.
Well, well.. No big deal.
I just thought it was hidden. I'll just use the find_boost script and be done with it.
0 x
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.

User avatar
jacmoe
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 20570
Joined: Thu Jan 22, 2004 10:13 am
Location: Denmark
Contact:

Re: CMake build system for Cthugha *looking for testers*

Post by jacmoe » Sat Sep 05, 2009 1:07 pm

Btw:
Is it acceptable that each and every thing using Ogre needs to link to the Boost libs?
(..)
Anyone else experiencing this?
0 x
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.

User avatar
haffax
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 4823
Joined: Fri Jun 18, 2004 1:40 pm
Location: Berlin, Germany
Contact:

Re: CMake build system for Cthugha *looking for testers*

Post by haffax » Tue Sep 08, 2009 10:04 pm

jacmoe wrote:Btw:
Is it acceptable that each and every thing using Ogre needs to link to the Boost libs?
(..)
Anyone else experiencing this?
Here too, it is annoying. But I don't know if this can be circumvented.

What I wondered about right now is that all demos link all the plugins, is this wanted? I can't imagine that this is sensible. I activated the GLES render system to be built but build fails here (missing GLES headers, ok because I don't have them) But also every demo fails to build, because it tries to link to the missing rendersystem.
0 x
team-pantheon programmer
creators of Rastullahs Lockenpracht

nbeato
Gnome
Posts: 372
Joined: Thu Dec 20, 2007 1:00 am
Location: Florida
Contact:

Re: CMake build system for Cthugha *looking for testers*

Post by nbeato » Tue Sep 08, 2009 10:17 pm

some feedback:

Everything compiled fine on Vista 64 using the DirectX SDK (March 2009) and DirectX SDK (November 2008). However, all of the DirectX linking (d3d9.lib, dx3d9.lib, etc.) assumes that the SDK is in the global library path. CMake finds the lib files and adds them to the projects correctly. However, since the projects don't have "additional library directories" and the "additional input" does not contain the full directory to the lib, the projects fail to link unless you add the DXSDK path to either the projects that require DX or add DXSDK to the global path.
0 x

CABAListic
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 2903
Joined: Thu Jan 18, 2007 2:48 pm
Contact:

Re: CMake build system for Cthugha *looking for testers*

Post by CABAListic » Tue Sep 08, 2009 10:26 pm

@haffax: Yes, this is wanted, because all of the demos depend on the plugins.cfg file, which is generated according to the plugins you have enabled in your build. If any of those plugins fail to build, the demos won't start unless you manually edit the plugins.cfg. Therefore they do depend on any plugin you are building.
You can of course just disable the GL rendersystem in CMake.
0 x

psquare
Hobgoblin
Posts: 554
Joined: Tue Nov 14, 2006 3:26 pm

Re: CMake build system for Cthugha *looking for testers*

Post by psquare » Sat Sep 12, 2009 2:05 pm

How can I switch the implemenation to POCO/TBB instead of boost. Similar to BOOST_ROOT I tried setting up POCO_ROOT/TBB_ROOT via the cmake gui, but the libraries are still not found.
Anything obvious I am missing?
0 x

CABAListic
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 2903
Joined: Thu Jan 18, 2007 2:48 pm
Contact:

Re: CMake build system for Cthugha *looking for testers*

Post by CABAListic » Sat Sep 12, 2009 2:13 pm

First of all, the correct variables are POCO_HOME and TBB_HOME.
TBB is a bit complicated, because TBB by default uses a directory structure for the lib files which is not currently recognised by our find script. You need to copy the library files to POCO_HOME/lib so that the script can pick them up.

Then, once the libs are found, you need to tell CMake to use them instead of boost, because boost is the default implementation. There is a variable OGRE_THREAD_PROVIDER which defaults to boost. Set it to tbb or poco, respectively.
0 x

User avatar
jacmoe
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 20570
Joined: Thu Jan 22, 2004 10:13 am
Location: Denmark
Contact:

Re: CMake build system for Cthugha *looking for testers*

Post by jacmoe » Sat Sep 12, 2009 2:17 pm

Going to try that. :)
I really hope TBB and POCO are a bit more light weight - at least I hope that you don't have to include and link to them all over the place, like Boost forces you to.
0 x
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.

CABAListic
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 2903
Joined: Thu Jan 18, 2007 2:48 pm
Contact:

Re: CMake build system for Cthugha *looking for testers*

Post by CABAListic » Sat Sep 12, 2009 2:32 pm

The method of implementation is basically the same. I expect that any problem occuring with boost is likely to occur with the other libs as well.

Specifically, if applications using Ogre are required to link boost-thread, then I suspect that some threading primitives are used directly in Ogre headers. If so, this would need to be changed, otherwise Poco and tbb will require linking, as well.
0 x

User avatar
jacmoe
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 20570
Joined: Thu Jan 22, 2004 10:13 am
Location: Denmark
Contact:

Re: CMake build system for Cthugha *looking for testers*

Post by jacmoe » Sat Sep 12, 2009 2:36 pm

Just found it a bit excessive that MyGUI, Caelum, whatever, needs to link to Boost, just because they're using Ogre..
They're not anywhere near using the threading Ogre provides.
0 x
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.

PaddyWagon
Halfling
Posts: 94
Joined: Fri Jul 17, 2009 4:39 am

Re: CMake build system for Cthugha *looking for testers*

Post by PaddyWagon » Sat Sep 12, 2009 4:53 pm

Out of curiosity and because I use a 3rd party library that uses a different version of Boost, are there going to be linkage problems against outside libraries like mine that use more recent Boost distributions?
0 x

User avatar
boyamer
Orc
Posts: 459
Joined: Sat Jan 24, 2009 11:16 am
Location: Italy

Re: CMake build system for Cthugha *looking for testers*

Post by boyamer » Wed Sep 16, 2009 7:22 pm

Anyone knows how to setup Cthugha with CMake using Code::Blocks?
I've selected COde::Blocks Ming Make files but i get error on configuration.

Code: Select all

CMake Error: CMake was unable to find a build program corresponding to "MinGW Makefiles".  CMAKE_MAKE_PROGRAM is not set.  You probably need to select a different build tool.
CMake Error: CMake was unable to find a build program corresponding to "MinGW Makefiles".  CMAKE_MAKE_PROGRAM is not set.  You probably need to select a different build tool.
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.
Missing variable is:
CMAKE_C_COMPILER_ENV_VAR
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.
Missing variable is:
CMAKE_C_COMPILER
CMake Error: Could not find cmake module file:D:/SVN/Ogre3d trunk/MingW/CMakeFiles/CMakeCCompiler.cmake
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.
Missing variable is:
CMAKE_CXX_COMPILER_ENV_VAR
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.
Missing variable is:
CMAKE_CXX_COMPILER
CMake Error: Could not find cmake module file:D:/SVN/Ogre3d trunk/MingW/CMakeFiles/CMakeCXXCompiler.cmake
CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
0 x

User avatar
jacmoe
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 20570
Joined: Thu Jan 22, 2004 10:13 am
Location: Denmark
Contact:

Re: CMake build system for Cthugha *looking for testers*

Post by jacmoe » Wed Sep 16, 2009 7:39 pm

Did you install MinGW ?
Is it in C:\MinGW - then you should be all set.
0 x
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.

User avatar
boyamer
Orc
Posts: 459
Joined: Sat Jan 24, 2009 11:16 am
Location: Italy

Re: CMake build system for Cthugha *looking for testers*

Post by boyamer » Thu Sep 17, 2009 9:12 am

Well yes,i've installed Code::blocks with MingW?
Or i should install them separated?
0 x

Locked