CMake build system for Cthugha *looking for testers*
- jacmoe
- OGRE Retired Moderator
- Posts: 20570
- Joined: Thu Jan 22, 2004 10:13 am
- Location: Denmark
- x 179
- Contact:
Re: CMake build system for Cthugha *looking for testers*
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>
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>
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
-
- OGRE Retired Team Member
- Posts: 2903
- Joined: Thu Jan 18, 2007 2:48 pm
- x 58
- Contact:
Re: CMake build system for Cthugha *looking for testers*
It'd be a good idea to report this to the CMake devs
- jacmoe
- OGRE Retired Moderator
- Posts: 20570
- Joined: Thu Jan 22, 2004 10:13 am
- Location: Denmark
- x 179
- Contact:
Re: CMake build system for Cthugha *looking for testers*
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
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
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
-
- OGRE Retired Team Member
- Posts: 2903
- Joined: Thu Jan 18, 2007 2:48 pm
- x 58
- Contact:
Re: CMake build system for Cthugha *looking for testers*
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.
- jacmoe
- OGRE Retired Moderator
- Posts: 20570
- Joined: Thu Jan 22, 2004 10:13 am
- Location: Denmark
- x 179
- Contact:
Re: CMake build system for Cthugha *looking for testers*
I'll triple check my own settings, and go through the Ogre CMake scripts.
But, yes: it's weird.
But, yes: it's weird.
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
- Klaim
- Old One
- Posts: 2565
- Joined: Sun Sep 11, 2005 1:04 am
- Location: Paris, France
- x 56
- Contact:
Re: CMake build system for Cthugha *looking for testers*
Are you serious? (not tried Ogre with CMake yet, but following the discussion)jacmoe wrote:So, the morale of this:
Don't install Boost in C:\boost\boost_1_38 - just use C:\boost on Windows. ...
- jacmoe
- OGRE Retired Moderator
- Posts: 20570
- Joined: Thu Jan 22, 2004 10:13 am
- Location: Denmark
- x 179
- Contact:
Re: CMake build system for Cthugha *looking for testers*
I am dead serious.
The find_boost script is hard-coded like this:
C:\boost is a safe bet.
<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..
The find_boost script is hard-coded like this:
and:SET(_boost_INCLUDE_SEARCH_DIRS
C:/boost/include
C:/boost
"$ENV{ProgramFiles}/boost"
/sw/local/include
)
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..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
)
C:\boost is a safe bet.
<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..
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
- Klaim
- Old One
- Posts: 2565
- Joined: Sun Sep 11, 2005 1:04 am
- Location: Paris, France
- x 56
- Contact:
Re: CMake build system for Cthugha *looking for testers*
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.
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.
- jacmoe
- OGRE Retired Moderator
- Posts: 20570
- Joined: Thu Jan 22, 2004 10:13 am
- Location: Denmark
- x 179
- Contact:
Re: CMake build system for Cthugha *looking for testers*
Luckily, it checks the environment variables too:
BOOST_INCLUDEDIR, BOOST_LIBRARYDIR and BOOST_ROOT
But that's not setup by the Boost installer.
BOOST_INCLUDEDIR, BOOST_LIBRARYDIR and BOOST_ROOT
But that's not setup by the Boost installer.
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
- Klaim
- Old One
- Posts: 2565
- Joined: Sun Sep 11, 2005 1:04 am
- Location: Paris, France
- x 56
- Contact:
Re: CMake build system for Cthugha *looking for testers*
Oh ok so it's good to know that you have to set it manually.
- jacmoe
- OGRE Retired Moderator
- Posts: 20570
- Joined: Thu Jan 22, 2004 10:13 am
- Location: Denmark
- x 179
- Contact:
Re: CMake build system for Cthugha *looking for testers*
Sounds suspicious, yes - because it's not true: for some reason I can't build Ogre in either configuration now.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.
Doesn't matter if I set the paths or not.
Can't find it.
I used to be able to build Cthugha.. Very strange.
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
- jacmoe
- OGRE Retired Moderator
- Posts: 20570
- Joined: Thu Jan 22, 2004 10:13 am
- Location: Denmark
- x 179
- Contact:
Re: CMake build system for Cthugha *looking for testers*
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.
Well, well.. No big deal.
I just thought it was hidden. I'll just use the find_boost script and be done with it.
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
- jacmoe
- OGRE Retired Moderator
- Posts: 20570
- Joined: Thu Jan 22, 2004 10:13 am
- Location: Denmark
- x 179
- Contact:
Re: CMake build system for Cthugha *looking for testers*
Btw:
Is it acceptable that each and every thing using Ogre needs to link to the Boost libs?
(..)
Anyone else experiencing this?
Is it acceptable that each and every thing using Ogre needs to link to the Boost libs?
(..)
Anyone else experiencing this?
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
- haffax
- OGRE Retired Moderator
- Posts: 4823
- Joined: Fri Jun 18, 2004 1:40 pm
- Location: Berlin, Germany
- x 7
- Contact:
Re: CMake build system for Cthugha *looking for testers*
Here too, it is annoying. But I don't know if this can be circumvented.jacmoe wrote:Btw:
Is it acceptable that each and every thing using Ogre needs to link to the Boost libs?
(..)
Anyone else experiencing this?
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.
-
- Gnome
- Posts: 372
- Joined: Thu Dec 20, 2007 1:00 am
- Location: Florida
- x 3
- Contact:
Re: CMake build system for Cthugha *looking for testers*
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.
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.
-
- OGRE Retired Team Member
- Posts: 2903
- Joined: Thu Jan 18, 2007 2:48 pm
- x 58
- Contact:
Re: CMake build system for Cthugha *looking for testers*
@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.
You can of course just disable the GL rendersystem in CMake.
-
- Hobgoblin
- Posts: 554
- Joined: Tue Nov 14, 2006 3:26 pm
- x 7
Re: CMake build system for Cthugha *looking for testers*
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?
Anything obvious I am missing?
-
- OGRE Retired Team Member
- Posts: 2903
- Joined: Thu Jan 18, 2007 2:48 pm
- x 58
- Contact:
Re: CMake build system for Cthugha *looking for testers*
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.
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.
- jacmoe
- OGRE Retired Moderator
- Posts: 20570
- Joined: Thu Jan 22, 2004 10:13 am
- Location: Denmark
- x 179
- Contact:
Re: CMake build system for Cthugha *looking for testers*
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.
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.
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
-
- OGRE Retired Team Member
- Posts: 2903
- Joined: Thu Jan 18, 2007 2:48 pm
- x 58
- Contact:
Re: CMake build system for Cthugha *looking for testers*
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.
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.
- jacmoe
- OGRE Retired Moderator
- Posts: 20570
- Joined: Thu Jan 22, 2004 10:13 am
- Location: Denmark
- x 179
- Contact:
Re: CMake build system for Cthugha *looking for testers*
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.
They're not anywhere near using the threading Ogre provides.
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
-
- Halfling
- Posts: 94
- Joined: Fri Jul 17, 2009 4:39 am
- x 1
Re: CMake build system for Cthugha *looking for testers*
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?
- boyamer
- Orc
- Posts: 459
- Joined: Sat Jan 24, 2009 11:16 am
- Location: Italy
- x 6
Re: CMake build system for Cthugha *looking for testers*
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.
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
- jacmoe
- OGRE Retired Moderator
- Posts: 20570
- Joined: Thu Jan 22, 2004 10:13 am
- Location: Denmark
- x 179
- Contact:
Re: CMake build system for Cthugha *looking for testers*
Did you install MinGW ?
Is it in C:\MinGW - then you should be all set.
Is it in C:\MinGW - then you should be all set.
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
- boyamer
- Orc
- Posts: 459
- Joined: Sat Jan 24, 2009 11:16 am
- Location: Italy
- x 6
Re: CMake build system for Cthugha *looking for testers*
Well yes,i've installed Code::blocks with MingW?
Or i should install them separated?
Or i should install them separated?