Irrlicht-vcpkg port

Discuss about anything related to the Irrlicht Engine, or read announcements about any significant features or usage changes.
Post Reply
addi
Posts: 3
Joined: Sun Feb 10, 2019 9:16 am

Irrlicht-vcpkg port

Post by addi »

I dont know if this is the right subforum, if not, feel free to move it.

I recently created a portfile for irrlicht on vcpkg:
https://github.com/adrido/irrlicht-vcpkg

vcpkg is a C/C++ library manager that works on Windows, Linux and MacOS. ( https://github.com/Microsoft/vcpkg/)

It makes it very easy to manage c++ libaries especialy on windows. With this port it is possible to install Irrlicht with vcpkg too.
It is installed via vcpkg.exe install irrlicht to build x86 windows dynamic.
also vcpkg.exe install irrlicht[tools,fast-fpu]:x64-windows-static is possible, to install it with tools and fast maths for x64 windows but as a static lib.

It automatically downloads, builds and installs the dependencies zlib, libpng, jpeg, and bzip2.

To use the installation via
  1. MSBuild:
    1. Run .\vcpkg.exe integrate install
    2. Just use it in VisualStudio (include irrlicht.h and link to Irrlicht.lib)
    The irrlicht.dll and the dependencies are automatically copied to the build dir.
  2. CMake:
    1. In your CMakeLists.txt just add

      Code: Select all

      find_package(Irrlicht REQUIRED)
      target_link_libraries(main Irrlicht)
    2. execute cmake like

      Code: Select all

      cmake . -DCMAKE_TOOLCHAIN_FILE=[vcpkg root]\scripts\buildsystems\vcpkg.cmake

    CMake should add the correct include path and link to the Irrlicht.lib
    The Irrlicht.dll and its dependencies are also automatically copied to the bin dir
I would like to create a Pull Request to the official vcpkg repo. But before this needs some testing. Especially on Linux and MacOS.
It would also great if I would get some feedback, whether more features are required /wanted, or if this should also build the examples, etc...
The direct download url of the stable 8.4 version is realy long and I don't know if this will work over time.[1] If there is a shortcut that is save to use it would be great.
vcpkg works best if the package is downloaded from github or from another git service, but it seems Irrlicht is using a different vcs.

I also want to say thanks to Darktib for creating the CMakeLists.txt file. [2]

Regards
addi


[1] = https://downloads.sourceforge.net/proje ... autoselect
[2] = http://irrlicht.sourceforge.net/forum/v ... =9&t=50774
CuteAlien
Admin
Posts: 9734
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: Irrlicht-vcpkg port

Post by CuteAlien »

This subforum is OK I guess. But can't give much feedback as I'm not familiar yet with vcpkg. Still - sounds interesting.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
addi
Posts: 3
Joined: Sun Feb 10, 2019 9:16 am

Re: Irrlicht-vcpkg port

Post by addi »

Once you have a project that depends on various libraries, you should give it a try. ;-)

But (since im not familiar with sourceforge and the underlaying vcs) can you tell me if there is a shorter download link than this?
https://downloads.sourceforge.net/proje ... autoselect

In the best case even without the precompiled dll and examples.

Thanks
addi
CuteAlien
Admin
Posts: 9734
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: Irrlicht-vcpkg port

Post by CuteAlien »

You can leave out all parts of that link behind the zip (so remove everything starting from ?).
Without dll you can only download sources from svn: https://sourceforge.net/p/irrlicht/code/HEAD/tree/
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
addi
Posts: 3
Joined: Sun Feb 10, 2019 9:16 am

Re: Irrlicht-vcpkg port

Post by addi »

Thank you. Ill keep dowloading the sdk then. Or are there any plans to switch to git in the near future?
CuteAlien
Admin
Posts: 9734
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: Irrlicht-vcpkg port

Post by CuteAlien »

Far future yes, near future no.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Zitzu
Posts: 28
Joined: Sun Jul 03, 2005 9:18 am

Re: Irrlicht-vcpkg port

Post by Zitzu »

Hello, thanks for porting irrlicht to vcpkg. This is very handy to me.
Is it possible to build irrlicht with DirectX support? I tried installing the DirectX includes and now I have the DXSDK:DIR variable set to the right path, so I tried rebuilding irrlicht (well, I removed it, then reinstalled), but still no joy. Any hint?

Thanks,
Francesco
CuteAlien
Admin
Posts: 9734
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: Irrlicht-vcpkg port

Post by CuteAlien »

It's possible (I got it running here), but you have to use a DirectX9 SDK, not just the headers.
This page on MSDN may explain it a bit more: https://docs.microsoft.com/en-us/window ... dfrom=MSDN
I suspect the direct link would be this one (untested): https://www.microsoft.com/en-us/downloa ... px?id=6812

But it's been a while since I installed it from scratch (I installed it a few years ago and it's simply still on my PC).
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Zitzu
Posts: 28
Joined: Sun Jul 03, 2005 9:18 am

Re: Irrlicht-vcpkg port

Post by Zitzu »

Thanks, I'll give it a try. I did download the complete SDK from Microsoft but I choose to install just the headers... let's see if installing the whole thing helps it.

Many thanks for your reply.
Post Reply