mirror of
https://gitea.sffempire.ru/Kolyah35/minecraft-pe-0.6.1.git
synced 2026-03-19 22:43:32 +00:00
trying to up actions
This commit is contained in:
@@ -22,6 +22,7 @@ CPMAddPackage(
|
||||
NAME "libpng"
|
||||
GIT_REPOSITORY "https://github.com/pnggroup/libpng.git"
|
||||
GIT_TAG "v1.6.55"
|
||||
EXCLUDE_FROM_ALL TRUE
|
||||
OPTIONS
|
||||
"ZLIB_ROOT ${zlib_SOURCE_DIR}"
|
||||
"ZLIB_INCLUDE_DIRS ${zlib_SOURCE_DIR}"
|
||||
@@ -34,6 +35,7 @@ CPMAddPackage(
|
||||
NAME "openal"
|
||||
GIT_REPOSITORY "https://github.com/kcat/openal-soft.git"
|
||||
GIT_TAG "1.25.1"
|
||||
EXCLUDE_FROM_ALL TRUE
|
||||
OPTIONS
|
||||
"ALSOFT_EXAMPLES OFF"
|
||||
"ALSOFT_TESTS OFF"
|
||||
@@ -45,6 +47,7 @@ CPMAddPackage(
|
||||
NAME "glfw"
|
||||
GIT_REPOSITORY "https://github.com/glfw/glfw.git"
|
||||
GIT_TAG "3.4"
|
||||
EXCLUDE_FROM_ALL TRUE
|
||||
OPTIONS
|
||||
"GLFW_BUILD_EXAMPLES OFF"
|
||||
"GLFW_BUILD_TESTS OFF"
|
||||
@@ -305,4 +308,53 @@ add_custom_command(
|
||||
TARGET ${PROJECT_NAME}
|
||||
POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory "${CMAKE_SOURCE_DIR}/data" $<TARGET_FILE_DIR:${PROJECT_NAME}>/data
|
||||
)
|
||||
)
|
||||
|
||||
# Installing and packing
|
||||
|
||||
find_package(Git REQUIRED)
|
||||
|
||||
execute_process(
|
||||
COMMAND ${GIT_EXECUTABLE} log -1 --format=%h
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
||||
OUTPUT_VARIABLE GIT_SHORTSHA
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
string(TOLOWER ${CMAKE_SYSTEM_NAME} SYSTEM_NAME)
|
||||
set(CPACK_PACKAGE_NAME "MCPE-0.6.1-for-all")
|
||||
set(CPACK_PACKAGE_FILE_NAME ${CPACK_PACKAGE_NAME}-${SYSTEM_NAME})
|
||||
set(CPACK_PACKAGE_VENDOR "MCPE-0.6.1-for-all")
|
||||
set(CPACK_PACKAGE_VERSION "${PROJECT_VERSION}")
|
||||
set(CPACK_PACKAGE_DIRECTORY "${CMAKE_BINARY_DIR}/package")
|
||||
set(CMAKE_INSTALL_PREFIX "${CMAKE_BINARY_DIR}/install")
|
||||
set(CPACK_GENERATOR "ZIP")
|
||||
|
||||
set(GIT_REPO "https://gitea.sffempire.ru/Kolyah35/minecraft-pe-0.6.1")
|
||||
|
||||
install(TARGETS ${PROJECT_NAME} RUNTIME DESTINATION .)
|
||||
|
||||
install(DIRECTORY "${CMAKE_SOURCE_DIR}/data" DESTINATION .)
|
||||
|
||||
string(TIMESTAMP CURRENT_DATE "%Y-%m-%d")
|
||||
string(TIMESTAMP CURRENT_TIME "%H:%M:%S")
|
||||
|
||||
set(VERSION_STR "${PROJECT_VERSION}")
|
||||
|
||||
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
|
||||
set(VERSION_STR "${VERSION_STR} - Development Build")
|
||||
endif()
|
||||
|
||||
file(WRITE "${CMAKE_BINARY_DIR}/version.txt"
|
||||
"Minecraft PE 0.6.1
|
||||
|
||||
Autogenerated file by cmake-${CMAKE_VERSION}
|
||||
Report issues ${GIT_REPO}/issues
|
||||
|
||||
Build date: ${CURRENT_DATE} ${CURRENT_TIME}
|
||||
Build configuration: ${CMAKE_BUILD_TYPE}
|
||||
Git commit: ${GIT_SHORTSHA}
|
||||
Platform: ${CMAKE_SYSTEM_NAME}")
|
||||
|
||||
install(FILES "${CMAKE_BINARY_DIR}/version.txt" DESTINATION .)
|
||||
|
||||
include(CPack)
|
||||
Reference in New Issue
Block a user