blockattack / blockattack-game

Block Attack - Rise of the Blocks - the game
https://blockattack.net
GNU General Public License v2.0
34 stars 8 forks source link

json.h include path on (Arch) Linux #9

Closed ghost closed 7 years ago

ghost commented 7 years ago

On my Arch Linux system I have to change line 29 to #ifdef _WIN32

Otherwise the json.h header file is not found.

blockattack-game-2.0.1/source/code/sago/SagoSpriteHolder.cpp:30:31: fatal error: jsoncpp/json/json.h: No such file or directory
 #include <jsoncpp/json/json.h>
                               ^

I'm not sure if this is a problem on other distributions, too.

The path on my system is /usr/include/json/json.h

sago007 commented 7 years ago

Thank you. Looks like I was tricked by Debian/Ubuntu's placement: /usr/include/jsoncpp/json/json.h (properly due to naming conflict with just "json")

I looked into it and noticed that jsoncpp could use pkg-config. I have added it in this commit: https://github.com/blockattack/blockattack-game/commit/cabda704af0acac607bc602f1d00b57b873b0b9c

This is solved in master and will be ready for 2.1.0. Could you checkout "master" and test it?

ghost commented 7 years ago

Yes it works now. Thank you.

With the latest master I noticed that the man page, .desktop file and icons are installed to CMAKE_INSTALL_PREFIX/

I opened a PR for that.