minecraft-pi-reborn/symbols/CMakeLists.txt

236 lines
7.6 KiB
CMake
Raw Normal View History

2021-09-12 03:18:12 +00:00
project(symbols)
2024-01-06 11:30:23 +00:00
# Definition Files
set(SRC
2024-01-12 03:10:30 +00:00
src/game/options/Options_Option.def
src/game/options/OptionsFile.def
src/game/options/Options.def
src/game/Minecraft.def
src/game/mode/GameMode.def
src/game/mode/CreatorMode.def
src/game/mode/SurvivalMode.def
src/game/NinecraftApp.def
src/game/GameRenderer.def
src/network/RakNetInstance.def
src/network/PingedCompatibleServer.def
src/network/NetEventCallback.def
src/network/raknet/RakNet_RakString_SharedString.def
src/network/raknet/RakNet_RakString.def
src/network/raknet/RakNet_SystemAddress.def
2024-01-16 06:45:52 +00:00
src/network/raknet/RakNet_StartupResult.h
2024-01-12 03:10:30 +00:00
src/network/raknet/RakNet_RakNetGUID.def
src/network/raknet/RakNet_RakPeer.def
2024-01-24 01:35:57 +00:00
src/network/raknet/RakNet_BitStream.def
2024-01-12 03:10:30 +00:00
src/network/ServerSideNetworkHandler.def
src/network/packet/LoginPacket.def
src/network/packet/PlayerEquipmentPacket.def
2024-01-22 06:39:43 +00:00
src/network/packet/SignUpdatePacket.def
2024-01-12 03:10:30 +00:00
src/network/packet/Packet.def
src/network/packet/StartGamePacket.def
src/network/packet/ChatPacket.def
src/entity/EntityFactory.def
src/entity/PrimedTnt.def
2024-01-22 08:13:54 +00:00
src/entity/CameraEntity.def
2024-01-12 03:10:30 +00:00
src/entity/EntityRenderer.def
2024-01-23 03:59:38 +00:00
src/entity/ItemSpriteRenderer.def
2024-01-12 03:10:30 +00:00
src/entity/PathfinderMob.def
src/entity/HumanoidModel.def
src/entity/TripodCameraRenderer.def
src/entity/MobFactory.def
src/entity/EntityRenderDispatcher.def
src/entity/MobRenderer.def
src/entity/animal/AgableMob.def
src/entity/animal/Animal.def
src/entity/animal/Cow.def
src/entity/animal/Chicken.def
src/entity/animal/Pig.def
src/entity/animal/Sheep.def
src/entity/monster/Creeper.def
src/entity/monster/Monster.def
src/entity/monster/PigZombie.def
src/entity/monster/Skeleton.def
src/entity/monster/Spider.def
src/entity/monster/Zombie.def
2024-01-12 03:10:30 +00:00
src/entity/Mob.def
src/entity/player/ServerPlayer.def
src/entity/player/Player.def
src/entity/player/PlayerRenderer.def
src/entity/player/RemotePlayer.def
src/entity/player/LocalPlayer.def
src/entity/HumanoidMobRenderer.def
src/entity/Entity.def
src/entity/ItemEntity.def
src/entity/Arrow.def
2024-01-23 03:59:38 +00:00
src/entity/Throwable.def
2024-01-12 03:10:30 +00:00
src/level/container/FillingContainer.def
src/level/container/Container.def
src/level/container/ContainerMenu.def
src/level/container/Inventory.def
src/level/feature/LargeFeature.def
src/level/feature/LargeCaveFeature.def
src/level/Material.def
src/level/LevelSource.def
src/level/ExternalFileLevelStorageSource.def
src/level/Biome.def
src/level/ChunkSource.def
2024-01-22 06:39:43 +00:00
src/level/ChunkCache.def
2024-01-22 08:13:54 +00:00
src/level/LightLayer.def
2024-01-12 03:10:30 +00:00
src/level/Level.def
src/level/LevelRenderer.def
src/level/LevelStorageSource.def
src/level/ParticleEngine.def
src/level/RandomLevelSource.def
src/level/LevelData.def
src/level/LevelSettings.def
src/level/ServerLevel.def
2024-02-01 04:44:04 +00:00
src/level/Dimension.def
src/level/MultiPlayerLevel.def
src/level/LevelSummary.def
2024-02-08 05:34:43 +00:00
src/level/DistanceChunkSorter.def
src/level/Chunk.def
2024-01-12 03:10:30 +00:00
src/item/ItemRenderer.def
2024-01-16 17:55:24 +00:00
src/item/ItemInHandRenderer.def
2024-01-12 03:10:30 +00:00
src/item/AuxDataTileItem.def
src/item/ItemInstance.def
src/item/Item.def
2024-01-22 06:39:43 +00:00
src/item/ArmorMaterial.def
src/item/ArmorItem.def
2024-01-12 03:10:30 +00:00
src/item/TileItem.def
src/item/FoodItem.def
2024-01-12 03:10:30 +00:00
src/api/OffsetPosTranslator.def
src/api/CommandServer.def
src/api/ConnectedClient.def
src/gui/screens/InBedScreen.def
src/gui/screens/SimpleChooseLevelScreen.def
src/gui/screens/PauseScreen.def
src/gui/screens/FurnaceScreen.def
src/gui/screens/WorkbenchScreen.def
src/gui/screens/SelectWorldScreen.def
src/gui/screens/Touch_IngameBlockSelectionScreen.def
src/gui/screens/Screen.def
src/gui/screens/OptionsScreen.def
src/gui/screens/TextEditScreen.def
src/gui/screens/StartMenuScreen.def
src/gui/screens/ProgressScreen.def
src/gui/screens/Touch_SelectWorldScreen.def
src/gui/screens/PaneCraftingScreen.def
src/gui/screens/ScreenChooser.def
2024-01-12 03:10:30 +00:00
src/gui/Font.def
src/gui/components/ImageButton.def
src/gui/components/OptionButton.def
src/gui/components/OptionsPane.def
src/gui/components/GuiComponent.def
src/gui/components/Button.def
2024-02-01 08:12:24 +00:00
src/gui/Gui.def
2024-01-22 06:39:43 +00:00
src/gui/components/IntRectangle.def
src/gui/components/RectangleArea.def
src/gui/components/ScrollingPane.def
2024-02-01 19:56:16 +00:00
src/gui/components/Touch_TButton.def
2024-01-12 03:10:30 +00:00
src/app-platform/AppPlatform.def
src/app-platform/AppPlatform_linux.def
src/app-platform/AppPlatform_readAssetFile_return_value.def
src/tile/LeafTile.def
src/tile/Tile.def
src/tile/LiquidTile.def
src/tile/TallGrass.def
src/tile/entity/TileEntity.def
2024-02-12 07:29:35 +00:00
src/tile/entity/ChestTileEntity.def
2024-01-12 03:10:30 +00:00
src/tile/entity/FurnaceTileEntity.def
src/tile/entity/SignTileEntity.def
2024-02-12 07:29:35 +00:00
src/tile/entity/TileEntityFactory.def
src/tile/entity/TileEntityRenderer.def
src/tile/entity/TileEntityRenderDispatcher.def
2024-01-12 03:10:30 +00:00
src/tile/StemTile.def
src/tile/Tile_SoundType.def
src/tile/TileRenderer.def
src/tile/GrassTile.def
src/tile/HeavyTile.def
2024-02-12 07:29:35 +00:00
src/tile/EntityTile.def
2024-01-12 03:10:30 +00:00
src/misc/Strings.def
src/misc/I18n.def
src/misc/SimpleFoodData.def
2024-01-16 06:45:52 +00:00
src/entity/ModelPart.def
2024-01-12 03:10:30 +00:00
src/misc/Tesselator.def
src/misc/AABB.def
src/misc/Vec3.def
src/misc/HitResult.def
src/misc/PerfRenderer.def
2024-02-01 03:13:20 +00:00
src/textures/Texture.def
src/textures/Textures.def
src/textures/DynamicTexture.def
2024-01-12 03:10:30 +00:00
src/misc/SoundEngine.def
src/misc/Common.def
src/misc/Config.def
2024-01-23 03:59:38 +00:00
src/misc/Random.def
2024-02-01 03:13:20 +00:00
src/misc/Mth.def
src/misc/Util.def
2024-02-12 07:29:35 +00:00
src/misc/Tag.def
src/misc/CompoundTag.def
2024-01-22 06:39:43 +00:00
src/input/IMoveInput.def
2024-01-12 03:10:30 +00:00
src/input/IBuildInput.def
src/input/MouseBuildInput.def
src/input/Mouse.def
2024-02-01 08:12:24 +00:00
src/input/Keyboard.def
2024-01-12 03:10:30 +00:00
src/recipes/FurnaceRecipes.def
src/recipes/Recipes.def
src/recipes/Recipes_Type.def
src/recipes/ReqItem.def
src/recipes/CItem.def
2024-01-06 11:30:23 +00:00
)
# Resolve Definition Files
set(RESOLVED_SRC "")
foreach(FILE IN LISTS SRC)
list(APPEND RESOLVED_SRC "${CMAKE_CURRENT_SOURCE_DIR}/${FILE}")
endforeach()
# Directories
function(set_and_mkdir name dir)
set("${name}" "${dir}" PARENT_SCOPE)
file(MAKE_DIRECTORY "${dir}")
endfunction()
set_and_mkdir(GENERATED_DIR "${CMAKE_CURRENT_BINARY_DIR}/generated")
set_and_mkdir(INCLUDE_OUTPUT_DIR "${GENERATED_DIR}/include")
set_and_mkdir(HEADER_OUTPUT_DIR "${INCLUDE_OUTPUT_DIR}/symbols")
set_and_mkdir(SRC_OUTPUT_DIR "${GENERATED_DIR}/src")
# Files
set(HEADER_OUTPUT_FILE "${HEADER_OUTPUT_DIR}/minecraft.h")
set(SRC_OUTPUT_FILE "${SRC_OUTPUT_DIR}/minecraft.cpp")
# Generate
add_custom_command(
OUTPUT "${SRC_OUTPUT_FILE}" "${HEADER_OUTPUT_FILE}"
DEPENDS ${RESOLVED_SRC}
COMMAND npm start --silent -- "${SRC_OUTPUT_FILE}" "${HEADER_OUTPUT_FILE}" ${RESOLVED_SRC}
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/../dependencies/symbol-processor/src"
VERBATIM
)
# Build
add_library(symbols SHARED "${SRC_OUTPUT_FILE}" "${HEADER_OUTPUT_FILE}")
# Show In IDE
add_custom_target(symbols-src
DEPENDS "${SRC_OUTPUT_FILE}" "${HEADER_OUTPUT_FILE}"
SOURCES ${RESOLVED_SRC}
)
# Include Directory
2022-06-25 21:30:08 +00:00
target_include_directories(
symbols
2024-01-06 11:30:23 +00:00
PUBLIC
"$<BUILD_INTERFACE:${INCLUDE_OUTPUT_DIR}>"
2022-06-25 21:30:08 +00:00
"$<INSTALL_INTERFACE:${MCPI_SDK_INCLUDE_DIR}/symbols>"
)
# Disable C++11 String ABI
2024-01-06 11:30:23 +00:00
target_compile_definitions(symbols PUBLIC -D_GLIBCXX_USE_CXX11_ABI=0)
2022-06-25 21:30:08 +00:00
2024-01-06 11:30:23 +00:00
# Install
install(TARGETS symbols DESTINATION "${MCPI_LIB_DIR}")
2022-06-25 21:30:08 +00:00
# SDK
install(TARGETS symbols EXPORT sdk DESTINATION "${MCPI_SDK_LIB_DIR}")
2024-01-06 11:30:23 +00:00
install(DIRECTORY "${INCLUDE_OUTPUT_DIR}/" DESTINATION "${MCPI_SDK_INCLUDE_DIR}/symbols")
2024-02-12 07:29:35 +00:00
target_compile_options(symbols PUBLIC $<$<COMPILE_LANGUAGE:CXX>:-Wno-invalid-offsetof>)