forked from kodi-pvr/pvr.mythtv
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
56 lines (42 loc) · 1.29 KB
/
CMakeLists.txt
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
project(pvr.mythtv)
cmake_minimum_required(VERSION 2.8.12)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PROJECT_SOURCE_DIR})
enable_language(CXX)
enable_language(C)
find_package(Kodi REQUIRED)
find_package(kodiplatform REQUIRED)
find_package(p8-platform REQUIRED)
include_directories(${kodiplatform_INCLUDE_DIRS}
${p8-platform_INCLUDE_DIRS}
${KODI_INCLUDE_DIR}
${PROJECT_SOURCE_DIR}/lib/cppmyth/src)
add_definitions(-DUSE_DEMUX -D__STDC_FORMAT_MACROS)
if(NOT WIN32)
add_options(ALL_LANGUAGES ALL_BUILDS "-fPIC -Wall")
endif()
file (GLOB MYTHTV_SOURCES
src/demuxer/*.cpp
src/cppmyth/*.cpp
src/*.cpp)
file (GLOB MYTHTV_HEADERS
src/demuxer/*.h
src/cppmyth/*.h
src/*.h)
add_subdirectory(lib/cppmyth)
set(DEPLIBS ${p8-platform_LIBRARIES} cppmyth)
if(WIN32)
list(APPEND DEPLIBS ws2_32)
else()
list(APPEND DEPLIBS m)
endif()
if(NOT WIN32 AND (CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX))
if(HAS_BUILTIN_SYNC_ADD_AND_FETCH)
add_options(ALL_LANGUAGES ALL_BUILDS "-DHAS_BUILTIN_SYNC_ADD_AND_FETCH")
endif()
if(HAS_BUILTIN_SYNC_SUB_AND_FETCH)
add_options(ALL_LANGUAGES ALL_BUILDS "-DHAS_BUILTIN_SYNC_SUB_AND_FETCH")
endif()
endif()
set(BUILD_SHARED_LIBS ON)
build_addon(pvr.mythtv MYTHTV DEPLIBS)
include(CPack)