forked from djp952/pvr.hdhomerundvr
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
50 lines (34 loc) · 1.23 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
project(pvr.hdhomerundvr)
cmake_minimum_required(VERSION 2.6)
set(CMAKE_VERBOSE_MAKEFILE on)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PROJECT_SOURCE_DIR})
enable_language(CXX)
find_package(Kodi REQUIRED)
find_package(kodiplatform REQUIRED)
find_package(hdhomerun REQUIRED)
find_package(sqlite REQUIRED)
find_package(uuid REQUIRED)
find_package(curl REQUIRED)
include_directories(${kodiplatform_INCLUDE_DIRS}
${p8-platform_LIBRARIES}
${HDHOMERUN_INCLUDE_DIRS}
${SQLITE_INCLUDE_DIRS}
${CURL_INCLUDE_DIRS})
set(DEPLIBS ${kodiplatform_LIBRARIES}
${CURL_LIBRARIES})
file(GLOB PVRDVRHDHOMERUN_SOURCES src/*.cpp)
file(GLOB PVRDVRHDHOMERUN_HEADERS src/*.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()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /U_WINSOCKAPI_")
else()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ggdb")
endif()
build_addon(pvr.dvr.hdhomerun PVRDVRHDHOMERUN DEPLIBS)
include(CPack)