Fix CMakeLists
This commit is contained in:
parent
a3e49a8e79
commit
3b59606151
|
@ -103,51 +103,23 @@ endif()
|
||||||
# Build
|
# Build
|
||||||
add_library(mods SHARED ${SRC})
|
add_library(mods SHARED ${SRC})
|
||||||
|
|
||||||
==== BASE ====
|
# Install
|
||||||
add_library(death SHARED src/death/death.cpp)
|
install(TARGETS mods DESTINATION "${MCPI_INSTALL_DIR}/mods")
|
||||||
target_link_libraries(death mods-headers reborn-patch symbols feature)
|
# SDK
|
||||||
|
install(TARGETS mods EXPORT sdk DESTINATION "${MCPI_SDK_LIB_DIR}")
|
||||||
|
|
||||||
add_library(misc SHARED src/misc/misc.c src/misc/misc.cpp src/misc/logging.cpp src/misc/api.cpp)
|
# Dependencies
|
||||||
target_link_libraries(misc mods-headers reborn-patch symbols media-layer-core feature)
|
target_link_libraries(mods symbols reborn-patch media-layer-core dl pthread)
|
||||||
|
|
||||||
add_library(options SHARED src/options/options.c src/options/options.cpp)
|
|
||||||
target_link_libraries(options mods-headers reborn-patch symbols feature home)
|
|
||||||
|
|
||||||
add_library(bucket SHARED src/bucket/bucket.cpp)
|
|
||||||
target_link_libraries(bucket mods-headers reborn-patch symbols feature misc)
|
|
||||||
|
|
||||||
add_library(home SHARED src/home/home.c)
|
|
||||||
target_link_libraries(home mods-headers reborn-patch symbols)
|
|
||||||
|
|
||||||
add_library(test SHARED src/test/test.c)
|
|
||||||
target_link_libraries(test mods-headers reborn-patch home)
|
|
||||||
==== BASE ====
|
|
||||||
|
|
||||||
==== BASE ====
|
|
||||||
add_library(init SHARED src/init/init.c)
|
|
||||||
target_link_libraries(init symbols mods-headers reborn-util compat game-mode misc death options chat creative bucket textures home version test media-layer-core)
|
|
||||||
if(MCPI_SERVER_MODE)
|
|
||||||
target_link_libraries(init server)
|
|
||||||
else()
|
|
||||||
target_link_libraries(init multiplayer benchmark)
|
|
||||||
endif()
|
|
||||||
==== BASE ====
|
|
||||||
if(NOT MCPI_HEADLESS_MODE)
|
if(NOT MCPI_HEADLESS_MODE)
|
||||||
target_link_libraries(mods stb_image)
|
target_link_libraries(mods stb_image)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
==== BASE ====
|
# Headers
|
||||||
## Install Mods
|
target_include_directories(
|
||||||
set(MODS_TO_INSTALL init compat readdir feature game-mode misc override death options chat creative bucket textures home version test)
|
mods
|
||||||
if(MCPI_SERVER_MODE)
|
PUBLIC
|
||||||
list(APPEND MODS_TO_INSTALL server)
|
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>"
|
||||||
else()
|
"$<INSTALL_INTERFACE:${MCPI_SDK_INCLUDE_DIR}/mods>"
|
||||||
list(APPEND MODS_TO_INSTALL multiplayer benchmark)
|
)
|
||||||
endif()
|
|
||||||
if(NOT MCPI_HEADLESS_MODE)
|
|
||||||
list(APPEND MODS_TO_INSTALL sound camera input sign touch atlas title-screen skin screenshot)
|
|
||||||
endif()
|
|
||||||
install(TARGETS ${MODS_TO_INSTALL} DESTINATION "${MCPI_INSTALL_DIR}/mods")
|
|
||||||
==== BASE ====
|
|
||||||
# SDK
|
# SDK
|
||||||
install(DIRECTORY "include/" DESTINATION "${MCPI_SDK_INCLUDE_DIR}/mods")
|
install(DIRECTORY "include/" DESTINATION "${MCPI_SDK_INCLUDE_DIR}/mods")
|
||||||
|
|
Loading…
Reference in New Issue