-
Notifications
You must be signed in to change notification settings - Fork 7
/
CMakeLists.txt
58 lines (47 loc) · 2.18 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
cmake_minimum_required(VERSION 3.12)
project(Cinecoder.Samples)
list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake_scripts")
find_package(Cinecoder REQUIRED)
find_package(Cinecoder.Plugin.Multiplexers REQUIRED)
if(UNIX AND NOT APPLE)
find_package(CUDAConvertLib REQUIRED)
endif()
if(APPLE)
set(EXECUTABLE_OUTPUT_PATH "${CMAKE_SOURCE_DIR}/_bin/macosx")
else()
set(EXECUTABLE_OUTPUT_PATH "${CMAKE_SOURCE_DIR}/_bin/linux")
endif()
#add_custom_command(
# TARGET Cinecoder.Samples
# POST_BUILD
# COMMAND ${CMAKE_COMMAND} -E copy
# "${Cinecoder_LIBRARY_DIRS}/*"
# "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}"
#)
file(MAKE_DIRECTORY ${EXECUTABLE_OUTPUT_PATH})
if(APPLE)
configure_file(${Cinecoder_LIBRARY_DIRS}/libCinecoder.dylib ${EXECUTABLE_OUTPUT_PATH} COPYONLY)
#configure_file(${Cinecoder.Plugin.Multiplexers_LIBRARY_DIRS}/libMXFToolkit_portable.dylib ${EXECUTABLE_OUTPUT_PATH} COPYONLY)
configure_file(${Cinecoder.Plugin.Multiplexers_LIBRARY_DIRS}/libCinecoder.Plugin.Multiplexers.dylib ${EXECUTABLE_OUTPUT_PATH} COPYONLY)
else()
configure_file(${Cinecoder_LIBRARY_DIRS}/libCinecoder.so ${EXECUTABLE_OUTPUT_PATH} COPYONLY)
if(EXISTS "${Cinecoder_LIBRARY_DIRS}/libd2cudalib.so")
configure_file(${Cinecoder_LIBRARY_DIRS}/libd2cudalib.so ${EXECUTABLE_OUTPUT_PATH} COPYONLY)
endif()
if(EXISTS "${Cinecoder_LIBRARY_DIRS}/libCinecoder.d2cudalibv2.so")
configure_file(${Cinecoder_LIBRARY_DIRS}/libCinecoder.d2cudalibv2.so ${EXECUTABLE_OUTPUT_PATH} COPYONLY)
endif()
if(EXISTS "${Cinecoder_LIBRARY_DIRS}/libCinecoder.d2ocllibv2.so")
configure_file(${Cinecoder_LIBRARY_DIRS}/libCinecoder.d2ocllibv2.so ${EXECUTABLE_OUTPUT_PATH} COPYONLY)
endif()
#configure_file(${Cinecoder.Plugin.Multiplexers_LIBRARY_DIRS}/libMXFToolkit_portable.so ${EXECUTABLE_OUTPUT_PATH} COPYONLY)
configure_file(${Cinecoder.Plugin.Multiplexers_LIBRARY_DIRS}/libCinecoder.Plugin.Multiplexers.so ${EXECUTABLE_OUTPUT_PATH} COPYONLY)
configure_file(${CUDAConvertLib_LIBRARY_DIRS}/libcudaconvertlib.so ${EXECUTABLE_OUTPUT_PATH} COPYONLY)
endif()
add_subdirectory(SimpleVideoDecoder)
add_subdirectory(SimpleVideoEncoder)
if(NOT ANDROID)
add_subdirectory(Daniel2.SimplePlayerGL)
endif()
add_subdirectory(Daniel2.DPXEncoder)
add_subdirectory(Daniel2.Benchmark)