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

Replace ZLib With A Submodules (v3.0) #94

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: Install Dependencies
run: |
sudo apt-get update
sudo apt-get install --no-install-recommends -y build-essential cmake ninja-build libopenal-dev libsdl2-dev
sudo apt-get install --no-install-recommends -y build-essential cmake ninja-build libopenal-dev libsdl2-dev libpng-dev zlib1g-dev
- name: Build Desktop
run: |
cd platforms/sdl
Expand Down
5 changes: 4 additions & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
[submodule "thirdparty/coi-serviceworker"]
path = thirdparty/coi-serviceworker
url = https://github.com/gzuidhof/coi-serviceworker
url = https://github.com/gzuidhof/coi-serviceworker.git
[submodule "thirdparty/gles-compatibility-layer"]
path = thirdparty/gles-compatibility-layer
url = https://github.com/TheBrokenRail/gles-compatibility-layer.git
[submodule "thirdparty/zlib"]
path = thirdparty/zlib
url = https://github.com/madler/zlib.git
1 change: 1 addition & 0 deletions platforms/sdl/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ target_link_libraries(reminecraftpe reminecraftpe-openal)

# LibPNG (If Needed)
if(NOT EMSCRIPTEN)
# System LibPNG
find_package(PNG REQUIRED)
target_link_libraries(reminecraftpe PNG::PNG)
endif()
Expand Down
14 changes: 13 additions & 1 deletion source/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -240,16 +240,28 @@ add_subdirectory(../thirdparty/raknet raknet)
target_link_libraries(reminecraftpe-core PUBLIC raknet)

# zlib
add_subdirectory(../thirdparty/zlib zlib)
add_library(zlib INTERFACE)
if(EMSCRIPTEN)
# Use Emscripten's ZLib
set(ZLIB_FLAG -sUSE_ZLIB=1)
target_compile_options(zlib INTERFACE "${ZLIB_FLAG}")
target_link_options(zlib INTERFACE "${ZLIB_FLAG}")
else()
# Use System ZLib
find_package(ZLIB REQUIRED)
target_link_libraries(zlib INTERFACE ZLIB::ZLIB)
endif()
target_link_libraries(reminecraftpe-core PUBLIC zlib)

# SDL
add_library(SDL INTERFACE)
if(EMSCRIPTEN)
# Use Emscripten's SDL2
set(SDL_FLAG -sUSE_SDL=2)
target_compile_options(SDL INTERFACE "${SDL_FLAG}")
target_link_options(SDL INTERFACE "${SDL_FLAG}")
else()
# Use System SDL2
find_package(SDL2 REQUIRED)
target_link_libraries(SDL INTERFACE SDL2::SDL2)
endif()
Expand Down
1 change: 1 addition & 0 deletions thirdparty/zlib
Submodule zlib added at 04f42c
22 changes: 0 additions & 22 deletions thirdparty/zlib/CMakeLists.txt

This file was deleted.

22 changes: 0 additions & 22 deletions thirdparty/zlib/LICENSE

This file was deleted.

186 changes: 0 additions & 186 deletions thirdparty/zlib/adler32.c

This file was deleted.

86 changes: 0 additions & 86 deletions thirdparty/zlib/compress.c

This file was deleted.

Loading