Skip to content

Commit a49979e

Browse files
ferdnycjonoomph
authored andcommitted
tests/CMakeLists: Use same dependencies as src/ (#163)
* tests/CMakeFiles: Use FFMpeg like src/ * Use system jsoncpp in tests, too The tests/ build needs to use the same jsoncpp as the src/ build, or tests in Clip_Tests.cpp can fail. * Don't show FFMpeg version messages in tests/ Displaying the version-number messages twice seems like overkill
1 parent c56b5bf commit a49979e

File tree

1 file changed

+35
-3
lines changed

1 file changed

+35
-3
lines changed

tests/CMakeLists.txt

Lines changed: 35 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,33 @@ ENDIF (ImageMagick_FOUND)
7979
FIND_PACKAGE(FFmpeg REQUIRED)
8080

8181
# Include FFmpeg headers (needed for compile)
82-
include_directories(${FFMPEG_INCLUDE_DIR})
82+
IF (AVCODEC_FOUND)
83+
include_directories(${AVCODEC_INCLUDE_DIRS})
84+
ENDIF (AVCODEC_FOUND)
85+
IF (AVDEVICE_FOUND)
86+
include_directories(${AVDEVICE_INCLUDE_DIRS})
87+
ENDIF (AVDEVICE_FOUND)
88+
IF (AVFORMAT_FOUND)
89+
include_directories(${AVFORMAT_INCLUDE_DIRS})
90+
ENDIF (AVFORMAT_FOUND)
91+
IF (AVFILTER_FOUND)
92+
include_directories(${AVFILTER_INCLUDE_DIRS})
93+
ENDIF (AVFILTER_FOUND)
94+
IF (AVUTIL_FOUND)
95+
include_directories(${AVUTIL_INCLUDE_DIRS})
96+
ENDIF (AVUTIL_FOUND)
97+
IF (POSTPROC_FOUND)
98+
include_directories(${POSTPROC_INCLUDE_DIRS})
99+
ENDIF (POSTPROC_FOUND)
100+
IF (SWSCALE_FOUND)
101+
include_directories(${SWSCALE_INCLUDE_DIRS})
102+
ENDIF (SWSCALE_FOUND)
103+
IF (SWRESAMPLE_FOUND)
104+
include_directories(${SWRESAMPLE_INCLUDE_DIRS})
105+
ENDIF (SWRESAMPLE_FOUND)
106+
IF (AVRESAMPLE_FOUND)
107+
include_directories(${AVRESAMPLE_INCLUDE_DIRS})
108+
ENDIF (AVRESAMPLE_FOUND)
83109

84110
################# LIBOPENSHOT-AUDIO ###################
85111
# Find JUCE-based openshot Audio libraries
@@ -150,12 +176,18 @@ endif(OPENMP_FOUND)
150176
# Find ZeroMQ library (used for socket communication & logging)
151177
FIND_PACKAGE(ZMQ REQUIRED)
152178

153-
# Include FFmpeg headers (needed for compile)
179+
# Include ZeroMQ headers (needed for compile)
154180
include_directories(${ZMQ_INCLUDE_DIRS})
155181

156182
################### JSONCPP #####################
157183
# Include jsoncpp headers (needed for JSON parsing)
158-
include_directories("../thirdparty/jsoncpp/include")
184+
if (USE_SYSTEM_JSONCPP)
185+
find_package(JsonCpp REQUIRED)
186+
include_directories(${JSONCPP_INCLUDE_DIRS})
187+
else()
188+
message("Using embedded JsonCpp")
189+
include_directories("../thirdparty/jsoncpp/include")
190+
endif(USE_SYSTEM_JSONCPP)
159191

160192
IF (NOT DISABLE_TESTS)
161193
############### SET TEST SOURCE FILES #################

0 commit comments

Comments
 (0)