minecraft-pi-reborn/mods/CMakeLists.txt

33 lines
941 B
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)
add_library(core SHARED src/core.c)
target_link_libraries(core dl)
2020-09-25 16:43:53 +00:00
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)
target_link_libraries(server core dl SDL pthread)
2020-10-10 23:02:13 +00:00
add_library(extra SHARED src/extra.c src/extra.cpp src/cxx11_util.cpp)
target_link_libraries(extra core dl server)
2020-10-04 00:30:15 +00:00
2020-10-05 22:17:55 +00:00
find_package(glfw3 3.3 REQUIRED)
2020-09-25 16:43:53 +00:00
add_library(compat SHARED src/compat.c)
2020-10-30 22:25:08 +00:00
target_link_libraries(compat core extra SDL GLESv1_CM GLESv2 X11 dl freeimage glfw Xfixes)
2020-09-25 16:43:53 +00:00
# Force GLESv1 Link
target_link_options(compat PRIVATE "-Wl,--no-as-needed")
add_library(readdir SHARED src/readdir.c)
2020-11-08 03:26:22 +00:00
add_library(time SHARED src/time.c)
target_link_libraries(time rt)