CMakeLists.txt 1.6 KB

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