CMakeLists.txt 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. cmake_minimum_required(VERSION 3.1.0 FATAL_ERROR)
  2. project(PlexMediaPlayer CXX C)
  3. cmake_policy(SET CMP0020 NEW)
  4. cmake_policy(SET CMP0017 NEW)
  5. if (POLICY CMP0058)
  6. cmake_policy(SET CMP0058 NEW)
  7. endif()
  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. include(ClangTidy)
  33. if(APPLE)
  34. include(AppleConfiguration)
  35. elseif(WIN32)
  36. include(Win32Configuration)
  37. elseif(UNIX AND (NOT APPLE))
  38. include(LinuxConfiguration)
  39. endif(APPLE)
  40. if(CMAKE_COMPILER_IS_GNUCC)
  41. include(GCCConfiguration)
  42. endif(CMAKE_COMPILER_IS_GNUCC)
  43. set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${WARNINGS}")
  44. set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${WARNINGS}")
  45. add_subdirectory(external)
  46. add_subdirectory(src)
  47. include(CPackConfiguration)
  48. add_custom_target(install_app_bundle COMMAND ${CMAKE_COMMAND} -P cmake_install.cmake DEPENDS PlexMediaPlayer PMPHelper)