TagLib uses the CMake build system to create the Visual Studio 2010 solution and project files.
The only problem with the generated projects is that the Character Set is set to MBCS, when I'd like it to be Unicode.
Is there a way to set this option via CMake?
I'm currently using this to build taglib on Windows on a VS2010 command prompt:
cmake -DWITH_MP4=ON -DENABLE_STATIC=ON .
Alternatively to Andrey's answer you could specify the character set in a CMakeLists.txt file by
target_compile_definitions (TargetName PRIVATE -D_UNICODE -DUNICODE
<additional defines>)
The following command should do the job:
cmake -DCMAKE_CXX_FLAGS=/D_UNICODE ..
cmake automatically turns on the Unicode character set in Visual Studio projects if _UNICODE macro is defined.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With