Preprocessing values are indispensable when building vs engineering, such as the export configuration of dynamic libraries. When building vs engineering through CMake, you can define it through the cmake command, which says three applications.
character set: The default reload vs project is a multibyte character set, and if you need to use the Unicode character set, you can set it with the following command:
Add_definitions (-dunicode-d_unicode)
Dynamic Library Export : Lib_dll to custom variable names
MFC's use : if you call MFC's functions in your project, you need to configure MFC in a dynamic library or use MFC in a static library, you can use commands:
Add_definitions (-d_afc_dll)
The use of the add_definitions command needs to be pre-defined plus-D to indicate that multiple definitions can be defined in a single command or separately, and the commands are distinguished by spaces
Setting a preprocessor-defined value in Visual Studio Engineering with CMake