File: CMakeLists.txt

package info (click to toggle)
kodi-pvr-vdr-vnsi 3.6.4-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 1,068 kB
  • sloc: cpp: 6,536; xml: 2,400; makefile: 16
file content (85 lines) | stat: -rw-r--r-- 2,841 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
cmake_minimum_required(VERSION 3.5)
project(pvr.vdr.vnsi)

set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PROJECT_SOURCE_DIR})

find_package(Kodi REQUIRED)
find_package(p8-platform REQUIRED)

add_definitions(-DUSE_DEMUX)

if(NOT WIN32)
  find_package(EMBEDDED)
  if((APP_RENDER_SYSTEM STREQUAL "gl" OR NOT APP_RENDER_SYSTEM) AND NOT EMBEDDED_FOUND)
    find_package(OpenGL)
  endif()

  if(OPENGL_FOUND)
    set(APP_RENDER_SYSTEM gl)
    set(INCLUDES ${OPENGL_INCLUDE_DIR})
    set(DEPLIBS ${OPENGL_LIBRARIES})
    set(VDR_SOURCES src/shaders/GUIShader.cpp
                    src/shaders/Matrix.cpp
                    src/shaders/Shader.cpp)
    add_definitions(-DHAS_GL)
    message(STATUS "VDR OSD support enabled via OpenGL")
  else()
    find_package(OpenGLES2)
    if(OPENGLES2_FOUND)
      set(APP_RENDER_SYSTEM gles)
      set(VDR_SOURCES src/shaders/GUIShader.cpp
                      src/shaders/Matrix.cpp
                      src/shaders/Shader.cpp)
      add_definitions(-DHAS_GLES2)
      set(INCLUDES ${OPENGLES2_INCLUDE_DIRS})
      set(DEPLIBS ${OPENGLES2_LIBRARIES})
      message(STATUS "VDR OSD support enabled via OpenGLES")
    else()
      message(STATUS " VDR OSD support disabled because OpenGL(ES) wasn't found")
    endif()
  endif()
else()
  message(STATUS " VDR OSD support disabled because it is not migrated to DX11 yet")
endif()

list(APPEND VDR_SOURCES src/client.cpp
                        src/requestpacket.cpp
                        src/responsepacket.cpp
                        src/tools.cpp
                        src/VNSIAdmin.cpp
                        src/VNSIChannels.cpp
                        src/VNSIChannelScan.cpp
                        src/VNSIData.cpp
                        src/VNSIDemux.cpp
                        src/VNSIRecording.cpp
                        src/VNSISession.cpp)

list(APPEND VDR_HEADERS src/client.h
                        src/requestpacket.h
                        src/responsepacket.h
                        src/tools.h
                        src/VNSIAdmin.h
                        src/VNSIChannelScan.h
                        src/VNSIChannels.h
                        src/vnsicommand.h
                        src/VNSIData.h
                        src/VNSIDemux.h
                        src/VNSIRecording.h
                        src/VNSISession.h)

list(APPEND DEPLIBS ${p8-platform_LIBRARIES})
if(WIN32)
  set(APP_RENDER_SYSTEM dx11)
  list(APPEND DEPLIBS ws2_32)
  add_definitions(-D_CRT_NONSTDC_NO_DEPRECATE)
endif()

message(STATUS "Configured render system: ${APP_RENDER_SYSTEM}")

include_directories(${INCLUDES}
                    ${p8-platform_INCLUDE_DIRS}
                    ${KODI_INCLUDE_DIR}/..) # Hack way with "/..", need bigger Kodi cmake rework to match right include ways

build_addon(pvr.vdr.vnsi VDR DEPLIBS)

include(CPack)