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