Browse Source

Fix/force windows builds

Signed-off-by: falkTX <falktx@falktx.com>
tags/22.02
falkTX 3 years ago
parent
commit
f9acd503cc
Signed by: falkTX <falktx@falktx.com> GPG Key ID: CDBAA37ABC74FBA0
5 changed files with 37 additions and 1 deletions
  1. +1
    -0
      include/common.hpp
  2. +2
    -0
      include/mingw-compat/Windows.h
  3. +32
    -0
      include/rack.hpp
  4. +0
    -1
      plugins/Makefile
  5. +2
    -0
      src/Makefile

+ 1
- 0
include/common.hpp View File

@@ -19,6 +19,7 @@


#include_next "common.hpp" #include_next "common.hpp"


// Make binary resources work the same no matter the OS
#undef BINARY #undef BINARY
#undef BINARY_START #undef BINARY_START
#undef BINARY_END #undef BINARY_END


+ 2
- 0
include/mingw-compat/Windows.h View File

@@ -15,4 +15,6 @@
* For a full copy of the GNU General Public License see the LICENSE file. * For a full copy of the GNU General Public License see the LICENSE file.
*/ */


#pragma once

#include <windows.h> #include <windows.h>

+ 32
- 0
include/rack.hpp View File

@@ -0,0 +1,32 @@
/*
* DISTRHO Cardinal Plugin
* Copyright (C) 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 General Public License as
* published by the Free Software Foundation; either version 3 of
* the License, or any later version.
*
* 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 General Public License for more details.
*
* For a full copy of the GNU General Public License see the LICENSE file.
*/

#pragma once

#include_next "rack.hpp"

// If building for Windows, make sure to import the windows header now so we can undef some stuff
#ifdef _WIN32
# include <windows.h>
# undef IN
# undef OUT
# undef VOID
# undef far
# undef near
# define ABC ABC_
# define VOID VOID_
#endif

+ 0
- 1
plugins/Makefile View File

@@ -175,7 +175,6 @@ PLUGIN_FILES += $(wildcard JW-Modules/lib/oscpack/ip/*.cpp)
PLUGIN_FILES += $(wildcard JW-Modules/lib/oscpack/osc/*.cpp) PLUGIN_FILES += $(wildcard JW-Modules/lib/oscpack/osc/*.cpp)
ifeq ($(WINDOWS),true) ifeq ($(WINDOWS),true)
PLUGIN_FILES += $(wildcard JW-Modules/lib/oscpack/ip/win32/*.cpp) PLUGIN_FILES += $(wildcard JW-Modules/lib/oscpack/ip/win32/*.cpp)
# LDFLAGS += -lws2_32 -lwinmm
else else
PLUGIN_FILES += $(wildcard JW-Modules/lib/oscpack/ip/posix/*.cpp) PLUGIN_FILES += $(wildcard JW-Modules/lib/oscpack/ip/posix/*.cpp)
endif endif


+ 2
- 0
src/Makefile View File

@@ -132,6 +132,8 @@ ifeq ($(MACOS),true)
LINK_FLAGS += -framework IOKit LINK_FLAGS += -framework IOKit
else ifeq ($(WINDOWS),true) else ifeq ($(WINDOWS),true)
LINK_FLAGS += -ldbghelp -lshlwapi LINK_FLAGS += -ldbghelp -lshlwapi
# needed by JW-Modules
EXTRA_LIBS += -lws2_32 -lwinmm
endif endif


# -------------------------------------------------------------- # --------------------------------------------------------------


Loading…
Cancel
Save