minecraft-pi-reborn/libreborn/CMakeLists.txt
TheBrokenRail 587ba38ffe
Some checks failed
CI / Build (AMD64) (push) Successful in 23m26s
CI / Build (ARM64) (push) Successful in 23m44s
CI / Build (ARMHF) (push) Successful in 15m21s
CI / Test (AMD64, Server) (push) Successful in 2m46s
CI / Build Example Mods (push) Failing after 1m20s
CI / Test (ARM64, Client) (push) Successful in 6m20s
CI / Test (AMD64, Client) (push) Successful in 6m36s
CI / Test (ARM64, Server) (push) Successful in 3m6s
CI / Test (ARMHF, Client) (push) Successful in 6m23s
CI / Test (ARMHF, Server) (push) Successful in 3m19s
CI / Release (push) Has been skipped
Store Server List In Launcher Cache
2024-12-14 03:08:19 -05:00

58 lines
1.8 KiB
CMake

project(libreborn)
# Config
file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/include/libreborn")
configure_file(include/libreborn/config.h.in "${CMAKE_CURRENT_BINARY_DIR}/include/libreborn/config.h" ESCAPE_QUOTES @ONLY)
# Util
add_library(reborn-util SHARED
src/util/exec.cpp
src/util/string.cpp
src/util/util.cpp
src/util/log.cpp
src/util/cp437.cpp
src/util/env/env.cpp
src/util/config.cpp
src/util/env/flags/node.cpp
src/util/env/flags/flags.cpp
src/util/env/flags/available-feature-flags # Show In IDE
src/util/env/servers.cpp
)
embed_resource(reborn-util src/util/env/flags/available-feature-flags)
target_link_libraries(reborn-util PRIVATE utf8cpp)
if(TARGET glfw)
target_sources(reborn-util PRIVATE src/util/glfw.cpp)
target_link_libraries(reborn-util PRIVATE glfw)
endif()
setup_header_dirs(reborn-util
"${CMAKE_CURRENT_SOURCE_DIR}/include"
"${CMAKE_CURRENT_BINARY_DIR}/include"
)
setup_library(reborn-util TRUE TRUE)
# Patch
if(BUILD_ARM_COMPONENTS)
add_library(reborn-patch SHARED
src/patch/patch.cpp
src/patch/segments.cpp
src/patch/code-block.cpp
src/patch/instruction.cpp
)
target_link_libraries(reborn-patch dl pthread reborn-util)
target_compile_definitions(reborn-patch PUBLIC REBORN_HAS_PATCH_CODE)
# Install
setup_library(reborn-patch TRUE TRUE)
endif()
# Fake LibPNG To Satisfy Symbol Versioning Requirement
if(BUILD_ARM_COMPONENTS)
add_library(fake-libpng SHARED src/fake-libpng/empty.c)
set_target_properties(fake-libpng PROPERTIES
OUTPUT_NAME "png12"
SOVERSION 0
)
target_link_options(fake-libpng PRIVATE "LINKER:--version-script=${CMAKE_CURRENT_SOURCE_DIR}/src/fake-libpng/empty.vers")
# Install
setup_library(fake-libpng TRUE FALSE)
endif()