DentonW / DevIL

Developer's Image Library (DevIL) is a cross-platform image library utilizing a simple syntax to load, save, convert, manipulate, filter, and display a variety of images with ease. It is highly portable and has been ported to several platforms.
http://openil.sourceforge.net/
GNU Lesser General Public License v2.1
446 stars 138 forks source link

CMake's find_package() interoperability? #64

Open m-7761 opened 7 years ago

m-7761 commented 7 years ago

I've been trying to link to a DevIL installation to /usr/local/lib. In there there is a cmake/ folder with some files for different packages. I think find_package() defaults to these files. DevIL does not add itself to this folder.

I believe the following two files are involved, and possibly the whole of the story. They are copied somehow by the "install" make target.

https://github.com/bulletphysics/bullet3/blob/master/UseBullet.cmake https://github.com/bulletphysics/bullet3/blob/master/BulletConfig.cmake.in

I can find DevIL with CMake's pkg_check_modules() instead. However pkg-config doesn't look inside the /usr/local folder by default. I know its path can be set with its --define-variable option, but in general I'm having a hell of a time to try to get pkg-config to look in /usr/local. I think it's designed for packages released via normal channels; so I think this other pathway should be used. CMake does look in /usr/local/lib/cmake.

Right now I made a symlink from /lib/pkgconfig/IL.pc to the /usr/local one.

(I will try to help if I can. I'm trying figure this out myself. I inherit DevIL via the old COLLADA-DOM project. And the Bullet library also.)

P.S. I recently installed the Sourceforge.net files. They were a headache to make work requiring many manual fixes. The files here (once I found them) went off without a hitch. I think the release versions are the same.

ShalokShalom commented 6 years ago

This is still relevant?

m-7761 commented 6 years ago

If the feature (find_package support) is not implemented, then yes! ALSO, While I'm here, I'm trying to release a rewrite of this project (COLLADA-DOM) and as it happens, one of the last remaining problems I'm having is packaging DevIL for Windows. The problem is of course, the litany of dependencies. I've looked at Windows package managers, and there just wasn't any way to do it last I tried. I feel like DevIL should be solving this problem for users so that it can be done once and not once for every user; because it's a lot to do, and a lot to put on users. It's a shame that it works without any hassle on every popular system, except Windows.

edin-m commented 6 years ago

For Windows, you can download cmake binary distribution package through ExternalProject_Add.

m-7761 commented 6 years ago

@edin-m I think the problem I ran into, is the binaries were built with a very recent version of Visual Studio that links against a DLL and is not built with the flavor that works with Windows XP. To be truly functional binaries, they need to have the CRT built into the binary, and they need to use an XP compatible CRT. (Edit: by useful I mean that, if the binary is not inclusive, then there's always users that will need to build their own binaries. So it doesn't solve the problem of helping people build the dependent package for everybody, and so it doesn't solve anything really.)

ShalokShalom commented 6 years ago

You can use Habitat.

Its a cross platform packaging manager, which bundles all the deps and even metadata into the app.

Their developers seem to prefer "cloud" overall their homepage, since they make money with such services. It works with regular desktop applications as well and is written in Rust.

Rollbacks are supported. The community is friendly and as said, focused on server/cloud apps.