-
Notifications
You must be signed in to change notification settings - Fork 9
/
CMakeLists.txt
67 lines (56 loc) · 1.9 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
project(game.moonlight)
cmake_minimum_required(VERSION 2.6)
enable_language(CXX)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PROJECT_SOURCE_DIR})
ADD_SUBDIRECTORY(lib/moonlight)
find_package(kodi REQUIRED)
find_package(kodiplatform REQUIRED)
find_package(platform REQUIRED)
find_package(OpenSSL REQUIRED)
find_package(CURL REQUIRED)
find_package(Opus REQUIRED)
include_directories(
${INCLUDES}
${platform_INCLUDE_DIRS}
${kodiplatform_INCLUDE_DIRS}
${OPENSSL_INCLUDE_DIRS}
${KODI_INCLUDE_DIR}
${CURL_INCLUDE_DIR}
${OPUS_INCLUDE_DIR}
${PROJECT_SOURCE_DIR}/lib/pugixml/src
${PROJECT_SOURCE_DIR}/src
${PROJECT_SOURCE_DIR}/lib/moonlight/limelight-common)
list(APPEND DEPLIBS
${kodiplatform_LIBRARIES}
${platform_LIBRARIES}
${OPENSSL_LIBRARIES}
${CURL_LIBRARIES}
${OPUS_LIBRARIES}
moonlight)
set(MOONLIGHT_SOURCES
src/MoonlightClient.cpp
src/MoonlightEnvironment.cpp
src/input/InputManager.cpp
src/log/Log.cpp
src/log/LogAddon.cpp
src/log/LogConsole.cpp
src/log/LogSyslog.cpp
src/nvstream/CertKeyPair.cpp
src/nvstream/NvApp.cpp
src/nvstream/NvHTTP.cpp
src/nvstream/PairingManager.cpp
src/nvstream/http.c
src/settings/Resolution.cpp
src/settings/Settings.cpp
src/callbacks/VideoCallbacks.cpp
src/callbacks/ConnectionCallbacks.cpp
src/callbacks/AudioCallbacks.cpp
lib/pugixml/src/pugixml.cpp)
# build standalone
set(STANDALONE_SOURCES ${MOONLIGHT_SOURCES} src/main.cpp)
add_executable(moonlight_client ${STANDALONE_SOURCES})
target_link_libraries(moonlight_client ${DEPLIBS})
# build addon
set(ADDON_SOURCES ${MOONLIGHT_SOURCES} src/addon.cpp)
build_addon(game.moonlight ADDON DEPLIBS)
include(CPack)