Browse Source

Fix cmake defaults, msvc log thread

Signed-off-by: falkTX <falktx@falktx.com>
pull/1780/head
falkTX 1 year ago
parent
commit
1a75fc6b19
Signed by: falkTX <falktx@falktx.com> GPG Key ID: CDBAA37ABC74FBA0
2 changed files with 13 additions and 5 deletions
  1. +2
    -2
      cmake/CMakeLists.txt
  2. +11
    -3
      source/utils/CarlaLogThread.hpp

+ 2
- 2
cmake/CMakeLists.txt View File

@@ -37,8 +37,8 @@ else()
set(CARLA_USE_OSC_DEFAULT TRUE)
endif()

set(CARLA_USE_JACK TRUE CACHE ${CARLA_USE_JACK_DEFAULT} "Enable JACK")
set(CARLA_USE_OSC TRUE CACHE ${CARLA_USE_OSC_DEFAULT} "Enable OSC")
set(CARLA_USE_JACK ${CARLA_USE_JACK_DEFAULT} CACHE BOOL "Enable JACK")
set(CARLA_USE_OSC ${CARLA_USE_OSC_DEFAULT} CACHE BOOL "Enable OSC")

#######################################################################################################################
# required dependencies


+ 11
- 3
source/utils/CarlaLogThread.hpp View File

@@ -24,6 +24,13 @@

#include <fcntl.h>

#ifdef CARLA_OS_WIN
# include <io.h>
# define close _close
# define dup _dup
# define dup2 _dup2
#endif

using CARLA_BACKEND_NAMESPACE::EngineCallbackFunc;

// -----------------------------------------------------------------------
@@ -82,7 +89,7 @@ public:
#endif

fStdOut = dup(stdout_fileno);
fStdErr = dup(STDERR_FILENO);
fStdErr = dup(stderr_fileno);

dup2(pipe1, stdout_fileno);
dup2(pipe1, stderr_fileno);
@@ -114,8 +121,8 @@ public:
const int stderr_fileno = STDERR_FILENO;
#endif

dup2(fStdOut, STDOUT_FILENO);
dup2(fStdErr, STDERR_FILENO);
dup2(fStdOut, stdout_fileno);
dup2(fStdErr, stderr_fileno);
close(fStdOut);
close(fStdErr);
fStdOut = -1;
@@ -224,6 +231,7 @@ private:

#ifdef CARLA_OS_WIN
# undef close
# undef dup
# undef dup2
#endif



Loading…
Cancel
Save