ivansafrin/Polycode — pull request #401 by Yoshiyuka (2013-11-25 08:10:44+00:00)
Title: New CMake Build Process

I've spent the weekend making some modifications to the CMake and Make files to allow compiling of Separate Debug and Release builds without one depending on the other. Debug builds get compiled to Polycode/Debug while Release builds will continue to be compiled to Polycode/Release. This allows users to compile strictly either Debug or Release builds.

I've also added a couple Find[Package_Name] CMake files to help with hunting down debug libs for PhysFS and OpenAL (the OpenAL finder packaged with CMake seems to only look for release builds?).

The IDE still builds to IDE/Build/[Platform]/Build regardless of whether you're building a Debug or Release version of the IDE.

When building Standalone, the CMake command needs to specify a build type now (if building debug, otherwise it defaults to a Release build) such as: `cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Debug ../

When building the IDE, the 'debug' target must be specified when running the Makefile to generate a debug build (otherwise it will link against Release libraries, which will fail if you've only built debug libs). Ex. `make debug`

I've also edited the OpenAL cmake file to compile a static library rather than a shared as suggested by @wshearn in Issue #385

**I have tested this on Debian but have not had the chance to test on either Mac, MSVC, or MINGW.** With that said, I have made (what I hope to be) the necessary changes for building on those environments to work.

These changes have been rebased on to commit 56d250823c750c230c7cdedc8af5d3654a97c441 so as to make this a simple fast-forward merge if you choose to accept the pull request.

Thanks for all the work you've been doing! I look forward to seeing the project develop further.