CMakeLists.txt 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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 -DQHTTPSERVER_EXPORT)
  23. include(DependencyConfiguration)
  24. include(VersionConfiguration)
  25. include(NameConfiguration)
  26. include(utils)
  27. include(QtConfiguration)
  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)