Git Product home page Git Product logo

Comments (8)

JonLiu1993 avatar JonLiu1993 commented on June 7, 2024

@chicoferreira, Thanks for posting this issue, devil not provide find_package() usage, just provide pkg-config modules:

-- Fixing pkgconfig file: /Users/vcpkg/Jon/vcpkg/packages/devil_arm64-osx/lib/pkgconfig/IL.pc
-- Fixing pkgconfig file: /Users/vcpkg/Jon/vcpkg/packages/devil_arm64-osx/lib/pkgconfig/ILU.pc
-- Fixing pkgconfig file: /Users/vcpkg/Jon/vcpkg/packages/devil_arm64-osx/lib/pkgconfig/ILUT.pc
-- Fixing pkgconfig file: /Users/vcpkg/Jon/vcpkg/packages/devil_arm64-osx/debug/lib/pkgconfig/IL.pc
-- Fixing pkgconfig file: /Users/vcpkg/Jon/vcpkg/packages/devil_arm64-osx/debug/lib/pkgconfig/ILU.pc
-- Fixing pkgconfig file: /Users/vcpkg/Jon/vcpkg/packages/devil_arm64-osx/debug/lib/pkgconfig/ILUT.pc
-- Installing: /Users/vcpkg/Jon/vcpkg/packages/devil_arm64-osx/share/devil/copyright
-- Performing post-build validation
Elapsed time to handle devil:arm64-osx: 6.6 s
Total install time: 1.1 min
devil provides pkg-config modules:

    # Developer's Image Library - IL part (just image load/save)
    IL

    # Developer's Image Library - ILU part (image library utilities)
    ILU

    # Developer's Image Library - ILUT part (connection to higher level libraries)
    ILUT

from vcpkg.

chicoferreira avatar chicoferreira commented on June 7, 2024

How can I then use it both on Windows, Linux and MacOS with the same vcpkg.json and CMakeLists.txt?
The compilation works on Windows without needing to link .dll's but fails on Linux and Mac OS.

from vcpkg.

dg0yt avatar dg0yt commented on June 7, 2024

The default linux and osx triplets use static library linkage, the default windows triplet uses dynamic library linkage. I guess this explains the different observations.

from vcpkg.

chicoferreira avatar chicoferreira commented on June 7, 2024

I was expecting that vcpkg would abstract that and just link the package correctly in any supported OS, which it doesn't, or at least tell me how to do it like other packages do.

@JonLiu1993 as this issue is no longer marked as a bug, could you please tell me how could I do #38559 (comment)? Thank you for the support.

from vcpkg.

Osyotr avatar Osyotr commented on June 7, 2024

Option 1: use triplets with dynamic linkage (e.g. x64-linux-dynamic or arm64-osx-dynamic or x64-windows).
Option 2: instead of using find_package(DevIL REQUIRED) use pkg-config:

find_package(PkgConfig REQUIRED)
pkg_check_modules(DevIL REQUIRED IMPORTED_TARGET DevIL)
target_link_libraries(my_target PRIVATE PkgConfig::DevIL)

(Note that it's still possible that pkg-config files installed by devil don't express transitive dependencies properly. You may also need to add pkgconf to your dependencies list on windows.)
Option 3: write vcpkg-cmake-wrapper.cmake for the port. Port tiff does something similar.

from vcpkg.

dg0yt avatar dg0yt commented on June 7, 2024

Option 3: write vcpkg-cmake-wrapper.cmake for the port. Port tiff does something similar.

No wrapper please. Only CMake config.
Sorry, yes. Wrap the official cmake module.

from vcpkg.

chicoferreira avatar chicoferreira commented on June 7, 2024

Thank you for the options given. Unfortunately they didn't fit my needs so I end up switch from devil to stb which gives me the same features I needed.

from vcpkg.

dg0yt avatar dg0yt commented on June 7, 2024

Please re-open. This need a fix.

from vcpkg.

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.