Question about CMake and Boost

Get help with programming issues.

Moderator: PPS-Leaders

User avatar
beni
Baron Vladimir Harkonnen
Posts: 949
Joined: Tue Oct 03, 2006 9:15 am
Location: Zurich
Contact:

Post by beni » Wed Jan 14, 2009 10:37 am

much easier then :D
"I'm Commander Shepard and this is my favorite forum on the internet."

User avatar
superegg
Human Space Navy Major
Posts: 41
Joined: Mon Oct 08, 2007 2:41 pm

Post by superegg » Wed Jan 14, 2009 12:12 pm

I already found out that Mac can be detected as "APPLE". And a ConfigMac.cmake has also been created. Unlike Ogre on Linux and Windows, there is only an Ogre framework available, with a unix executable and headers in it. Thats why no lib can be found there.
Anyway, after tons of tries, all prerequisites can be found now, and it also says "Build files have been written to ......". Every thing seems to be found. But there is still no executable. Does this error occur if it got a wrong Ogre lib path?
Image

User avatar
1337
Baron Vladimir Harkonnen
Posts: 521
Joined: Wed Oct 10, 2007 7:59 am

Post by 1337 » Wed Jan 14, 2009 12:40 pm

I hope it is clear to you that CMake does not create an executable? It only writes makefiles, visual studio files, code::block files, xcode files, etc.

There is an XCode project generator for CMake, but it does not seem to be available in my binaries. Maybe you have to get separately. Anyway the command line would be "cmake -G XCode .."
http://www.xkcd.com/
A webcomic of romance, sarcasm, math, and language.

User avatar
beni
Baron Vladimir Harkonnen
Posts: 949
Joined: Tue Oct 03, 2006 9:15 am
Location: Zurich
Contact:

Post by beni » Wed Jan 14, 2009 12:48 pm

1337 wrote:There is an XCode project generator for CMake, but it does not seem to be available in my binaries. Maybe you have to get separately. Anyway the command line would be "cmake -G XCode .."
I think that would be an additional feature. All cool one though, but I think it should first be working with plain Unix Makefiles, but I may also be wrong. Maybe XCode is the only way...
"I'm Commander Shepard and this is my favorite forum on the internet."

User avatar
1337
Baron Vladimir Harkonnen
Posts: 521
Joined: Wed Oct 10, 2007 7:59 am

Post by 1337 » Wed Jan 14, 2009 1:01 pm

I know so little about Mac, I couldn't even tell you whether makefiles work on. I hope they do. It would make things easier.
http://www.xkcd.com/
A webcomic of romance, sarcasm, math, and language.

User avatar
beni
Baron Vladimir Harkonnen
Posts: 949
Joined: Tue Oct 03, 2006 9:15 am
Location: Zurich
Contact:

Post by beni » Wed Jan 14, 2009 3:43 pm

1337 wrote:I know so little about Mac, I couldn't even tell you whether makefiles work on. I hope they do. It would make things easier.
They do, most things do, which also work for Linux. But little things differ. Like applications and the location of utilities and libraries.
"I'm Commander Shepard and this is my favorite forum on the internet."

User avatar
1337
Baron Vladimir Harkonnen
Posts: 521
Joined: Wed Oct 10, 2007 7:59 am

Post by 1337 » Wed Jan 14, 2009 4:33 pm

Seems like the whole Mac thing is not that easy (never said that though).

Plugins for OGRE are supported via bundles. There is some code in Main.cc to find the bundle path, but I have no idea about that stuff. There's also some docs with CMake about it.

Then Chai reported that all libraries were found (they're all in usr, opt or sw) except OGRE and CEGUI due to the fact that they use frameworks (Cocoa if I'm right). I don't know why but I'm sure it has advantages.
Again, I'm sorry Chai, I cannot help you there. I wanted to have a quick look at library linking on Mac, but it's way too much for a has-never-used-a-Mac guy.

However I can tell that XCode projects should have way better support now because it uses multiple configurations (debug, release, etc.) like MSVC. And I have sorted that out. But it only works if the actual output directory is the CMake one plus the configuration name. For instance build/bin/Debug. With makefiles, you just have build/bin. I really that the CMake guys configured the XCode project like that too.
http://www.xkcd.com/
A webcomic of romance, sarcasm, math, and language.

