minecraft-pi-reborn/mods/CMakeLists.txt

58 lines
1.8 KiB
CMake
Raw Normal View History

2020-10-26 19:58:28 +00:00
cmake_minimum_required(VERSION 3.13.0)
2020-09-25 16:43:53 +00:00
project(mods)
2020-11-06 04:05:37 +00:00
add_compile_options(-g -Wall -Wextra -Werror)
2020-10-26 19:58:28 +00:00
add_link_options(-Wl,--no-undefined)
2020-10-10 23:02:13 +00:00
add_definitions(-D_GLIBCXX_USE_CXX11_ABI=0)
2020-09-25 16:43:53 +00:00
add_subdirectory(../core core)
2020-10-03 20:18:53 +00:00
include_directories(include)
2020-12-02 23:18:49 +00:00
find_package(glfw3 3.3 REQUIRED)
add_library(compat SHARED src/compat/compat.c)
target_link_libraries(compat feature input screenshot SDL GLESv1_CM GLESv2 X11 dl glfw Xfixes)
# Force GLESv1 Link
target_link_options(compat PRIVATE "-Wl,--no-as-needed")
add_library(readdir SHARED src/compat/readdir.c)
add_library(core SHARED src/core/core.c)
2020-10-03 20:18:53 +00:00
target_link_libraries(core dl)
2020-09-25 16:43:53 +00:00
2020-12-02 23:18:49 +00:00
add_library(feature SHARED src/feature/feature.c)
2020-11-06 04:05:37 +00:00
add_library(server SHARED src/server/server.cpp src/server/server_properties.cpp src/server/playerdata.cpp)
2020-12-02 23:18:49 +00:00
target_link_libraries(server core feature dl SDL pthread)
2020-10-10 23:02:13 +00:00
2020-11-24 22:12:23 +00:00
add_library(screenshot SHARED src/screenshot/screenshot.c)
target_link_libraries(screenshot GLESv1_CM freeimage)
2020-12-02 23:18:49 +00:00
add_library(camera SHARED src/camera/camera.cpp)
target_link_libraries(camera core screenshot)
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)
target_link_libraries(game_mode core)
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)
target_link_libraries(input core feature SDL)
2020-10-05 22:17:55 +00:00
2020-12-02 23:18:49 +00:00
add_library(util SHARED src/util/cxx11_util.cpp)
add_library(misc SHARED src/misc/misc.c src/misc/misc.cpp)
target_link_libraries(misc core feature util)
add_library(options SHARED src/options/options.c)
target_link_libraries(options core feature)
add_library(override SHARED src/override/override.c)
target_link_libraries(override dl)
add_library(textures SHARED src/textures/textures.cpp)
target_link_libraries(textures core feature GLESv1_CM)
2020-09-25 16:43:53 +00:00
2020-12-02 23:18:49 +00:00
add_library(init SHARED src/init/init.c)
target_link_libraries(init compat server game_mode camera input misc options textures)