2020-09-25 16:43:53 +00:00
|
|
|
project(mods)
|
|
|
|
|
2021-01-27 21:26:19 +00:00
|
|
|
## Setup
|
|
|
|
|
2020-12-04 21:27:28 +00:00
|
|
|
# Disable C++11 String ABI
|
2020-10-10 23:02:13 +00:00
|
|
|
add_definitions(-D_GLIBCXX_USE_CXX11_ABI=0)
|
2020-09-25 16:43:53 +00:00
|
|
|
|
2021-01-27 21:26:19 +00:00
|
|
|
## Mods
|
|
|
|
|
2021-06-17 21:32:24 +00:00
|
|
|
add_library(compat SHARED src/compat/compat.c src/compat/egl.c)
|
|
|
|
target_link_libraries(compat feature input media-layer-core dl)
|
2020-12-02 23:18:49 +00:00
|
|
|
|
2021-01-27 21:26:19 +00:00
|
|
|
add_library(readdir SHARED src/readdir/readdir.c)
|
2020-09-25 16:43:53 +00:00
|
|
|
|
2020-12-02 23:18:49 +00:00
|
|
|
add_library(feature SHARED src/feature/feature.c)
|
2021-01-27 21:26:19 +00:00
|
|
|
target_link_libraries(feature reborn)
|
2020-12-02 23:18:49 +00:00
|
|
|
|
2021-06-17 21:32:24 +00:00
|
|
|
if(MCPI_SERVER_MODE)
|
|
|
|
add_library(server SHARED src/server/server.cpp src/server/server_properties.cpp)
|
|
|
|
target_link_libraries(server reborn feature home compat dl media-layer-core pthread)
|
|
|
|
endif()
|
2020-11-24 22:12:23 +00:00
|
|
|
|
2020-12-02 23:18:49 +00:00
|
|
|
add_library(camera SHARED src/camera/camera.cpp)
|
2021-06-17 21:32:24 +00:00
|
|
|
target_link_libraries(camera reborn media-layer-core)
|
2020-10-04 00:30:15 +00:00
|
|
|
|
2020-12-02 23:18:49 +00:00
|
|
|
add_library(game_mode SHARED src/game_mode/game_mode.c src/game_mode/game_mode.cpp)
|
2021-01-27 21:26:19 +00:00
|
|
|
target_link_libraries(game_mode reborn)
|
2020-11-28 01:49:13 +00:00
|
|
|
|
2020-12-02 23:18:49 +00:00
|
|
|
add_library(input SHARED src/input/input.c src/input/input.cpp)
|
2021-06-17 21:32:24 +00:00
|
|
|
target_link_libraries(input reborn feature media-layer-core chat)
|
2020-10-05 22:17:55 +00:00
|
|
|
|
2020-12-02 23:18:49 +00:00
|
|
|
add_library(misc SHARED src/misc/misc.c src/misc/misc.cpp)
|
2021-01-27 21:26:19 +00:00
|
|
|
target_link_libraries(misc reborn feature util)
|
2020-12-02 23:18:49 +00:00
|
|
|
|
|
|
|
add_library(options SHARED src/options/options.c)
|
2021-01-27 21:26:19 +00:00
|
|
|
target_link_libraries(options reborn feature)
|
2020-12-02 23:18:49 +00:00
|
|
|
|
|
|
|
add_library(override SHARED src/override/override.c)
|
2021-06-17 21:32:24 +00:00
|
|
|
target_link_libraries(override reborn dl home)
|
2020-12-02 23:18:49 +00:00
|
|
|
|
|
|
|
add_library(textures SHARED src/textures/textures.cpp)
|
2021-01-27 21:26:19 +00:00
|
|
|
target_link_libraries(textures reborn feature GLESv1_CM)
|
2020-09-25 16:43:53 +00:00
|
|
|
|
2021-02-16 17:26:40 +00:00
|
|
|
add_library(chat SHARED src/chat/chat.cpp src/chat/ui.c)
|
|
|
|
target_link_libraries(chat reborn pthread)
|
|
|
|
|
2021-06-17 21:32:24 +00:00
|
|
|
add_library(home SHARED src/home/home.c)
|
|
|
|
target_link_libraries(home reborn)
|
|
|
|
|
2021-01-27 16:13:06 +00:00
|
|
|
add_library(test SHARED src/test/test.c)
|
2021-06-17 21:32:24 +00:00
|
|
|
target_link_libraries(test reborn home)
|
2021-01-27 16:13:06 +00:00
|
|
|
|
2020-12-02 23:18:49 +00:00
|
|
|
add_library(init SHARED src/init/init.c)
|
2021-06-17 21:32:24 +00:00
|
|
|
target_link_libraries(init compat game_mode camera input misc options textures chat home test)
|
|
|
|
if(MCPI_SERVER_MODE)
|
|
|
|
target_link_libraries(init server)
|
|
|
|
endif()
|
2021-01-27 21:26:19 +00:00
|
|
|
|
2021-02-21 19:53:17 +00:00
|
|
|
## Install Mods
|
2021-06-17 21:32:24 +00:00
|
|
|
install(TARGETS init compat readdir feature override game_mode camera input misc options textures chat home test DESTINATION "${MCPI_INSTALL_DIR}/mods")
|
|
|
|
if(MCPI_SERVER_MODE)
|
|
|
|
install(TARGETS server DESTINATION "${MCPI_INSTALL_DIR}/mods")
|
|
|
|
endif()
|