Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmake: Use encapsulated + transitive target linking #39

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

eacousineau
Copy link

@eacousineau eacousineau commented Feb 9, 2019

I believe this might be one way to Resolve #6

Without this patch, compilation fails saying either (a) it can't find the SFML libraries or (b) if you have libsfml-dev installed, it finds the (incompatible older) dist library.
Doing make VERBOSE=1 indicates that the include dirs weren't propagating, so this worked for my CMake version (3.10.2, from apt).

My steps for compiling on Ubuntu 18.04:

# Prereqs: Mebbe some others needed.
sudo apt install libfreetype6-dev libx11-dev libxrandr-dev libudev-dev libflac-dev libogg-dev libvorbis-dev libopenal-dev

# Build SFML from source, install to local place.
git clone https://github.com/SFML/SFML.git 2.5.1
( set -eux;
  cd SFML
  mkdir build && cd build
  cmake .. -DCMAKE_INSTALL_PREFIX=~./local/opt/sfml/2.5.1
  make -j  X install
)

# Build this project.
git clone https://github.com/HackerPoet/MarbleMarcher
cd MarbleMarcher
( set -eux;
  mkdir build && cd build
  cmake .. -DCMAKE_PREFIX_PATH=~./local/opt/sfml/2.5.1
  make -j X
)

# Enjoy the psychadelics :)
./build/MarbleMarger
# ... and get lost in Hole-in-One :P

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant