forked from kodi-pvr/pvr.hdhomerun
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
68 lines (55 loc) · 2.06 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
57
58
59
60
61
62
63
64
65
66
67
68
project(pvr.hdhomerun)
cmake_minimum_required(VERSION 3.5)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ggdb -g3")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -ggdb -g3")
if(CMAKE_BUILD_TYPE STREQUAL Debug)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Og")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Og")
endif()
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PROJECT_SOURCE_DIR})
enable_language(CXX)
find_package(Kodi REQUIRED)
find_package(kodiplatform REQUIRED)
find_package(p8-platform REQUIRED)
find_package(JsonCpp REQUIRED)
find_package(hdhomerun REQUIRED)
include_directories(${kodiplatform_INCLUDE_DIRS}
${p8-platform_INCLUDE_DIRS}
${KODI_INCLUDE_DIR}
${JSONCPP_INCLUDE_DIRS}
${HDHOMERUN_INCLUDE_DIRS})
set(DEPLIBS ${kodiplatform_LIBRARIES}
${p8-platform_LIBRARIES}
${JSONCPP_LIBRARIES}
${HDHOMERUN_LIBRARIES})
set(PVRHDHOMERUN_SOURCES src/Addon.cpp
src/Entry.cpp
src/Device.cpp
src/Info.cpp
src/Guide.cpp
src/IntervalSet.cpp
src/PVR_HDHR.cpp
src/Recording.cpp
src/Utils.cpp)
set(PVRHDHOMERUN_HEADERS src/Addon.h
src/Entry.h
src/Device.h
src/Info.h
src/Guide.h
src/Lockable.h
src/IntervalSet.h
src/PVR_HDHR.h
src/Recording.h
src/UniqueID.h
src/Utils.h)
if(WIN32)
list(APPEND DEPLIBS ws2_32)
list(APPEND DEPLIBS iphlpapi)
if(CMAKE_SYSTEM_NAME STREQUAL WindowsStore)
# if _WIN32_WINNT isn't defined before including hdhomerun.h then
# it's defined as _WIN32_WINNT_VISTA which breaks build on UWP
add_definitions(-D_WIN32_WINNT=0x0A00)
endif()
endif()
build_addon(pvr.hdhomerun PVRHDHOMERUN DEPLIBS)
include(CPack)