Jump to content

Using Conan to get windows dependencies


Recommended Posts

@Itms recently asked me to try Conan on IRC. Conan is a C++ decentralized package manager that is supposed to make life easier for developers. 

https://conan.io/

So today I tried to make it work with the game and succeeded. It's still missing some libraries, but they are hard to build as they require cygwin, which takes a long time to install. I had no luck with wxwidgets either, the build just fails.

You need Cmake and python and a working visual studio 2015

In cmd cd to you libraries/win32 directory then;

pip install virtualenv
python -m virtualenv 
.\scripts\activate
pip install conan

 

Now let's add some repositories to get all our dependencies

For libcurl, libpng,openal,enet, sdl2,ogg,vorbis

conan remote add bincrafters https://api.bintray.com/conan/bincrafters/public-conan

For miniupnpc

conan remote add rhard https://api.bintray.com/conan/rhard/conan

For boost, zlib

conan remote add conan-community https://api.bintray.com/conan/conan-community/conan

 And another one just in case

conan remote add conan-transit https://api.bintray.com/conan/conan/conan-transit

 

If you want to find another package '*' are wildcards

conan search *boost* --remote=conan-center

 

Then all the magic happens in the python file, that's where you define the requirements and the build flags for the libraries

Currently not enabled, icu, iconv, wxwidgets.

Currently missing gltext (OpenGl)

Then finally run

load-libs.cmd > output.log

This will build the libraries one by one after downloading them, then place all the files in the correct folders.

Don't forget to apply the diff on premake :)

 

 

 

conan-premake.diff conanfile.py load-libs.cmd

0 A.D.Using Conan.docx

  • Like 3
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...