mirror of
https://github.com/GTAmodding/re3.git
synced 2024-11-15 02:39:02 +00:00
cmake: let cpack create nice binary package
This commit is contained in:
parent
54b88cdfbe
commit
64b585efa1
1 changed files with 39 additions and 5 deletions
|
@ -47,7 +47,41 @@ if(RE3_INSTALL)
|
|||
DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}"
|
||||
)
|
||||
|
||||
set(CPACK_PACKAGE_NAME "${CMAKE_PROJECT_NAME}")
|
||||
if(LIBRW_PLATFORM_NULL)
|
||||
set(platform "-null")
|
||||
elseif(LIBRW_PLATFORM_PS2)
|
||||
set(platform "-ps2")
|
||||
elseif(LIBRW_PLATFORM_GL3)
|
||||
if(LIBRW_GL3_GFXLIB STREQUAL "GLFW")
|
||||
set(platform "-gl3-glfw")
|
||||
else()
|
||||
set(platform "-gl3-sdl2")
|
||||
endif()
|
||||
elseif(LIBRW_PLATFORM_D3D9)
|
||||
set(platform "-d3d9")
|
||||
endif()
|
||||
if(RE3_AUDIO_OAL)
|
||||
set(audio "-oal")
|
||||
elseif(RE3_AUDIO_MSS)
|
||||
set(audio "-mss")
|
||||
endif()
|
||||
if(RE3_WITH_OPUS)
|
||||
set(audio "${audio}-opus")
|
||||
endif()
|
||||
if(NOT LIBRW_PLATFORM_PS2)
|
||||
if(WIN32)
|
||||
set(os "-win")
|
||||
elseif(APPLE)
|
||||
set(os "-apple")
|
||||
elseif(UNIX)
|
||||
set(os "-linux")
|
||||
else()
|
||||
set(compiler "-UNK")
|
||||
message(WARNING "Unknown os. Created cpack package will be wrong. (override using cpack -P)")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set(CPACK_PACKAGE_NAME "${PROJECT_NAME}${platform}${audio}${os}${compiler}")
|
||||
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "GTA III reversed")
|
||||
set(CPACK_PACKAGE_VENDOR "GTAModding")
|
||||
# FIXME: missing license (https://github.com/GTAmodding/re3/issues/794)
|
||||
|
@ -56,6 +90,6 @@ if(RE3_INSTALL)
|
|||
set(CPACK_PACKAGE_INSTALL_DIRECTORY "${CPACK_PACKAGE_NAME}")
|
||||
set(CPACK_SOURCE_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}")
|
||||
set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}")
|
||||
|
||||
set(CPACK_GENERATOR "TXZ")
|
||||
include(CPack)
|
||||
endif()
|
||||
|
|
Loading…
Reference in a new issue