Skip to content

Add support for multi configurations generators on unix

Frederic Chardon requested to merge fr3dz10/openmw:multi-config-build into master

Since version 3.17 cmake supports Ninja Multi-Config generator. It means the build takes place in {OpenMW_BINARY_DIR}/{CONFIG} (CONFIG being for example Debug, Release, RelWithDebInfo) instead of ${OpenMW_BINARY_DIR}. The install target needs to be adjusted accordingly.

Example usage, build Release and Debug config:

cmake -B ${BUILD_DIR} -G"Ninja Multi-Config" -DCMAKE_CONFIGURATION_TYPES="Release;Debug" -DCMAKE_CROSS_CONFIGS=all -DCMAKE_DEFAULT_CONFIGS=all
cmake --build ${BUILD_DIR}
cmake --install ${BUILD_DIR} --config Debug

No change for Xcode and VS - which support this since forever - and Ninja "single config"

Merge request reports