minecraft-pi-reborn/launcher/CMakeLists.txt

34 lines
813 B
CMake
Raw Normal View History

2021-01-27 21:26:19 +00:00
cmake_minimum_required(VERSION 3.1.0)
project(launcher)
add_compile_options(-Wall -Wextra -Werror)
2021-02-21 19:53:17 +00:00
## Launcher
2021-01-27 21:26:19 +00:00
add_executable(launcher src/launcher.c)
# Install
install(TARGETS launcher DESTINATION /)
2021-02-21 19:53:17 +00:00
install(PROGRAMS src/run.sh DESTINATION /)
## Stubs
# Stub RPI-Specific Graphics
add_library(bcm_host SHARED src/stubs/bcm_host.c)
# Stub EGL
add_library(EGL SHARED src/stubs/EGL.c)
# Stub SDL
add_library(SDL-1.2 SHARED src/stubs/SDL.cpp)
target_link_libraries(SDL-1.2 pthread)
set_target_properties(SDL-1.2 PROPERTIES SOVERSION "0")
# MCPI Links Against GLESv2 But Uses GLESv1_CM
add_library(GLESv2 SHARED src/stubs/GLESv2.c)
target_link_libraries(GLESv2 GLESv1_CM)
target_link_options(GLESv2 PRIVATE "-Wl,--no-as-needed")
# Install Stubs
install(TARGETS bcm_host EGL SDL-1.2 GLESv2 DESTINATION /lib)