forked from tobiasebsen/libndi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
48 lines (38 loc) · 1002 Bytes
/
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
cmake_minimum_required(VERSION 3.0)
project(libndi)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
include_directories(
include/
)
set(NDI_SOURCES "src/recv.c" "src/scramble.c" "src/codec.c")
if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
include_directories(/opt/vc/include /usr/include)
link_directories(/opt/vc/lib)
list(APPEND NDI_SOURCES "src/find_avahi.c")
endif()
if(APPLE)
include_directories(
/usr/local/include
)
link_directories(
/usr/local/lib
)
list(APPEND NDI_SOURCES "src/find_dnssd.c")
endif()
add_library(ndi
src/recv.c
src/scramble.c
src/codec.c
${NDI_SOURCES}
)
target_link_libraries(ndi PUBLIC
avcodec
avformat
avutil
avahi-client
avahi-common
)
target_include_directories(ndi PUBLIC include/)
target_compile_options(ndi PRIVATE -ftree-vectorize -ftree-loop-vectorize -O4)
#add_subdirectory(examples/example-recv-gl)