minecraft-pi-docker/launcher/CMakeLists.txt

33 lines
1.1 KiB
CMake
Raw Normal View History

2021-01-27 21:26:19 +00:00
project(launcher)
2021-06-17 21:32:24 +00:00
# Launcher
if(BUILD_NATIVE_COMPONENTS)
2022-05-14 02:36:12 +00:00
add_executable(launcher src/bootstrap.c src/patchelf.c src/crash-report.c)
2021-06-17 21:32:24 +00:00
if(MCPI_SERVER_MODE)
target_sources(launcher PRIVATE src/server/launcher.c)
else()
target_sources(launcher PRIVATE src/client/launcher.cpp)
endif()
2022-03-14 23:09:25 +00:00
target_link_libraries(launcher reborn-util)
2021-06-17 21:32:24 +00:00
# Install
install(TARGETS launcher DESTINATION "${MCPI_INSTALL_DIR}")
2021-12-18 01:01:29 +00:00
install_symlink("../${MCPI_INSTALL_DIR}/launcher" "bin/${MCPI_VARIANT_NAME}")
2022-03-27 20:21:58 +00:00
set(ICON_PATH "data/com.thebrokenrail.MCPIReborn.png")
set(ICON_TARGET_PATH "share/icons/hicolor/scalable/apps")
2021-06-17 21:32:24 +00:00
if(NOT MCPI_SERVER_MODE)
2022-03-27 20:21:58 +00:00
install(DIRECTORY "data/client/" DESTINATION ".")
install(
FILES "${ICON_PATH}"
DESTINATION "${ICON_TARGET_PATH}"
RENAME "com.thebrokenrail.MCPIRebornClient.png"
)
2022-03-10 04:29:37 +00:00
else()
2022-03-27 20:21:58 +00:00
install(DIRECTORY "data/server/" DESTINATION ".")
2022-03-10 04:29:37 +00:00
install(
2022-03-27 20:21:58 +00:00
FILES "${ICON_PATH}"
DESTINATION "${ICON_TARGET_PATH}"
2022-03-10 04:29:37 +00:00
RENAME "com.thebrokenrail.MCPIRebornServer.png"
)
2021-06-17 21:32:24 +00:00
endif()
endif()