CMakeLists.txt 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. project(PlexMediaPlayer CXX C)
  2. cmake_minimum_required(VERSION 3.1.0 FATAL_ERROR)
  3. cmake_policy(SET CMP0020 NEW)
  4. if (POLICY CMP0058)
  5. cmake_policy(SET CMP0058 NEW)
  6. endif()
  7. cmake_policy(SET CMP0017 NEW)
  8. option(OPENELEC "Make an OpenELEC build" OFF)
  9. if (OPENELEC)
  10. add_definitions(-DKONVERGO_OPENELEC=1)
  11. Message(STATUS "Making an OpenELEC build")
  12. endif(OPENELEC)
  13. option(BUILD_TARGET "Destination target for the build" "")
  14. if (BUILD_TARGET STREQUAL "RPI")
  15. add_definitions(-DTARGET_RPI=1)
  16. set(RPI_LIBS bcm_host)
  17. Message(STATUS "Build for Raspberry PI target")
  18. endif(BUILD_TARGET STREQUAL "RPI")
  19. set(CMAKE_INCLUDE_CURRENT_DIR ON)
  20. set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/CMakeModules/")
  21. set(CMAKE_INSTALL_DEFAULT_COMPONENT_NAME Core)
  22. add_definitions(-DQS_LOG_LINE_NUMBERS)
  23. include(DependencyConfiguration)
  24. include(QtConfiguration)
  25. include(VersionConfiguration)
  26. include(NameConfiguration)
  27. include(utils)
  28. include(PlayerConfiguration)
  29. include(InputConfiguration)
  30. include(FindBreakpad)
  31. include(BreakpadSymbols)
  32. if(APPLE)
  33. include(AppleConfiguration)
  34. elseif(WIN32)
  35. include(Win32Configuration)
  36. elseif(UNIX AND (NOT APPLE))
  37. include(LinuxConfiguration)
  38. endif(APPLE)
  39. if(CMAKE_COMPILER_IS_GNUCC)
  40. include(GCCConfiguration)
  41. endif(CMAKE_COMPILER_IS_GNUCC)
  42. set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${WARNINGS}")
  43. set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${WARNINGS}")
  44. add_subdirectory(external)
  45. add_subdirectory(src)
  46. include(CPackConfiguration)
  47. add_custom_target(install_app_bundle COMMAND ${CMAKE_COMMAND} -P cmake_install.cmake DEPENDS PlexMediaPlayer PMPHelper)