Skip to content

Commit

Permalink
Add build config sentinel for DGL_NO_SHARED_RESOURCES
Browse files Browse the repository at this point in the history
Signed-off-by: falkTX <[email protected]>
  • Loading branch information
falkTX committed May 24, 2024
1 parent 3be92f5 commit 8f10cdc
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
6 changes: 6 additions & 0 deletions dgl/Application.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,12 @@ 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_NO_SHARED_RESOURCES
BUILD_CONFIG_SENTINEL(fail_to_link_is_mismatch_dgl_no_shared_resources_on)
#else
BUILD_CONFIG_SENTINEL(fail_to_link_is_mismatch_dgl_no_shared_resources_off)
#endif

#undef BUILD_CONFIG_SENTINEL

// --------------------------------------------------------------------------------------------------------------------
Expand Down
16 changes: 16 additions & 0 deletions dgl/src/Application.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,12 @@ 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_NO_SHARED_RESOURCES
BUILD_CONFIG_SENTINEL(fail_to_link_is_mismatch_dgl_no_shared_resources_on)
#else
BUILD_CONFIG_SENTINEL(fail_to_link_is_mismatch_dgl_no_shared_resources_off)
#endif

#undef BUILD_CONFIG_SENTINEL

static inline
Expand All @@ -57,6 +63,11 @@ 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_NO_SHARED_RESOURCES
fail_to_link_is_mismatch_dgl_no_shared_resources_on.ok &&
#else
fail_to_link_is_mismatch_dgl_no_shared_resources_off.ok &&
#endif
true
);
Expand Down Expand Up @@ -84,6 +95,11 @@ 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_NO_SHARED_RESOURCES
fail_to_link_is_mismatch_dgl_no_shared_resources_on.ok = true;
#else
fail_to_link_is_mismatch_dgl_no_shared_resources_off.ok = true;
#endif
DISTRHO_SAFE_ASSERT(dpf_check_build_status());
}
Expand Down

0 comments on commit 8f10cdc

Please sign in to comment.