Add ConvertColorCursors to CMake, port to *nix

- Includes WindowsUnicodeToolShim.h.
- Replaces sprintf_s() with std::ostringstream.
- Replaces fopen_s() with fopen_utf8().
- Switches to the toolMain() wrapper, which is a no-op on except on
  Windows, where it should improve Unicode support, though I can't test
  that on my end.
- Replaces \ with / in paths, which should still be Windows-compatible.
This commit is contained in:
Diomendius
2024-06-18 12:47:19 +12:00
parent 8b916867d5
commit 0ebdabc12f
2 changed files with 34 additions and 11 deletions

View File

@@ -472,5 +472,21 @@ if(FREETYPE_FOUND)
target_link_libraries(GenerateFonts PortabilityLayer GpFontHandler_FreeType2)
endif()
add_executable(ConvertColorCursors
ConvertColorCursors/ConvertColorCursors.cpp
AerofoilPortable/GpAllocator_C.cpp
stb/stb_image_write.c
WindowsUnicodeToolShim/UnixUnicodeToolShim.cpp
)
target_include_directories(ConvertColorCursors PRIVATE
Common
GpCommon
PortabilityLayer
AerofoilPortable
stb
WindowsUnicodeToolShim
)
target_link_libraries(ConvertColorCursors PortabilityLayer)
install (TARGETS ${EXECNAME})