From a7852b8c3027b525214805921828a6ee6c6efa7f Mon Sep 17 00:00:00 2001 From: Diomendius <42310725+Diomendius@users.noreply.github.com> Date: Tue, 11 Jun 2024 02:08:39 +1200 Subject: [PATCH] Add gpr2gpa to CMake, port to *nix --- CMakeLists.txt | 18 ++++++++++++++++++ gpr2gpa/gpr2gpa.cpp | 8 ++++++-- 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0b25e06..7b52ac8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -331,5 +331,23 @@ target_include_directories(hqx2gp PRIVATE ) target_link_libraries(hqx2gp PortabilityLayer) +add_executable(gpr2gpa + gpr2gpa/gpr2gpa.cpp + gpr2gpa/macedec.cpp + AerofoilPortable/GpAllocator_C.cpp + UnixCompat/UnixCompat.cpp + ) +target_include_directories(gpr2gpa PRIVATE + Common + GpCommon + PortabilityLayer + AerofoilPortable + MacRomanConversion + UnixCompat + rapidjson/include + zlib + ) +target_link_libraries(gpr2gpa PortabilityLayer MacRomanConversion zlib) + install (TARGETS ${EXECNAME}) diff --git a/gpr2gpa/gpr2gpa.cpp b/gpr2gpa/gpr2gpa.cpp index e532a99..380472e 100644 --- a/gpr2gpa/gpr2gpa.cpp +++ b/gpr2gpa/gpr2gpa.cpp @@ -24,8 +24,6 @@ #include "rapidjson/rapidjson.h" #include "rapidjson/document.h" -#include "WindowsUnicodeToolShim.h" - #include "macedec.h" #include @@ -33,7 +31,13 @@ #include #include #include + +#ifdef _WIN32 +#include "WindowsUnicodeToolShim.h" #include "GpWindows.h" +#else +#include "UnixCompat.h" +#endif enum AudioCompressionCodecID {