Vendor Zenity For AppImages
This commit is contained in:
parent
8792e5749d
commit
07baea7b5a
4
.gitmodules
vendored
4
.gitmodules
vendored
@ -10,3 +10,7 @@
|
|||||||
path = dependencies/glfw/src
|
path = dependencies/glfw/src
|
||||||
url = https://github.com/glfw/glfw.git
|
url = https://github.com/glfw/glfw.git
|
||||||
shallow = true
|
shallow = true
|
||||||
|
[submodule "dependencies/zenity/src"]
|
||||||
|
path = dependencies/zenity/src
|
||||||
|
url = https://gitea.thebrokenrail.com/TheBrokenRail/zenity.git
|
||||||
|
shallow = true
|
||||||
|
@ -42,15 +42,10 @@ set(MCPI_INSTALL_DIR "lib/${MCPI_VARIANT_NAME}")
|
|||||||
set(MCPI_LIB_DIR "${MCPI_INSTALL_DIR}/lib")
|
set(MCPI_LIB_DIR "${MCPI_INSTALL_DIR}/lib")
|
||||||
set(MCPI_FALLBACK_LIB_DIR "${MCPI_INSTALL_DIR}/fallback-lib")
|
set(MCPI_FALLBACK_LIB_DIR "${MCPI_INSTALL_DIR}/fallback-lib")
|
||||||
|
|
||||||
# Optimizations
|
# Build Mode
|
||||||
if(NOT CMAKE_BUILD_TYPE)
|
if(NOT CMAKE_BUILD_TYPE)
|
||||||
set(CMAKE_BUILD_TYPE "Release")
|
set(CMAKE_BUILD_TYPE "Release")
|
||||||
endif()
|
endif()
|
||||||
if(CMAKE_BUILD_TYPE STREQUAL "Release")
|
|
||||||
add_compile_options(-O3)
|
|
||||||
else()
|
|
||||||
add_compile_options(-g)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# Start Project
|
# Start Project
|
||||||
project(minecraft-pi-reborn)
|
project(minecraft-pi-reborn)
|
||||||
@ -65,6 +60,13 @@ if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
|
|||||||
set(CMAKE_INSTALL_PREFIX "/usr" CACHE PATH "" FORCE)
|
set(CMAKE_INSTALL_PREFIX "/usr" CACHE PATH "" FORCE)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
# Optimizations
|
||||||
|
if(CMAKE_BUILD_TYPE STREQUAL "Release")
|
||||||
|
add_compile_options(-O3)
|
||||||
|
else()
|
||||||
|
add_compile_options(-g)
|
||||||
|
endif()
|
||||||
|
|
||||||
# Use LLD When Using Clang
|
# Use LLD When Using Clang
|
||||||
if(CMAKE_C_COMPILER_ID STREQUAL "Clang")
|
if(CMAKE_C_COMPILER_ID STREQUAL "Clang")
|
||||||
add_link_options("-fuse-ld=lld")
|
add_link_options("-fuse-ld=lld")
|
||||||
@ -73,6 +75,9 @@ endif()
|
|||||||
# PIC
|
# PIC
|
||||||
set(CMAKE_POSITION_INDEPENDENT_CODE TRUE)
|
set(CMAKE_POSITION_INDEPENDENT_CODE TRUE)
|
||||||
|
|
||||||
|
# Fast Math
|
||||||
|
add_compile_options(-ffast-math)
|
||||||
|
|
||||||
# Buld Dependencies
|
# Buld Dependencies
|
||||||
add_subdirectory(dependencies)
|
add_subdirectory(dependencies)
|
||||||
|
|
||||||
@ -83,9 +88,6 @@ add_definitions(-D_GNU_SOURCE)
|
|||||||
set(CMAKE_C_STANDARD 99)
|
set(CMAKE_C_STANDARD 99)
|
||||||
set(CMAKE_CXX_STANDARD 11)
|
set(CMAKE_CXX_STANDARD 11)
|
||||||
|
|
||||||
# Fast Math
|
|
||||||
add_compile_options(-ffast-math)
|
|
||||||
|
|
||||||
# Specify Constants
|
# Specify Constants
|
||||||
if(MCPI_SERVER_MODE)
|
if(MCPI_SERVER_MODE)
|
||||||
add_definitions(-DMCPI_SERVER_MODE)
|
add_definitions(-DMCPI_SERVER_MODE)
|
||||||
|
@ -6,4 +6,6 @@ macro(setup_toolchain target)
|
|||||||
set(CMAKE_FIND_ROOT_PATH "/usr/${target}" "/usr/lib/${target}")
|
set(CMAKE_FIND_ROOT_PATH "/usr/${target}" "/usr/lib/${target}")
|
||||||
# Extra
|
# Extra
|
||||||
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
|
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
|
||||||
|
# pkg-config
|
||||||
|
set(ENV{PKG_CONFIG_LIBDIR} "/usr/lib/${target}/pkgconfig:/usr/${target}/lib/pkgconfig:/usr/lib/pkgconfig:/usr/share/pkgconfig")
|
||||||
endmacro()
|
endmacro()
|
||||||
|
4
dependencies/CMakeLists.txt
vendored
4
dependencies/CMakeLists.txt
vendored
@ -16,3 +16,7 @@ endif()
|
|||||||
if(BUILD_NATIVE_COMPONENTS AND NOT MCPI_HEADLESS_MODE)
|
if(BUILD_NATIVE_COMPONENTS AND NOT MCPI_HEADLESS_MODE)
|
||||||
add_subdirectory(glfw)
|
add_subdirectory(glfw)
|
||||||
endif()
|
endif()
|
||||||
|
# Zenity (Minimal AppImage Build)
|
||||||
|
if(BUILD_NATIVE_COMPONENTS AND NOT MCPI_HEADLESS_MODE AND MCPI_IS_APPIMAGE_BUILD)
|
||||||
|
add_subdirectory(zenity)
|
||||||
|
endif()
|
||||||
|
15
dependencies/zenity/CMakeLists.txt
vendored
Normal file
15
dependencies/zenity/CMakeLists.txt
vendored
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
project(zenity)
|
||||||
|
|
||||||
|
# Silence Warnings
|
||||||
|
add_compile_options(-w)
|
||||||
|
|
||||||
|
## Zenity
|
||||||
|
|
||||||
|
# Download
|
||||||
|
add_subdirectory(src EXCLUDE_FROM_ALL)
|
||||||
|
|
||||||
|
# Ensure Build
|
||||||
|
add_custom_target(zenity-build ALL DEPENDS zenity)
|
||||||
|
|
||||||
|
# Install
|
||||||
|
install(TARGETS zenity DESTINATION "bin")
|
1
dependencies/zenity/src
vendored
Submodule
1
dependencies/zenity/src
vendored
Submodule
@ -0,0 +1 @@
|
|||||||
|
Subproject commit 6f08afb7989c420282654eee9dea9d5df01e914a
|
@ -29,7 +29,9 @@ const packages = [
|
|||||||
if (mode === 'client') {
|
if (mode === 'client') {
|
||||||
// GLFW's Dependencies Aren't Included As They Should Be Provided By The Host System
|
// GLFW's Dependencies Aren't Included As They Should Be Provided By The Host System
|
||||||
packages.push(
|
packages.push(
|
||||||
'zenity',
|
'libgtk-3-0',
|
||||||
|
'libglib2.0-0',
|
||||||
|
'libgdk-pixbuf2.0-0',
|
||||||
'libcanberra-gtk3-module',
|
'libcanberra-gtk3-module',
|
||||||
'libfreeimage3',
|
'libfreeimage3',
|
||||||
'libopenal1'
|
'libopenal1'
|
||||||
|
@ -51,6 +51,11 @@ queue_pkg \
|
|||||||
libxrandr-dev \
|
libxrandr-dev \
|
||||||
libxext-dev
|
libxext-dev
|
||||||
|
|
||||||
|
# Zenity Dependencies
|
||||||
|
queue_pkg \
|
||||||
|
libgtk-3-dev \
|
||||||
|
libglib2.0-dev
|
||||||
|
|
||||||
# ARM Packages
|
# ARM Packages
|
||||||
if [ ! -z "${ARM_PACKAGES_SUPPORTED}" ]; then
|
if [ ! -z "${ARM_PACKAGES_SUPPORTED}" ]; then
|
||||||
# Build Tools
|
# Build Tools
|
||||||
@ -72,6 +77,11 @@ if [ ! -z "${ARM_PACKAGES_SUPPORTED}" ]; then
|
|||||||
libxinerama-dev:armhf libxinerama-dev:arm64 \
|
libxinerama-dev:armhf libxinerama-dev:arm64 \
|
||||||
libxrandr-dev:armhf libxrandr-dev:arm64 \
|
libxrandr-dev:armhf libxrandr-dev:arm64 \
|
||||||
libxext-dev:armhf libxext-dev:arm64
|
libxext-dev:armhf libxext-dev:arm64
|
||||||
|
|
||||||
|
# Zenity Dependencies
|
||||||
|
queue_pkg \
|
||||||
|
libgtk-3-dev:armhf libgtk-3-dev:arm64 \
|
||||||
|
libglib2.0-dev:armhf libglib2.0-dev:arm64
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Install appimagetool & appimage-builder Dependencies
|
# Install appimagetool & appimage-builder Dependencies
|
||||||
|
Loading…
Reference in New Issue
Block a user