BaldrDash / recastnavigation

Automatically exported from code.google.com/p/recastnavigation
zlib License
0 stars 0 forks source link

CMake project files for building #164

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I was not able to build recast/detour using the makefile (seems outdated?), so 
I hacked together some CMake build files. These could also be used as a 
template for msvc build files if this helps with keeping them in sync (so that 
only one project file source has to be updated).

The CMakeLists.txt files support building shared libraries and on unix hosts 
support installing them system wide. They automatically search for SDL and 
OpenGL and should support Linux etc and Windows, with proper Mac OSX support 
being easy to add (I don't own the hardware/software though). Building the demo 
is made optional.

Original issue reported on code.google.com by mgottsch...@gmail.com on 26 Mar 2011 at 10:00

Attachments:

GoogleCodeExporter commented 9 years ago
ARGH. Didn't see that I am not the first to do this. Sorry for the noise, take 
this as a second vote for a cmake build setup.

Original comment by mgottsch...@gmail.com on 26 Mar 2011 at 10:01

GoogleCodeExporter commented 9 years ago
Your take is probably better than mine. :)
I couldn't build the demo (IIRC)

Original comment by jacmoe...@gmail.com on 9 Apr 2011 at 1:22

GoogleCodeExporter commented 9 years ago
Issue 161 has been merged into this issue.

Original comment by memono...@gmail.com on 19 Apr 2011 at 5:49

GoogleCodeExporter commented 9 years ago
Issue 166 has been merged into this issue.

Original comment by memono...@gmail.com on 19 Apr 2011 at 5:50

GoogleCodeExporter commented 9 years ago
Hello!

I have tried to use cmake and premake earlier and all my attempts so far have 
failed. The xcode projects they generate are just not working at all. Either 
they cannot link with proper frameworks or I cannot add the few extra compile 
flags I need. I seem to have absolutely zero patience what it comes to fixing 
makefile issues of any sorts.

That being said, I'd love to support compiling the lib in unix in one way or 
the other. I just don't have knowledge on how to maintain make files nor a 
resources to test them.

Any volunteers?

p.s. I'd prefer to link Recast&Detour statically.

Original comment by memono...@gmail.com on 19 Apr 2011 at 6:10

GoogleCodeExporter commented 9 years ago
Issue 149 has been merged into this issue.

Original comment by memono...@gmail.com on 19 Apr 2011 at 6:13

GoogleCodeExporter commented 9 years ago
I already volunteered and attached a patch with working Linux makefiles in 
Issue 149 which you just closed as duplicate.

I've also submitted CMake and Premake build solutions in the past. I'm happy to 
help but my offers seem to have been largely ignored so far.

Original comment by cameron....@gmail.com on 19 Apr 2011 at 8:18

GoogleCodeExporter commented 9 years ago
Cameron, I apologize my ignorance. My only explaination is it that I was 
earlier looking for build solution which would work across osx/win/linux. My 
mind has changed after that to get even some support on linux.

I was never able to make cmake or premake to work on osx despite your good 
efforts. Your patch on issue 149 just slipped through my radar. I wanted to 
merge these conversations into one.

A second question. Is the makefile solution sufficient for linux builds or 
should we go for cmake? I have no experience on working on linux so I is really 
hard for me to judge.

Original comment by memono...@gmail.com on 19 Apr 2011 at 8:43

GoogleCodeExporter commented 9 years ago
I prefer CMake personally. I did get the Linux makefiles working but it took a 
lot more effort for me than CMake. A couple of others have also submitted CMake 
files so it seems like a popular option.

Original comment by cameron....@gmail.com on 19 Apr 2011 at 10:17

GoogleCodeExporter commented 9 years ago
Ok. I'm fine with cmake. Would be willing to keep them up to date? I can give 
you access to the svn to make it easier.

Original comment by memono...@gmail.com on 19 Apr 2011 at 10:30

GoogleCodeExporter commented 9 years ago
I'd be happy to keep them up to date. Svn access would definitely make it 
easier. I won't touch anything else I promise!

Generally CMake likes to put a CMakeLists.txt in the root directory and then in 
the root of each lib directory (e.g. Detour, Recast, etc.). I know you keep all 
your other build files in RecastDemo/Build. It's possible but to do that but 
it's an uncommon layout for CMake projects. Let me know what you'd prefer.

Original comment by cameron....@gmail.com on 19 Apr 2011 at 11:56

GoogleCodeExporter commented 9 years ago
I added you as committer, let me know if there are some problems submitting.

You should use the common cmake layout. I prefer the intermediate build files 
to go to the build folder if possible and the demo executable in the bin folder 
unless that is against how cmake stuff usually works.

You can also remove the gnumake folder.

Original comment by memono...@gmail.com on 19 Apr 2011 at 12:13

GoogleCodeExporter commented 9 years ago
Cool, will try commit something tonight. I've been maintaining my own CMake 
files for a while anyway so it should take too long.

Original comment by cameron....@gmail.com on 19 Apr 2011 at 7:09

GoogleCodeExporter commented 9 years ago
This is really awesome!
Hopefully someone can fix them for OS X - it's a bit more involved platform - 
but I can help test the CMake build scripts on Windows and Linux.

Original comment by jacmoe...@gmail.com on 19 Apr 2011 at 9:01

GoogleCodeExporter commented 9 years ago
I've added CMake build and removed the Linux Makefile build. The CMake build 
should also work on Windows and Mac as well as Linux. It copies the executable 
to the RecastDemo/Bin folder. The intermediate build files go under the 
directory people run CMake from. The usual CMake build process on Linux is:

mkdir build
cd build
cmake ..
make

Intermediate files will be created under the build folder.

Original comment by cameron....@gmail.com on 20 Apr 2011 at 10:59