forked from minetest/minetest
-
Notifications
You must be signed in to change notification settings - Fork 11
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 . could not find a package configuration file provided by SDL2. #63
Comments
I overlooked Here is my makefile, which should work from any empty repo provided you run linux and installed the necessary system-wide dependencies. pwd = $(shell pwd)
name = $(notdir $(pwd))
venv = $(pwd)/.venv/bin/python
export IRRLICHT_REPO = "$(pwd)/irrlicht"
define git-clone
$(eval module_name = $(notdir $1))
# Add or update the repo as a submodule, or clone it.
git submodule add $1 || \
git submodule update --init "$(module_name)" || \
git clone --depth 1 $1
cd $(module_name) && git checkout $2
endef
.venv/bin/activate: minetest/bin/minetest
python -m venv --prompt minetest .venv
@echo "\nexport MPLBACKEND=''" >> .venv/bin/activate
. .venv/bin/activate && \
pip install -e ./minetest && \
pip install --upgrade protobuf==3.20.1 && \
cd minetest/scripts && \
./compile_proto.sh
# cmake . -DRUN_IN_PLACE=TRUE -DBUILD_HEADLESS=1 -DSDL2_DIR="$(pwd)/SDL/build/lib/cmake/SDL2/" &&
minetest/bin/minetest: minetest/games/minetest_game zmqpp/build/max-g++/libzmqpp.a
cd minetest && \
cmake . -DRUN_IN_PLACE=TRUE -DBUILD_HEADLESS=0 -DSDL2_DIR= && \
make -j$(shell nproc)
minetest/games/minetest_game: zmqpp/.git irrlicht/.git minetest/.git minetest_game/.git
@rm -r minetest/lib/zmqpp
@rm -r minetest/lib/irrlichtmt
@ln -s $(pwd)/zmqpp/ minetest/lib/zmqpp
@ln -s $(pwd)/irrlicht/ minetest/lib/irrlichtmt
@ln -s $(pwd)/minetest_game/ minetest/games/minetest_game || echo "minetest_game already linked"
minetest_game/.git:
$(call git-clone,https://github.com/minetest/minetest_game,master)
minetest/.git:
$(call git-clone,https://github.com/EleutherAI/minetest,develop)
irrlicht/.git:
$(call git-clone,https://github.com/EleutherAI/irrlicht,headless-rendering)
zmqpp/build/max-g++/libzmqpp.a: zmqpp/.git
cd zmqpp && make
zmqpp/.git:
$(call git-clone,https://github.com/zeromq/zmqpp,develop)
SDL/build/bin/sdl2-config: SDL/.git
mkdir SDL/build
cd SDL/build && \
../configure --prefix="$(pwd)/SDL/build" && \
make && \
make install
SDL/.git:
$(call git-clone,https://github.com/libsdl-org/SDL,release-2.26.2)
test: .venv/bin/activate
. .venv/bin/activate && \
python -m minetester.scripts.test_loop
clean:
rm -r .venv
rm -r irrlicht
rm -r SDL
rm -r minetest
rm -r minetest_game
rm -r zmqpp |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
On my arch machine with sdl2 installed, the
cmake . -DRUN_IN_PLACE=TRUE
command returns the errorThis is after having run the code from https://github.com/minetest/minetest/blob/master/doc/compiling/linux.md
sudo pacman -S base-devel libcurl-gnutls cmake libxi libpng sqlite libogg libvorbis openal freetype2 jsoncpp gmp luajit leveldb ncurses zstd git clone --depth 1 https://github.com/EleutherAI/minetest.git cd minetest git clone --depth 1 https://github.com/minetest/minetest_game.git games/minetest_game git clone --depth 1 https://github.com/minetest/irrlicht.git lib/irrlichtmt
The minetest version (https://github.com/minetest/minetest.git)
Successfully builds bin/minetest after running the above 2 shell scripts.
The text was updated successfully, but these errors were encountered: