Comments (8)
@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.
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.
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.
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.
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.
Option 3: write
vcpkg-cmake-wrapper.cmake
for the port. Porttiff
does something similar.
No wrapper please. Only CMake config.
Sorry, yes. Wrap the official cmake module.
from vcpkg.
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.
Please re-open. This need a fix.
from vcpkg.
Related Issues (20)
- [boost-variant2] Build error on x86-windows-static HOT 1
- Non-ASCII username: Many things break HOT 5
- [boost-variant2] Build error on x64-linux HOT 2
- [boost-core] Build error on x64-windows-static HOT 2
- [boost-asio] Build error on x64-windows HOT 1
- [opengl] Build error on x64-windows HOT 1
- who can help me ? HOT 2
- [yasm] Build error on x64-windows HOT 1
- [python3] Build error on x64-osx HOT 1
- [libtorch] mimalloc build as dynamic library HOT 8
- [graphviz] Build error on arm64-osx-dynamic HOT 1
- [openblas] build failure HOT 5
- [winpcap] Build error on x64-windows HOT 1
- [qtbase] Build failure on arm64-osx HOT 2
- [nss] Build error on x64-windows HOT 2
- [openssl 1.1.1l] Build error on arm64-linux HOT 2
- [boost-coroutine] Build error on x64-windows HOT 2
- [boost-core] build failure in release 2024.05.24 - Failed to download from mirror set/File does not have the expected hash HOT 3
- [tomlplusplus] Build error on x64-windows HOT 2
- [wxwidgets] update to 3.2.5 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vcpkg.