CPackConfiguration.cmake 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Plex Media Player")
  2. set(CPACK_PACKAGE_VENDOR "Plex")
  3. set(CPACK_PACKAGE_VERSION_MAJOR ${VERSION_MAJOR})
  4. set(CPACK_PACKAGE_VERSION_MINOR ${VERSION_MINOR})
  5. set(CPACK_PACKAGE_VERSION_PATCH ${VERSION_NANO})
  6. if(APPLE)
  7. set(CPACK_SYSTEM_NAME "macosx-x86_64")
  8. elseif(WIN32)
  9. set(CPACK_SYSTEM_NAME "windows-x86_64")
  10. else()
  11. set(CPACK_SYSTEM_NAME linux-${CMAKE_HOST_SYSTEM_PROCESSOR})
  12. endif()
  13. set(CPACK_PACKAGE_FILE_NAME "PlexMediaPlayer-${VERSION_STRING}-${CPACK_SYSTEM_NAME}")
  14. set(CPACK_SOURCE_PACKAGE_FILE_NAME "PlexMediaPlayer-${VERSION_STRING}-src")
  15. set(CPACK_PACKAGE_INSTALL_DIRECTORY "PlexMediaPlayer")
  16. set(CPACK_STRIP_FILES 1)
  17. set(CPACK_GENERATOR "ZIP")
  18. if(WIN32)
  19. list(APPEND CPACK_GENERATOR "IFW")
  20. endif(WIN32)
  21. # config IFW
  22. set(CPACK_IFW_FRAMEWORK_VERSION 2.0.1)
  23. set(CPACK_IFW_PACKAGE_NAME "Plex Media Player")
  24. set(CPACK_IFW_PACKAGE_START_MENU_DIRECTORY "Plex Media Player")
  25. set(CPACK_IFW_PACKAGE_TITLE "Plex Media Player Installer")
  26. set(CPACK_IFW_PACKAGE_PUBLISHER "Plex")
  27. set(CPACK_IFW_PRODUCT_URL "https://plex.tv")
  28. set(CPACK_IFW_PACKAGE_ICON ${CMAKE_SOURCE_DIR}/bundle/win/Plex.ico)
  29. set(CPACK_IFW_PACKAGE_WINDOW_ICON ${CMAKE_SOURCE_DIR}/resources/images/icon.png)
  30. set(CPACK_IFW_TARGET_DIRECTORY "C:\\Program Files\\PlexMediaPlayer")
  31. if(APPLE)
  32. set(CPACK_INCLUDE_TOPLEVEL_DIRECTORY 0)
  33. endif(APPLE)
  34. configure_file(${CMAKE_SOURCE_DIR}/CMakeModules/CPackGeneratedConfig.cmake.in ${CMAKE_BINARY_DIR}/CPackGeneratedConfig.cmake)
  35. set(CPACK_PROJECT_CONFIG_FILE ${CMAKE_BINARY_DIR}/CPackGeneratedConfig.cmake)
  36. include(CPack)
  37. cpack_add_component(Core DISPLAY_NAME "Plex Media Player" DESCRIPTION "Plex Media Player (Core Application)" REQUIRED)
  38. if(WIN32 AND DEFINED DEPENDENCY_ROOT)
  39. FILE(TO_CMAKE_PATH ${DEPENDENCY_ROOT} tmp)
  40. install(FILES ${tmp}/bin/mpv-1.dll DESTINATION .)
  41. install(FILES ${tmp}/lib/SDL2.dll DESTINATION .)
  42. install(FILES ${tmp}/lib/libcec.dll DESTINATION .)
  43. if(IS_DIRECTORY ${CMAKE_BINARY_DIR}/extradlls)
  44. file(GLOB EXTRADLLS ${CMAKE_BINARY_DIR}/extradlls/*.dll)
  45. install(FILES ${EXTRADLLS} DESTINATION .)
  46. endif()
  47. install(FILES ${CMAKE_SOURCE_DIR}/bundle/win/qt.conf DESTINATION .)
  48. install(FILES ${CMAKE_SOURCE_DIR}/bundle/win/PlexMediaPlayer-NoChromiumGPU.bat DESTINATION .)
  49. #add_custom_command(TARGET package POST_BUILD COMMAND ${CMAKE_SOURCE_DIR}/scripts/WindowsSign.cmd ${CPACK_PACKAGE_DIRECTORY}/${CPACK_PACKAGE_FILE_NAME}.exe WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} )
  50. # group/component configuration
  51. message(STATUS configure IFW)
  52. include(CPackIFW)
  53. cpack_ifw_configure_component(Core PRIORITY 1 SCRIPT ${CMAKE_SOURCE_DIR}/bundle/win/shortcut.qs)
  54. endif(WIN32 AND DEFINED DEPENDENCY_ROOT)