summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnonymous Maarten <anonymous.maarten@gmail.com>2021-01-03 16:32:00 +0100
committershfil <filip.gawin@zoho.com>2021-01-11 11:24:25 +0100
commit64b585efa11dd123750840e7b60c838c2fa21e2c (patch)
tree269205ce0b944406c9a1d217f4d6665929f5641e
parentAdd conanfile (diff)
downloadre3-64b585efa11dd123750840e7b60c838c2fa21e2c.tar
re3-64b585efa11dd123750840e7b60c838c2fa21e2c.tar.gz
re3-64b585efa11dd123750840e7b60c838c2fa21e2c.tar.bz2
re3-64b585efa11dd123750840e7b60c838c2fa21e2c.tar.lz
re3-64b585efa11dd123750840e7b60c838c2fa21e2c.tar.xz
re3-64b585efa11dd123750840e7b60c838c2fa21e2c.tar.zst
re3-64b585efa11dd123750840e7b60c838c2fa21e2c.zip
-rw-r--r--CMakeLists.txt44
1 files changed, 39 insertions, 5 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 76f4da89..08d407e8 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -47,15 +47,49 @@ 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)
- #set(CPACK_PACKAGE_DESCRIPTION_FILE "${PROJECT_SOURCE_DIR}/LICENSE")
- #set(CPACK_RESOURCE_FILE_LICENSE "${PROJECT_SOURCE_DIR}/LICENSE")
+ # FIXME: missing license (https://github.com/GTAmodding/re3/issues/794)
+ # set(CPACK_PACKAGE_DESCRIPTION_FILE "${PROJECT_SOURCE_DIR}/LICENSE")
+ # set(CPACK_RESOURCE_FILE_LICENSE "${PROJECT_SOURCE_DIR}/LICENSE")
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()