forked from xbmc/visualization.matrix
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
41 lines (30 loc) · 1.13 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
cmake_minimum_required(VERSION 3.5)
project(visualization.matrix)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PROJECT_SOURCE_DIR})
find_package(Kodi REQUIRED)
find_package(glm REQUIRED)
add_subdirectory(lib/kissfft)
if(NOT WIN32 AND (APP_RENDER_SYSTEM STREQUAL "gl" OR NOT APP_RENDER_SYSTEM))
find_package(OpenGl REQUIRED)
set(DEPLIBS ${OPENGL_LIBRARIES})
set(includes ${OPENGL_INCLUDE_DIR})
add_definitions(${OPENGL_DEFINITIONS})
else()
find_package(OpenGLES REQUIRED)
set(DEPLIBS ${OPENGLES_LIBRARIES})
set(includes ${OPENGLES_INCLUDE_DIR})
add_definitions(${OPENGLES_DEFINITIONS})
endif()
include_directories(${GLM_INCLUDE_DIR}
${KODI_INCLUDE_DIR}/.. # Hack way with "/..", need bigger Kodi cmake rework to match right include ways
${PROJECT_SOURCE_DIR}/lib)
if(CORE_SYSTEM_NAME STREQUAL osx OR
CORE_SYSTEM_NAME STREQUAL ios OR
CORE_SYSTEM_NAME STREQUAL darwin_embedded)
list(APPEND DEPLIBS "-framework CoreVideo")
endif()
set(MATRIX_SOURCES src/main.cpp)
set(MATRIX_HEADERS src/main.h)
list(APPEND DEPLIBS kissfft)
build_addon(visualization.matrix MATRIX DEPLIBS)
include(CPack)