Skip to content

Commit

Permalink
Sentinel for DGL_USE_WEB_VIEW is not needed, fix build
Browse files Browse the repository at this point in the history
Signed-off-by: falkTX <falktx@falktx.com>
  • Loading branch information
falkTX committed May 24, 2024
1 parent 89adb5f commit 3be92f5
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 27 deletions.
9 changes: 6 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@ include Makefile.base.mk

all: dgl examples gen

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

# needed for some example plugins
export USE_FILE_BROWSER = true

ifneq ($(CROSS_COMPILING),true)
CAN_GENERATE_TTL = true
Expand Down Expand Up @@ -53,7 +56,7 @@ endif
tests: dgl
$(MAKE) -C tests

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

clean:
$(MAKE) clean -C dgl
Expand All @@ -73,6 +76,6 @@ clean:
$(MAKE) clean -C utils/lv2-ttl-generator
rm -rf bin build

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

.PHONY: dgl examples tests
10 changes: 2 additions & 8 deletions dgl/Application.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ START_NAMESPACE_DGL
/**
This set of static variables act as a build sentinel that detects a configuration error.
Usually this means the way DGL was built and how it is being used and linked into your program are different,
Usually this means the way DGL was built and how it is being used and linked into your program is different,
we want to avoid such combinations as memory layout would then also be different
leading to all sort of nasty memory corruption issues.
leading to all sort of subtle but very nasty memory corruption issues.
Make sure the flags used to build DGL match the ones used by your program and the link errors should go away.
*/
Expand All @@ -54,12 +54,6 @@ BUILD_CONFIG_SENTINEL(fail_to_link_is_mismatch_dgl_use_file_browser_on)
BUILD_CONFIG_SENTINEL(fail_to_link_is_mismatch_dgl_use_file_browser_off)
#endif

#ifdef DGL_USE_WEB_VIEW
BUILD_CONFIG_SENTINEL(fail_to_link_is_mismatch_dgl_use_web_view_on)
#else
BUILD_CONFIG_SENTINEL(fail_to_link_is_mismatch_dgl_use_web_view_off)
#endif

#undef BUILD_CONFIG_SENTINEL

// --------------------------------------------------------------------------------------------------------------------
Expand Down
16 changes: 0 additions & 16 deletions dgl/src/Application.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,6 @@ BUILD_CONFIG_SENTINEL(fail_to_link_is_mismatch_dgl_use_file_browser_on)
BUILD_CONFIG_SENTINEL(fail_to_link_is_mismatch_dgl_use_file_browser_off)
#endif

#ifdef DGL_USE_WEB_VIEW
BUILD_CONFIG_SENTINEL(fail_to_link_is_mismatch_dgl_use_web_view_on)
#else
BUILD_CONFIG_SENTINEL(fail_to_link_is_mismatch_dgl_use_web_view_off)
#endif

#undef BUILD_CONFIG_SENTINEL

static inline
Expand All @@ -63,11 +57,6 @@ bool dpf_check_build_status() noexcept
fail_to_link_is_mismatch_dgl_use_file_browser_on.ok &&
#else
fail_to_link_is_mismatch_dgl_use_file_browser_off.ok &&
#endif
#ifdef DGL_USE_WEB_VIEW
fail_to_link_is_mismatch_dgl_use_web_view_on.ok &&
#else
fail_to_link_is_mismatch_dgl_use_web_view_off.ok &&
#endif
true
);
Expand Down Expand Up @@ -95,11 +84,6 @@ Application::Application(const bool isStandalone)
fail_to_link_is_mismatch_dgl_use_file_browser_on.ok = true;
#else
fail_to_link_is_mismatch_dgl_use_file_browser_off.ok = true;
#endif
#ifdef DGL_USE_WEB_VIEW
fail_to_link_is_mismatch_dgl_use_web_view_on.ok = true;
#else
fail_to_link_is_mismatch_dgl_use_web_view_off.ok = true;
#endif
DISTRHO_SAFE_ASSERT(dpf_check_build_status());
}
Expand Down

0 comments on commit 3be92f5

Please sign in to comment.