Browse Source

Move some macros to config.h, fix linux build

Signed-off-by: falkTX <falktx@falktx.com>
master
falkTX 1 year ago
parent
commit
de1f498761
Signed by: falkTX <falktx@falktx.com> GPG Key ID: CDBAA37ABC74FBA0
4 changed files with 78 additions and 35 deletions
  1. +4
    -0
      plugins/ProM/DistrhoUIProM.cpp
  2. +1
    -1
      plugins/ProM/DistrhoUIProM.hpp
  3. +24
    -34
      plugins/ProM/Makefile
  4. +49
    -0
      plugins/ProM/config.h

+ 4
- 0
plugins/ProM/DistrhoUIProM.cpp View File

@@ -32,6 +32,10 @@ DistrhoUIProM::DistrhoUIProM()
// if (d_isNotZero(scaleFactor))
// setSize(512*scaleFactor, 512*scaleFactor)
setGeometryConstraints(512, 512, true);

// no need to show resize handle if window is user-resizable
// if (isResizable())
// fResizeHandle.hide();
}

DistrhoUIProM::~DistrhoUIProM()


+ 1
- 1
plugins/ProM/DistrhoUIProM.hpp View File

@@ -1,6 +1,6 @@
/*
* DISTRHO ProM Plugin
* Copyright (C) 2015 Filipe Coelho <falktx@falktx.com>
* Copyright (C) 2015-2021 Filipe Coelho <falktx@falktx.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public


+ 24
- 34
plugins/ProM/Makefile View File

@@ -104,7 +104,9 @@ ifeq ($(HAVE_PROJECTM),true)
BASE_FLAGS += -DPROJECTM_DATA_DIR='"$(shell pkg-config --variable=pkgdatadir libprojectM)"'
BASE_FLAGS += $(shell pkg-config --cflags libprojectM)
LINK_FLAGS += $(shell pkg-config --libs libprojectM)
else
else # HAVE_PROJECTM
# compiler macros
BASE_FLAGS += -DDATADIR_PATH='"."'
# include dirs
BASE_FLAGS += -IprojectM/src
BASE_FLAGS += -IprojectM/src/libprojectM
@@ -113,45 +115,33 @@ BASE_FLAGS += -IprojectM/src/libprojectM/Renderer/hlslparser/src
BASE_FLAGS += -IprojectM/src/libprojectM/MilkdropPresetFactory
BASE_FLAGS += -IprojectM/src/libprojectM/NativePresetFactory
BASE_FLAGS += -IprojectM/vendor
# compiler macros
BASE_FLAGS += -Dprojectm_mac=1
BASE_FLAGS += -DHAVE_ALIGNED_ALLOC=1
BASE_FLAGS += -DHAVE_DLFCN_H=1
BASE_FLAGS += -DHAVE_FTS_H=1
BASE_FLAGS += -DHAVE_GL=1
# BASE_FLAGS += -DHAVE_GLES_GL_H=1
BASE_FLAGS += -DHAVE_GL_GL_H=1
BASE_FLAGS += -DHAVE_INTTYPES_H=1
# BASE_FLAGS += -DHAVE_LLVM=1
BASE_FLAGS += -DHAVE_MEMORY_H=1
BASE_FLAGS += -DHAVE_OPENGL_GL_H=1
BASE_FLAGS += -DHAVE_POSIX_MEMALIGN=1
BASE_FLAGS += -DHAVE_PTHREAD_PRIO_INHERIT=1
BASE_FLAGS += -DHAVE_STDINT_H=1
BASE_FLAGS += -DHAVE_STDLIB_H=1
BASE_FLAGS += -DHAVE_STRINGS_H=1
BASE_FLAGS += -DHAVE_STRING_H=1
BASE_FLAGS += -DHAVE_SYS_STAT_H=1
BASE_FLAGS += -DHAVE_SYS_TYPES_H=1
BASE_FLAGS += -DHAVE_UNISTD_H=1
BASE_FLAGS += -DHAVE_WINDOWS_H=1
BASE_FLAGS += -DSTDC_HEADERS=1
# BASE_FLAGS += -DUSE_GLES=1
BASE_FLAGS += -DUSE_THREADS=1
# self-contained build
BASE_FLAGS += -DDATADIR_PATH='"."'
# silence projectM warnings
BASE_FLAGS += -Wno-constant-conversion
BASE_FLAGS += -Wno-delete-non-abstract-non-virtual-dtor
BASE_FLAGS += -Wno-ignored-qualifiers
BASE_FLAGS += -Wno-mismatched-tags
BASE_FLAGS += -Wno-implicit-fallthrough
BASE_FLAGS += -Wno-maybe-uninitialized
BASE_FLAGS += -Wno-overflow
BASE_FLAGS += -Wno-shift-negative-value
BASE_FLAGS += -Wno-sign-compare
BASE_FLAGS += -Wno-unused-but-set-variable
BASE_FLAGS += -Wno-unused-parameter
BASE_FLAGS += -Wno-unused-variable
# maybe maybe
# projectm_mac
# -fopenmp
ifeq ($(MACOS),true)
BASE_FLAGS += -Wno-constant-conversion
BASE_FLAGS += -Wno-delete-non-abstract-non-virtual-dtor
BASE_FLAGS += -Wno-mismatched-tags
endif
# openmp (optional)
ifeq ($(DISABLE_OPENMP),)
ifneq ($(MACOS),true)
CUSTOM_BUILD_FLAGS += -D_OPENMP -fopenmp
CUSTOM_LINK_FLAGS += -fopenmp
endif # MACOS
endif # DISABLE_OPENMP
# extra linker flags
ifneq ($(HAIKU_OR_MACOS_OR_WINDOWS),true)
LINK_FLAGS += -ldl
endif # HAIKU_OR_MACOS_OR_WINDOWS
endif # HAVE_PROJECTM

LINK_FLAGS += -lpthread



+ 49
- 0
plugins/ProM/config.h View File

@@ -0,0 +1,49 @@
/*
* DISTRHO ProM Plugin
* Copyright (C) 2015-2021 Filipe Coelho <falktx@falktx.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* For a full copy of the license see the LICENSE file.
*/

#pragma once

#define HAVE_ALIGNED_ALLOC 1
#define HAVE_DLFCN_H 1
#define HAVE_FTS_H 1
#define HAVE_GL 1
#define HAVE_GL_GL_H 1
#define HAVE_INTTYPES_H 1
#define HAVE_MEMORY_H 1
#define HAVE_OPENGL_GL_H 1
#define HAVE_POSIX_MEMALIGN 1
#define HAVE_PTHREAD_PRIO_INHERIT 1
#define HAVE_STDINT_H 1
#define HAVE_STDLIB_H 1
#define HAVE_STRINGS_H 1
#define HAVE_STRING_H 1
#define HAVE_SYS_STAT_H 1
#define HAVE_SYS_TYPES_H 1
#define HAVE_UNISTD_H 1
#define HAVE_WINDOWS_H 1
#define STDC_HEADERS 1
#define USE_THREADS 1

// GLES stuff
/*
#define HAVE_GLES_GL_H 1
#define USE_GLES 1
*/

// Experimental
/*
#define HAVE_LLVM 1
*/

Loading…
Cancel
Save