devilutionX/build
Gleb Mazovetskiy 7b72b3d4ea CMake: Use generator expressions more
Generator expressions are the only way to distinguish between build
types in multi-configuration builds (Visual Studio).

This adds generator expressions for some of build type dependent
values as a starting point.

See a more detailed explanation at:
https://cmake.org/cmake/help/latest/manual/cmake-buildsystem.7.html#build-specification-with-generator-expressions

Notably:

> Some buildsystems generated by cmake(1) have a predetermined build-configuration set in the CMAKE_BUILD_TYPE variable. The buildsystem for the IDEs such as Visual Studio and Xcode are generated independent of the build-configuration, and the actual build configuration is not known until build-time. Therefore, code such as
>
>     string(TOLOWER ${CMAKE_BUILD_TYPE} _type)
>     if (_type STREQUAL debug)
>       target_compile_definitions(exe1 PRIVATE DEBUG_BUILD)
>     endif()
>
> may appear to work for Makefile Generators and Ninja generators, but is not portable to IDE generators.
2020-04-08 04:36:34 +02:00
..
.gitkeep CMake: Use generator expressions more 2020-04-08 04:36:34 +02:00