aewallin/opencamlib — pull request #7 by nraynaud (2013-05-14 22:07:48+00:00)
Title: Compile on Mac OS X

Hi, you might want to test that on other platforms before merging, because I've never used cmake in my life, so it's google powered.

I tried to use a cmake module I found by googling, since it was not linking against python by default and sed doesn't recognize -r on mac (it's -E if you are curious).

The "SHARED" insted of "MODULE" is to convince cmake to pass -dynamiclib to ld, wich is mandatory when sending -current_version otherwise we get "error: -current_version only allowed with -dynamiclib".

I did not take into account the optionality of python building, because I didn't get how it was supposed to work.

I had to install gcc 4.7 through macports because clang, the default mac compiler, doesn't support OpenMP (or so google tells me, it could be a stale information)

Here is my cmake command:
cmake ../src -DCMAKE_CXX_COMPILER=/opt/local/bin/g++-mp-4.7 -DOpenMP_CXX_FLAGS=-fopenmp

I added some cruft to .gitignore.

I hope it's helpful to someone and doen't break other platforms.