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

Build script for macOS #14

Open
TidbitSoftware opened this issue Aug 19, 2023 · 5 comments
Open

Build script for macOS #14

TidbitSoftware opened this issue Aug 19, 2023 · 5 comments

Comments

@TidbitSoftware
Copy link

I have successfully compiled on macOS (Intel-based machine) and am posting here the build script I used, including documentation on external packages installed via Homebrew. Hope it saves someone else some time!

#!/bin/bash

# Installed dependencies with,
#
#	brew install opencv sdl2 sdl2_image sdl12-compat
#
# Usage:
#
#	cd Poppy
#	src/poppy img1.png img2.png imgN.png
#
# NOTE: Uncomment PREFIX line and set to desired install location, and 
# uncomment `make install` line to install. Default install location is 
# <POPPY_SRC>/src/src.
#
# Sources:
# - https://github.com/kallaballa/Poppy
#

#PREFIX="<INSTALL_PATH>/install" # Set to location where external package should be installed

# Download source
git clone https://github.com/kallaballa/Poppy.git

# Move source into 'src' directory
mv Poppy src
rm -rf Poppy

# Patch Makefile
sed -i'' -e 's|SDL_image|SDL2_image|' src/Makefile

# Compile and install
cd src
make -j 4
#make install
@kallaballa
Copy link
Owner

Very nice! Thank you! I will include it somehow.

@lasconic
Copy link

Thank you for these instructions. I managed to compile on Mac M1.
No need for the sed command and I installed SDL and not SDL2 via brew.

@TidbitSoftware
Copy link
Author

@lasconic I'm happy to hear it was useful!

@sverspecht
Copy link

Thank you for these instructions. I managed to compile on Mac M1. No need for the sed command and I installed SDL and not SDL2 via brew.

Hello, @lasconic
I've tried (several times) but I'm still stucked with:

In file included from poppy.cpp:2: ./canvas.hpp:5:10: fatal error: 'SDL/SDL.h' file not found #include <SDL/SDL.h>

I've uninstalled and reinstalled SDL2 with brew without success.

Any idea? I would like to be able to run this without having to run it on a virtual machine...

Thanks!

Réponse en français possible ;) Bonne journée!

@kallaballa
Copy link
Owner

you need SDL1.3 :)

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

No branches or pull requests

4 participants