minecraft-pi-reborn/mods/CMakeLists.txt

136 lines
2.9 KiB
CMake
Raw Permalink Normal View History

2020-09-25 16:43:53 +00:00
project(mods)
2024-01-24 02:57:57 +00:00
# Common Sources
set(SRC
# compat
2024-04-02 23:22:01 +00:00
src/compat/compat.cpp
src/compat/egl.cpp
src/compat/x11.cpp
src/compat/bcm_host.cpp
2024-01-24 02:57:57 +00:00
# readdir
2024-04-02 23:22:01 +00:00
src/readdir/readdir.cpp
2024-01-24 02:57:57 +00:00
# feature
2024-04-02 23:22:01 +00:00
src/feature/feature.cpp
2024-01-24 02:57:57 +00:00
# version
src/version/version.cpp
# chat
src/chat/chat.cpp
2024-02-01 08:12:24 +00:00
src/chat/ui.cpp
2024-01-24 02:57:57 +00:00
# creative
src/creative/creative.cpp
# game-mode
2024-04-02 23:22:01 +00:00
src/game-mode/game-mode.cpp
2024-01-24 02:57:57 +00:00
src/game-mode/ui.cpp
# override
2024-04-02 23:22:01 +00:00
src/override/override.cpp
2024-01-24 02:57:57 +00:00
# death
src/death/death.cpp
# misc
src/misc/misc.cpp
src/misc/logging.cpp
src/misc/api.cpp
# options
src/options/options.cpp
# bucket
src/bucket/bucket.cpp
# cake
src/cake/cake.cpp
2024-01-24 02:57:57 +00:00
# home
2024-04-02 23:22:01 +00:00
src/home/home.cpp
2024-01-24 02:57:57 +00:00
# test
2024-04-02 23:22:01 +00:00
src/test/test.cpp
2024-01-24 02:57:57 +00:00
# init
2024-04-02 23:22:01 +00:00
src/init/init.cpp
2022-06-25 21:30:08 +00:00
)
2022-04-28 03:38:30 +00:00
2024-01-24 02:57:57 +00:00
# Server-Only Sources
2021-06-17 21:32:24 +00:00
if(MCPI_SERVER_MODE)
2024-01-24 02:57:57 +00:00
list(APPEND SRC
# server
src/server/server.cpp
src/server/server_properties.cpp
)
2021-06-28 02:16:37 +00:00
else()
2024-01-24 02:57:57 +00:00
list(APPEND SRC
# multiplayer
src/multiplayer/multiplayer.cpp
# benchmark
src/benchmark/benchmark.cpp
)
2021-09-12 03:18:12 +00:00
endif()
2021-06-19 23:07:09 +00:00
2024-01-24 02:57:57 +00:00
# Headless-Only Sources
if(MCPI_HEADLESS_MODE)
list(APPEND SRC
# textures
src/textures/headless.cpp
)
2023-11-11 05:44:26 +00:00
else()
2024-01-24 02:57:57 +00:00
list(APPEND SRC
# sound
src/sound/sound.cpp
src/sound/repository.cpp
# camera
src/camera/camera.cpp
# input
src/input/input.cpp
2024-04-02 23:22:01 +00:00
src/input/bow.cpp
src/input/attack.cpp
src/input/toggle.cpp
src/input/misc.cpp
2024-01-24 02:57:57 +00:00
src/input/drop.cpp
src/input/crafting.cpp
# sign
src/sign/sign.cpp
# touch
src/touch/touch.cpp
# atlas
src/atlas/atlas.cpp
# title-screen
src/title-screen/title-screen.cpp
2024-02-08 02:15:48 +00:00
src/title-screen/splashes.txt # Show In IDE
2024-01-24 02:57:57 +00:00
# skin
src/skin/skin.cpp
src/skin/loader.cpp
# screenshot
2024-04-02 23:22:01 +00:00
src/screenshot/screenshot.cpp
2024-01-24 02:57:57 +00:00
# textures
src/textures/textures.cpp
2024-02-01 03:13:20 +00:00
src/textures/lava.cpp
2024-02-01 08:12:24 +00:00
# text-input-box
src/text-input-box/TextInputBox.cpp
src/text-input-box/TextInputScreen.cpp
2024-02-08 05:34:43 +00:00
# fps
src/fps/fps.cpp
2024-01-24 02:57:57 +00:00
)
2024-02-08 02:15:48 +00:00
# Install Splashes
install(
FILES "src/title-screen/splashes.txt"
DESTINATION "${MCPI_INSTALL_DIR}/data"
)
2023-11-11 05:44:26 +00:00
endif()
2024-01-24 02:57:57 +00:00
# Build
add_library(mods SHARED ${SRC})
2024-01-24 02:57:57 +00:00
# Install
install(TARGETS mods DESTINATION "${MCPI_INSTALL_DIR}/mods")
# SDK
install(TARGETS mods EXPORT sdk DESTINATION "${MCPI_SDK_LIB_DIR}")
2021-01-27 16:13:06 +00:00
2024-01-24 02:57:57 +00:00
# Dependencies
target_link_libraries(mods symbols reborn-patch media-layer-core dl pthread)
if(NOT MCPI_HEADLESS_MODE)
2024-01-24 02:57:57 +00:00
target_link_libraries(mods stb_image)
2021-06-17 21:32:24 +00:00
endif()
2021-01-27 21:26:19 +00:00
2024-01-24 02:57:57 +00:00
# Headers
target_include_directories(
mods
PUBLIC
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>"
"$<INSTALL_INTERFACE:${MCPI_SDK_INCLUDE_DIR}/mods>"
)
2022-06-25 21:30:08 +00:00
# SDK
2024-01-24 02:57:57 +00:00
install(DIRECTORY "include/" DESTINATION "${MCPI_SDK_INCLUDE_DIR}/mods")