User avatar
greenman
Baron Vladimir Harkonnen
Posts: 360
Joined: Wed Oct 03, 2007 2:53 pm
Contact:

Post by greenman » Wed Jan 14, 2009 5:28 pm

maybe i'm missing something, but shouldn't it be enough for him to just build the whole thing with

Code: Select all

make -j2
?
There are only 10 types of people in the world: Those who understand binary, and those who don't.

User avatar
1337
Baron Vladimir Harkonnen
Posts: 521
Joined: Wed Oct 10, 2007 7:59 am

Post by 1337 » Wed Jan 14, 2009 5:37 pm

no use if there is no ogre and cegui library...
http://www.xkcd.com/
A webcomic of romance, sarcasm, math, and language.

User avatar
greenman
Baron Vladimir Harkonnen
Posts: 360
Joined: Wed Oct 03, 2007 2:53 pm
Contact:

Post by greenman » Thu Jan 15, 2009 1:00 am

superegg wrote:Anyway, after tons of tries, all prerequisites can be found now, and it also says "Build files have been written to ......".
seems to me that all neccessary libs have been found ?!
There are only 10 types of people in the world: Those who understand binary, and those who don't.

User avatar
superegg
Human Space Navy Major
Posts: 41
Joined: Mon Oct 08, 2007 2:41 pm

Post by superegg » Thu Jan 15, 2009 2:59 am

@Greenman

No, I set Dummy paths for libs to make cmake to create XCode project, hoping to make orxonox run by changing paths directly in XCode.
Image

User avatar
1337
Baron Vladimir Harkonnen
Posts: 521
Joined: Wed Oct 10, 2007 7:59 am

Post by 1337 » Thu Jan 15, 2009 12:46 pm

Code: Select all

/* TODO: Check what this actually is and whether we need it or not */
#if 0
#  if ORXONOX_PLATFORM == ORXONOX_PLATFORM_APPLE
#    define ORXONOX_PLATFORM_LIB "OrxonoxPlatform.bundle"
#  else
/* ORXONOX_PLATFORM_LINUX */
#    define ORXONOX_PLATFORM_LIB "libOrxonoxPlatform.so"
#  endif
#endif
That's in OrxonoxPlatform.h, soon to be replaced by OrxonoxConfig.h (which gets configured by CMake).
http://www.xkcd.com/
A webcomic of romance, sarcasm, math, and language.

User avatar
superegg
Human Space Navy Major
Posts: 41
Joined: Mon Oct 08, 2007 2:41 pm

Post by superegg » Fri Jan 16, 2009 2:51 am

I found out that Cmake probably can use mac frameworks as libs directly, by adjusting some variables. Anyway, I accidently deleted some files from the orxonox folder. So I was forced to run svn up. Now it seems that the paths of FindFOO are not correct anymore? Can someone tell me whether the problem is in the current branch, or I did something wrong?
Image

User avatar
1337
Baron Vladimir Harkonnen
Posts: 521
Joined: Wed Oct 10, 2007 7:59 am

Post by 1337 » Fri Jan 16, 2009 8:25 am

There haven't been any changes since your last checkout.
But you can always delete the CMake Cache and try again (CMakeCache.txt), maybe that helps.
http://www.xkcd.com/
A webcomic of romance, sarcasm, math, and language.

User avatar
superegg
Human Space Navy Major
Posts: 41
Joined: Mon Oct 08, 2007 2:41 pm

Post by superegg » Sun Jan 18, 2009 1:28 am

Thx 1337!
Am I allowed to run "svn ci" for buildsystem2? I made some changes in several files to make it compile and created "ConfigMac.cmake" file.

Anyway, every dylib seems to have different bugs, either more frameworks are needed, or paths to libs are not correct, e.g. sys/wait.h instead of wait.h.

I am stuck in libutil.dylib now. Signalhandler.h cannot be linked correctly. It depends on Xlib.h and has an error that several X functions are declared but not implemented. The strange thing is, I looked into all dependency headers and cannot even find these mentioned functions. I am asking myself, where are the damned declarations????

BTW, guide for mac on wiki has been updated.
Image

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest