-
Notifications
You must be signed in to change notification settings - Fork 82
Compiling Wagic with CMake
Compiling wagic with CMake is currently only possible in the "cmake" branch until it gets merged on the "master" branch. Using this method enable using the same files to generate the project files for all compiling platforms and all cross-compiling targets.
git clone https://github.com/WagicProject/wagic.git myWagic
cd myWagic
git fetch
git checkout cmake
git submodule update --init --recursive
You can always download CMake for Linux, Macosx and Windows here. Depending on your platform, you could probably use your package manager (Linux) or brew (Macosx) to install CMake.
Install Android NDK, Android SDK and ANT for Android flavor. Install PSP SDK for the PSP flavor.
Be sure to have all the usual dev stuff (make, gcc, ...). Install Qt5 packages or download Qt5 SDK for the Qt flavor.
Install brew and Qt5 for the Qt flavor. Install brew and theos iOS toolchain for the iOS flavor.
Install Visual studio for the Windows flavor.
In the Wagic project directory
mkdir build_psp
cd build_psp
cmake -DCMAKE_TOOLCHAIN_FILE=../CMakeModules/psp.toolchain.cmake ..
make -j4
cd ..
mkdir build_android
cd build_android
cmake -DCMAKE_TOOLCHAIN_FILE=../CMakeModules/android.toolchain.cmake -DANDROID_NATIVE_API_LEVEL=android-10 ..
make -j4
cd ..
mkdir build_qt_widget
cd build_qt_widget
cmake -Dbackend_qt_widget=ON -Dbackend_qt_console=OFF ..
make -j4 wagic
cd ..
mkdir build_SDL
cd build_SDL
cmake -Dbackend_sdl=ON ..
make -j4 wagic
cd ..
cmake -DCMAKE_TOOLCHAIN_FILE=CMakeModules/ios-theos.toolchain.cmake -DTHEOS_PATH=theos .
cp projects/mtg/iOS/control .
make -j4 -f makefile.ios package
cmake -Dbackend_sdl=ON ..
msbuild .\wagic.sln /p:Configuration=Release