forked from janbar/pvr.mythtv
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
51 lines (38 loc) · 1.2 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
cmake_minimum_required(VERSION 3.5)
project(pvr.mythtv)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PROJECT_SOURCE_DIR})
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
find_package(Kodi REQUIRED)
include_directories(${KODI_INCLUDE_DIR}/.. # Hack way with "/..", need bigger Kodi cmake rework to match right include ways
${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 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)