Coder Social home page Coder Social logo

Comments (6)

ferdnyc avatar ferdnyc commented on June 16, 2024

Meson doesn't have the same issue, because the fake curl_dep is configured as a disabler when get_option('webready') is false. So, setting it as a dependency of conntest automatically removes it from the list of executables to be compiled.

exiv2/meson.build

Lines 70 to 74 in 41959b4

if get_option('webready')
curl_dep = dependency('libcurl', disabler: true, required: get_option('curl'))
else
curl_dep = dependency('', disabler: true, required: false)
endif

exiv2/meson.build

Lines 158 to 165 in 41959b4

samples = {
'addmoddel': [],
'conntest': curl_dep,
'convert-test': [],
'easyaccess-test': [],
'exifcomment': [],
'exifdata-test': [],
'exifdata': [],

exiv2/meson.build

Lines 192 to 194 in 41959b4

foreach s, d : samples
executable(s, 'samples/@[email protected]'.format(s), dependencies: [exiv2_dep, d], include_directories: exiv2inc)
endforeach

from exiv2.

kmilos avatar kmilos commented on June 16, 2024

Thank you for the report and the suggested fix. Are you able to submit a PR directly perhaps?

from exiv2.

ferdnyc avatar ferdnyc commented on June 16, 2024

...Actually, that Meson code seems strange to me — curl_dep is also set as a disabler when get_option('webready') is true, but it's also set required. (The first branch of the conditional is a bit odd there, as we already know get_option('webready') is true if we're on that branch.)

But dependency(..., disabler: true, required: true) seems like a nonsensical combination of options. In fact I'll be a bit surprised if Meson doesn't grumble about it, if the build is configured that way.

The net effect of all that is that curl is required when building a webready exiv2, which isn't the case in the CMake configuration. There, it's permissible to build with -DEXIV2_ENABLE_WEBREADY=1 -DEXIV2_ENABLE_CURL=0, and conntest does build and work (supporting http:// URLs only) even without curl.

from exiv2.

ferdnyc avatar ferdnyc commented on June 16, 2024

Thank you for the report and the suggested fix. Are you able to submit a PR directly perhaps?

Sure, will do.

from exiv2.

kmilos avatar kmilos commented on June 16, 2024

Actually, that Meson code seems strange to me

@neheb can best comment on Meson...

from exiv2.

ferdnyc avatar ferdnyc commented on June 16, 2024

(The first branch of the conditional is a bit odd there, as we already know get_option('webready') is true if we're on that branch.)

But dependency(..., disabler: true, required: true) seems like a nonsensical combination of options. In fact I'll be a bit surprised if Meson doesn't grumble about it, if the build is configured that way.

Nope, I read that wrong. I had it in my head that the code was,

if get_option('webready')
  curl_dep = dependency(
    'libcurl', disabler: true, required: get_option('webready'))

But it's not, it's

  curl_dep = dependency(
    'libcurl', disabler: true, required: get_option('curl'))

My mistake, sorry.

But the curl-is-effectively-required thing is still somewhat the case. (It will only affect conntest, though, since curl_dep isn't set as a library dependency unless curl_dep.found() is true. That way it will never disable the library build.)

But a disabler curl_dep will prevent the build of conntest when libcurl isn't available. In CMake, conntest — like libexiv2 itself — can be built "webready" with limited, HTTP-only support, even if it's not linked to curl.

from exiv2.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.