CMakeLists.txt changes for Building OS X Binaries
In order to build stratagus for OS X 10.8.2, I make the following changes to CMakeLists.txt:
751a752,757
> if(MAC_BUNDLE)
> add_definitions
> add_definitions
> endif()
>
>
924a931,935
> if(APPLE AND ENABLE_STATIC)
> set_target_
> endif()
>
>
952a964,967
>
> if(APPLE AND ENABLE_STATIC)
> set_target_
> endif()
The first (MAC_BUNDLE) just activates code which was already in the source, and should be safe for everyone.
The second/third (if APPLE AND ENABLE_STATIC) adds the libraries I needed to make statically linked binaries. Can't guarantee that this will work for everyone, however, it only affects anyone trying to build it on an APPLE with ENABLE_STATIC=on, so I imagine it's probably safe as well.
I then build my makefiles with the following:
cmake -G "Unix Makefiles" -DENABLE_STATIC=on -DMAC_BUNDLE=on ..
make stratagus
Any chance on getting these added to the branch?
If there's a better way (than editing CMakeLists.txt), I'm all ears.
Question information
- Language:
- English Edit question
- Status:
- Answered
- For:
- Stratagus Edit question
- Assignee:
- Pali Edit question
- Last query:
- Last reply:
Can you help with this problem?
Provide an answer of your own, or ask Julio for more information if necessary.