Page 1 of 1

Irrlicht-vcpkg port

Posted: Sun Feb 10, 2019 10:12 am
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

Re: Irrlicht-vcpkg port

Posted: Mon Feb 11, 2019 10:34 pm
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.

Re: Irrlicht-vcpkg port

Posted: Wed Feb 13, 2019 3:52 pm
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

Re: Irrlicht-vcpkg port

Posted: Wed Feb 13, 2019 10:17 pm
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/

Re: Irrlicht-vcpkg port

Posted: Fri Feb 15, 2019 2:04 pm
by addi
Thank you. Ill keep dowloading the sdk then. Or are there any plans to switch to git in the near future?

Re: Irrlicht-vcpkg port

Posted: Fri Feb 15, 2019 9:57 pm
by CuteAlien
Far future yes, near future no.

Re: Irrlicht-vcpkg port

Posted: Fri May 22, 2020 9:38 am
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

Re: Irrlicht-vcpkg port

Posted: Fri May 22, 2020 1:34 pm
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).

Re: Irrlicht-vcpkg port

Posted: Sat May 23, 2020 1:59 pm
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.