You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.
re3/cmake/CPackProjectConfig.cmake.in

77 lines
2.3 KiB
CMake

set(PROJECT_NAME "@PROJECT_NAME@")
set(PROJECT_AUTHOR "@PROJECT_AUTHOR@")
set(LIBRW_PLATFORM "@LIBRW_PLATFORM@")
set(LIBRW_GL3_GFXLIB "@LIBRW_GL3_GFXLIB@")
set(RE3_AUDIO "@RE3_AUDIO@")
set(RE3_WITH_OPUS "@RE3_WITH_OPUS@")
set(WIN32 @WIN32@)
set(APPLE @APPLE@)
set(UNIZ @UNIX@)
set(CMAKE_SIZEOF_VOID_P @CMAKE_SIZEOF_VOID_P@)
if(LIBRW_PLATFORM STREQUAL "NULL")
set(platform "-null")
elseif(LIBRW_PLATFORM STREQUAL "PS2")
set(platform "-ps2")
elseif(LIBRW_PLATFORM STREQUAL "GL3")
if(LIBRW_GL3_GFXLIB STREQUAL "GLFW")
set(platform "-gl3-glfw")
else()
set(platform "-gl3-sdl2")
endif()
elseif(LIBRW_PLATFORM STREQUAL "D3D9")
set(platform "-d3d9")
endif()
if(RE3_AUDIO STREQUAL "OAL")
set(audio "-oal")
elseif(RE3_AUDIO STREQUAL "MSS")
set(audio "-mss")
endif()
if(RE3_WITH_OPUS)
set(audio "${audio}-opus")
endif()
if(WIN32)
set(os "-win")
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
set(os "${os}64")
else()
set(os "${os}32")
endif()
elseif(APPLE)
set(os "-apple")
elseif(UNIX)
set(os "-linux")
else()
set(os "-UNK")
message(WARNING "Unknown os. Created cpack package will be wrong. (override using cpack -P)")
endif()
set(name_osarch "${PROJECT_NAME}${platform}${audio}${os}${compiler}")
set(CPACK_PACKAGE_FILE_NAME "${name_osarch}")
if(CPACK_GENERATOR MATCHES "^(7Z|TBZ|TGZ|TXZ|TZ|TZST|ZIP)$")
set(CPACK_COMPONENTS_GROUPING "ONE_PER_GROUP")
set(CPACK_COMPONENT_COMP1_CORE_GROUP "BinaryGroup")
set(CPACK_COMPONENT_COMP2_GAMEDATA_GROUP "BinaryGroup")
set(CPACK_COMPONENT_COMP3_RUNTIME_GROUP "BinaryGroup")
set(CPACK_COMPONENT_COMP4_DEBUG_GROUP "BinaryGroup")
set(CPACK_COMPONENT_COMPZ_SOURCES_GROUP "SourceGroup")
set(CPACK_ARCHIVE_SOURCEGROUP_FILE_NAME "${PROJECT_NAME}-src")
set(CPACK_ARCHIVE_BINARYGROUP_FILE_NAME "${CPACK_PACKAGE_FILE_NAME}")
elseif(CPACK_GENERATOR MATCHES "^NSIS(64)?$")
list(REMOVE_ITEM CPACK_COMPONENTS_ALL "compZ_sources")
set(CPACK_PACKAGE_FILE_NAME "${name_osarch}-setup")
set(CPACK_PACKAGE_INSTALL_DIRECTORY "${PROJECT_NAME} (${PROJECT_AUTHOR})")
set(CPACK_NSIS_CREATE_ICONS_EXTRA "CreateShortCut \"$SMPROGRAMS\\$STARTMENU_FOLDER\\${PROJECT_NAME}.lnk\" \"$INSTDIR\\${PROJECT_NAME}.exe\"")
set(CPACK_NSIS_DELETE_ICONS_EXTRA "Delete \"$SMPROGRAMS\\$MUI_TEMP\${PROJECT_NAME}.lnk\"")
endif()