2015-10-26 07:16:31 +00:00
|
|
|
cmake_minimum_required(VERSION 3.1.0 FATAL_ERROR)
|
2016-03-22 07:38:22 +00:00
|
|
|
project(PlexMediaPlayer CXX C)
|
2015-10-13 09:05:27 +00:00
|
|
|
|
|
|
|
cmake_policy(SET CMP0020 NEW)
|
2016-03-22 07:38:22 +00:00
|
|
|
cmake_policy(SET CMP0017 NEW)
|
2015-10-13 09:05:27 +00:00
|
|
|
if (POLICY CMP0058)
|
2016-03-22 07:38:22 +00:00
|
|
|
cmake_policy(SET CMP0058 NEW)
|
2015-10-13 09:05:27 +00:00
|
|
|
endif()
|
|
|
|
|
|
|
|
option(OPENELEC "Make an OpenELEC build" OFF)
|
|
|
|
|
|
|
|
if (OPENELEC)
|
|
|
|
add_definitions(-DKONVERGO_OPENELEC=1)
|
|
|
|
Message(STATUS "Making an OpenELEC build")
|
|
|
|
endif(OPENELEC)
|
|
|
|
|
|
|
|
option(BUILD_TARGET "Destination target for the build" "")
|
|
|
|
|
|
|
|
if (BUILD_TARGET STREQUAL "RPI")
|
|
|
|
add_definitions(-DTARGET_RPI=1)
|
|
|
|
set(RPI_LIBS bcm_host)
|
|
|
|
Message(STATUS "Build for Raspberry PI target")
|
|
|
|
endif(BUILD_TARGET STREQUAL "RPI")
|
|
|
|
|
|
|
|
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
|
|
|
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/CMakeModules/")
|
|
|
|
set(CMAKE_INSTALL_DEFAULT_COMPONENT_NAME Core)
|
|
|
|
|
2016-02-08 15:45:27 +00:00
|
|
|
add_definitions(-DQS_LOG_LINE_NUMBERS)
|
2015-10-13 09:05:27 +00:00
|
|
|
|
|
|
|
include(DependencyConfiguration)
|
2015-12-11 10:22:42 +00:00
|
|
|
include(QtConfiguration)
|
2015-10-13 09:05:27 +00:00
|
|
|
include(VersionConfiguration)
|
|
|
|
include(NameConfiguration)
|
|
|
|
include(utils)
|
|
|
|
include(PlayerConfiguration)
|
|
|
|
include(InputConfiguration)
|
|
|
|
include(FindBreakpad)
|
|
|
|
include(BreakpadSymbols)
|
2016-03-22 09:27:04 +00:00
|
|
|
include(ClangTidy)
|
2015-10-13 09:05:27 +00:00
|
|
|
|
|
|
|
if(APPLE)
|
|
|
|
include(AppleConfiguration)
|
|
|
|
elseif(WIN32)
|
|
|
|
include(Win32Configuration)
|
|
|
|
elseif(UNIX AND (NOT APPLE))
|
|
|
|
include(LinuxConfiguration)
|
|
|
|
endif(APPLE)
|
|
|
|
|
|
|
|
if(CMAKE_COMPILER_IS_GNUCC)
|
|
|
|
include(GCCConfiguration)
|
|
|
|
endif(CMAKE_COMPILER_IS_GNUCC)
|
|
|
|
|
|
|
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${WARNINGS}")
|
|
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${WARNINGS}")
|
|
|
|
|
2016-03-24 20:27:01 +00:00
|
|
|
if (Qt5_POSITION_INDEPENDENT_CODE)
|
|
|
|
SET(CMAKE_POSITION_INDEPENDENT_CODE ON)
|
|
|
|
endif(Qt5_POSITION_INDEPENDENT_CODE)
|
|
|
|
|
2015-10-13 09:05:27 +00:00
|
|
|
add_subdirectory(external)
|
|
|
|
add_subdirectory(src)
|
|
|
|
|
|
|
|
include(CPackConfiguration)
|
2016-02-22 07:59:57 +00:00
|
|
|
|
|
|
|
add_custom_target(install_app_bundle COMMAND ${CMAKE_COMMAND} -P cmake_install.cmake DEPENDS PlexMediaPlayer PMPHelper)
|