File: CMakeLists.txt

package info (click to toggle)
kodi-audioencoder-vorbis 3.0.1%2Bds1-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 156 kB
  • sloc: cpp: 206; xml: 34; makefile: 10
file content (32 lines) | stat: -rw-r--r-- 853 bytes parent folder | download | duplicates (3)
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
cmake_minimum_required(VERSION 3.5)
project(audioencoder.vorbis)

set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PROJECT_SOURCE_DIR})

find_package(Kodi REQUIRED)
find_package(Ogg REQUIRED)
find_package(Vorbis REQUIRED)
if(NOT WIN32)
  find_package(VorbisEnc REQUIRED)
endif()

set(INCLUDE_DIRS ${KODI_INCLUDE_DIR}/.. # Hack way with "/..", need bigger Kodi cmake rework to match right include ways (becomes done in future)
                 ${OGG_INCLUDE_DIRS}
                 ${VORBIS_INCLUDE_DIRS})
if(NOT WIN32)
  list(APPEND INCLUDE_DIRS ${VORBISENC_INCLUDE_DIRS})
endif()

include_directories(${INCLUDE_DIRS})

set(VORBIS_SOURCES src/EncoderVorbis.cpp)

set(DEPLIBS ${OGG_LIBRARIES}
            ${VORBIS_LIBRARIES})
if(NOT WIN32)
  list(APPEND DEPLIBS ${VORBISENC_LIBRARIES})
endif()

build_addon(audioencoder.vorbis VORBIS DEPLIBS)

include(CPack)