From 2a96e743b0943f1a9cd0274fa4442ea3dd2a24bd Mon Sep 17 00:00:00 2001 From: falkTX Date: Wed, 31 May 2023 02:05:40 +0200 Subject: [PATCH] Adjust installed utils to work without any special macros Signed-off-by: falkTX --- source/backend/utils/CarlaUtils.cpp | 2 ++ source/utils/CarlaBinaryUtils.hpp | 10 +++++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/source/backend/utils/CarlaUtils.cpp b/source/backend/utils/CarlaUtils.cpp index 5e56c8b52..5fd9df444 100644 --- a/source/backend/utils/CarlaUtils.cpp +++ b/source/backend/utils/CarlaUtils.cpp @@ -17,6 +17,8 @@ #include "CarlaUtils.hpp" +#include "CarlaProcessUtils.cpp" + #ifndef CARLA_OS_WASM # include "CarlaBridgeUtils.cpp" #endif diff --git a/source/utils/CarlaBinaryUtils.hpp b/source/utils/CarlaBinaryUtils.hpp index 193d6ccd3..0cbc04524 100644 --- a/source/utils/CarlaBinaryUtils.hpp +++ b/source/utils/CarlaBinaryUtils.hpp @@ -21,11 +21,11 @@ #include "CarlaBackend.h" #include "CarlaScopeUtils.hpp" -#if defined(CARLA_UTILS_USE_QT) +#if defined(BUILDING_CARLA) +# include "water/files/FileInputStream.h" +#elif defined(CARLA_UTILS_USE_QT) # include # include -#else -# include "water/files/FileInputStream.h" #endif #if defined(HAVE_LIBMAGIC) && ! defined(BUILD_BRIDGE_ALTERNATIVE_ARCH) @@ -132,6 +132,7 @@ BinaryType getBinaryTypeFromFile(const char* const filename) } #endif + #if defined(BUILDING_CARLA) || defined(CARLA_UTILS_USE_QT) #if defined(CARLA_UTILS_USE_QT) QFile file(QString::fromUtf8(filename)); CARLA_SAFE_ASSERT_RETURN(file.open(QIODevice::ReadOnly), BINARY_NATIVE); @@ -192,6 +193,9 @@ BinaryType getBinaryTypeFromFile(const char* const filename) default: return BINARY_NATIVE; } + #else + return BINARY_NATIVE; + #endif } // --------------------------------------------------------------------------------------------------------------------