kroyee / SpeedBlocks

Fast paced tetris game cloned from Cultris II
GNU Lesser General Public License v3.0
11 stars 7 forks source link

Added basic cmake build functionality #43

Closed Noir- closed 7 years ago

Noir- commented 7 years ago

At the moment it depends on a directory named TGUI-0.7.3 where the include files are stored. I could only test this on Linux so it might need some additions to work on windows and mac I guess.

I'll add build instructions to the wiki.

texus commented 7 years ago

I would move the include_directories for SFML and TGUI to below the find_package calls, so that you can just do this:

include_directories(${SFML_INCLUDE_DIR})
include_directories(${TGUI_INCLUDE_DIR})

These variables are set after find_package found the libraries and headers.

I would also suggest installing TGUI (running make install on linux) so that you don't have to manually specify the include location. If you do have to manually specify the include or lib location (e.g. when running on windows) then you just have to set the SFML_ROOT/TGUI_ROOT in cmake to guide the find_package call to the correct folder.

Edit: Maybe also change "0.7.3" in find_package to "0.7" so that you don't have to update the cmake script every time I push a new patch release.

kroyee commented 7 years ago

This looks like a great start. Do you want to implement some of the suggested changes before merge?

Noir- commented 7 years ago

Yup, I will fix this before merge. At the moment I'm implementing the bug report server.

Noir- commented 7 years ago

I guess I need a new PR for the changes I made so im closing this one.