Skip to content

fix(build): make CURL optional so dflash_server links without libcurl#354

Merged
davide221 merged 1 commit into
Luce-Org:mainfrom
dusterbloom:split/01-curl-optional
Jun 9, 2026
Merged

fix(build): make CURL optional so dflash_server links without libcurl#354
davide221 merged 1 commit into
Luce-Org:mainfrom
dusterbloom:split/01-curl-optional

Conversation

@dusterbloom

Copy link
Copy Markdown
Collaborator

Re-carved from #274 as a standalone change off current main.

Gates all libcurl usage in http_server.cpp behind DFLASH_HAS_CURL; CMake builds dflash_server unconditionally and only defines the macro + links CURL::libcurl when find_package(CURL) succeeds. Without libcurl the passthrough proxy compiles out and the server still builds.

Re-carved (not cherry-picked): #294's passthrough-proxy added two curl_forward call sites (http_server.cpp:1888, :1909) beyond the original commit; both are now gated.

Verified on a box without libcurl-dev: cmake configure succeeds and http_server.cpp compiles clean with DFLASH_HAS_CURL undefined. 2 files, +34/-24.

Gate curl-dependent http_server code under DFLASH_HAS_CURL; CMake only
defines it + links CURL::libcurl when found.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 2 files

Re-trigger cubic

@davide221 davide221 merged commit e51cf56 into Luce-Org:main Jun 9, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants