Browse Source

Fix SYSDEPS build

Signed-off-by: falkTX <falktx@falktx.com>
tags/22.02
falkTX 4 years ago
parent
commit
34e3c0f782
Signed by: falkTX <falktx@falktx.com> GPG Key ID: CDBAA37ABC74FBA0
5 changed files with 20 additions and 4 deletions
  1. +7
    -1
      plugins/Cardinal/src/Carla.cpp
  2. +7
    -1
      plugins/Cardinal/src/Ildaeil.cpp
  3. +3
    -1
      plugins/Makefile
  4. +1
    -0
      src/Makefile
  5. +2
    -1
      src/Makefile.cardinal.mk

+ 7
- 1
plugins/Cardinal/src/Carla.cpp View File

@@ -23,10 +23,12 @@
#include "water/streams/MemoryOutputStream.h" #include "water/streams/MemoryOutputStream.h"
#include "water/xml/XmlDocument.h" #include "water/xml/XmlDocument.h"


extern "C" {
#ifndef CARDINAL_SYSDEPS
// private method that takes ownership, we can use it to avoid superfulous allocations // private method that takes ownership, we can use it to avoid superfulous allocations
extern "C" {
json_t *jsonp_stringn_nocheck_own(const char* value, size_t len); json_t *jsonp_stringn_nocheck_own(const char* value, size_t len);
} }
#endif


#define BUFFER_SIZE 128 #define BUFFER_SIZE 128


@@ -245,7 +247,11 @@ struct CarlaModule : Module {
engine->saveProjectInternal(projectState); engine->saveProjectInternal(projectState);


const size_t dataSize = projectState.getDataSize(); const size_t dataSize = projectState.getDataSize();
#ifndef CARDINAL_SYSDEPS
return jsonp_stringn_nocheck_own(static_cast<const char*>(projectState.getDataAndRelease()), dataSize); return jsonp_stringn_nocheck_own(static_cast<const char*>(projectState.getDataAndRelease()), dataSize);
#else
return json_stringn(static_cast<const char*>(projectState.getData()), dataSize);
#endif
} }


void dataFromJson(json_t* const rootJ) override void dataFromJson(json_t* const rootJ) override


+ 7
- 1
plugins/Cardinal/src/Ildaeil.cpp View File

@@ -26,10 +26,12 @@
#include "water/streams/MemoryOutputStream.h" #include "water/streams/MemoryOutputStream.h"
#include "water/xml/XmlDocument.h" #include "water/xml/XmlDocument.h"


extern "C" {
#ifndef CARDINAL_SYSDEPS
// private method that takes ownership, we can use it to avoid superfulous allocations // private method that takes ownership, we can use it to avoid superfulous allocations
extern "C" {
json_t *jsonp_stringn_nocheck_own(const char* value, size_t len); json_t *jsonp_stringn_nocheck_own(const char* value, size_t len);
} }
#endif


#define BUFFER_SIZE 128 #define BUFFER_SIZE 128


@@ -237,7 +239,11 @@ struct IldaeilModule : Module {
engine->saveProjectInternal(projectState); engine->saveProjectInternal(projectState);


const size_t dataSize = projectState.getDataSize(); const size_t dataSize = projectState.getDataSize();
#ifndef CARDINAL_SYSDEPS
return jsonp_stringn_nocheck_own(static_cast<const char*>(projectState.getDataAndRelease()), dataSize); return jsonp_stringn_nocheck_own(static_cast<const char*>(projectState.getDataAndRelease()), dataSize);
#else
return json_stringn(static_cast<const char*>(projectState.getData()), dataSize);
#endif
} }


void dataFromJson(json_t* const rootJ) override void dataFromJson(json_t* const rootJ) override


+ 3
- 1
plugins/Makefile View File

@@ -531,7 +531,9 @@ BASE_FLAGS += -I../src/Rack/dep/oui-blendish
BASE_FLAGS += -I../src/Rack/dep/pffft BASE_FLAGS += -I../src/Rack/dep/pffft
BASE_FLAGS += -pthread BASE_FLAGS += -pthread


ifneq ($(SYSDEPS),true)
ifeq ($(SYSDEPS),true)
BASE_FLAGS += -DCARDINAL_SYSDEPS
else
BASE_FLAGS += -DZSTDLIB_VISIBILITY= BASE_FLAGS += -DZSTDLIB_VISIBILITY=
BASE_FLAGS += -I../src/Rack/dep/include BASE_FLAGS += -I../src/Rack/dep/include
endif endif


+ 1
- 0
src/Makefile View File

@@ -36,6 +36,7 @@ BASE_FLAGS += -I../include
BASE_FLAGS += -I../include/neon-compat BASE_FLAGS += -I../include/neon-compat
BASE_FLAGS += -IRack/include BASE_FLAGS += -IRack/include
ifeq ($(SYSDEPS),true) ifeq ($(SYSDEPS),true)
BASE_FLAGS += -DCARDINAL_SYSDEPS
BASE_FLAGS += $(shell pkg-config --cflags jansson libarchive samplerate speexdsp) BASE_FLAGS += $(shell pkg-config --cflags jansson libarchive samplerate speexdsp)
else else
BASE_FLAGS += -DZSTDLIB_VISIBILITY= BASE_FLAGS += -DZSTDLIB_VISIBILITY=


+ 2
- 1
src/Makefile.cardinal.mk View File

@@ -133,9 +133,10 @@ BASE_FLAGS += -I../../include
BASE_FLAGS += -I../../include/neon-compat BASE_FLAGS += -I../../include/neon-compat
BASE_FLAGS += -I../Rack/include BASE_FLAGS += -I../Rack/include
ifeq ($(SYSDEPS),true) ifeq ($(SYSDEPS),true)
BASE_FLAGS += -DZSTDLIB_VISIBILITY=
BASE_FLAGS += -DCARDINAL_SYSDEPS
BASE_FLAGS += $(shell pkg-config --cflags jansson libarchive samplerate speexdsp) BASE_FLAGS += $(shell pkg-config --cflags jansson libarchive samplerate speexdsp)
else else
BASE_FLAGS += -DZSTDLIB_VISIBILITY=
BASE_FLAGS += -I../Rack/dep/include BASE_FLAGS += -I../Rack/dep/include
endif endif
BASE_FLAGS += -I../Rack/dep/glfw/include BASE_FLAGS += -I../Rack/dep/glfw/include


Loading…
Cancel
Save