Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
BC
public
mediastreamer2
Commits
0d0d460c
Commit
0d0d460c
authored
Feb 24, 2015
by
Ghislain MARY
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Build tests when building with CMake.
parent
64892163
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
65 additions
and
0 deletions
+65
-0
CMakeLists.txt
CMakeLists.txt
+22
-0
mediastreamer-config.h.cmake
mediastreamer-config.h.cmake
+3
-0
tester/CMakeLists.txt
tester/CMakeLists.txt
+40
-0
No files found.
CMakeLists.txt
View file @
0d0d460c
...
...
@@ -59,6 +59,8 @@ option(ENABLE_STATIC "Build static library (default is shared library)." NO)
option
(
ENABLE_DEBUG_LOGS
"Enable the display of traces showing the execution of the library."
NO
)
option
(
ENABLE_FIXED_POINT
"Turn on fixed point computations."
${
ENABLE_FIXED_POINT_DEFAULT_VALUE
}
)
option
(
ENABLE_RELATIVE_PREFIX
"Find resources relatively to the installation directory."
NO
)
option
(
ENABLE_UNIT_TESTS
"Enable compilation of unit tests."
YES
)
cmake_dependent_option
(
ENABLE_DTLS
"Build with DTLS support."
YES
"ENABLE_SRTP"
NO
)
option
(
ENABLE_SRTP
"Build with the SRTP transport support."
YES
)
option
(
ENABLE_ZRTP
"Build with ZRTP support."
YES
)
...
...
@@ -93,6 +95,7 @@ list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
include
(
CheckIncludeFile
)
include
(
CheckLibraryExists
)
include
(
CMakePushCheckState
)
if
(
MSVC
)
list
(
APPEND CMAKE_REQUIRED_INCLUDES
${
CMAKE_PREFIX_PATH
}
/include/MSVC
)
...
...
@@ -134,6 +137,22 @@ include(TestBigEndian)
test_big_endian
(
WORDS_BIGENDIAN
)
find_package
(
ORTP REQUIRED
)
if
(
ENABLE_UNIT_TESTS
)
find_package
(
CUnit
)
if
(
CUNIT_FOUND
)
cmake_push_check_state
(
RESET
)
list
(
APPEND CMAKE_REQUIRED_INCLUDES
${
CUNIT_INCLUDE_DIRS
}
)
list
(
APPEND CMAKE_REQUIRED_LIBRARIES
${
CUNIT_LIBRARIES
}
)
check_symbol_exists
(
"CU_get_suite"
"CUnit/CUnit.h"
HAVE_CU_GET_SUITE
)
check_symbol_exists
(
"CU_curses_run_tests"
"CUnit/CUnit.h"
HAVE_CU_CURSES
)
cmake_pop_check_state
()
else
()
message
(
WARNING
"Could not find the cunit library!"
)
set
(
ENABLE_UNIT_TESTS OFF CACHE BOOL
"Enable compilation of unit tests."
FORCE
)
endif
()
endif
()
if
(
ENABLE_SRTP
)
find_package
(
SRTP
)
if
(
NOT SRTP_FOUND
)
...
...
@@ -390,3 +409,6 @@ add_subdirectory(cmake)
add_subdirectory
(
help
)
add_subdirectory
(
include
)
add_subdirectory
(
src
)
if
(
ENABLE_UNIT_TESTS
)
add_subdirectory
(
tester
)
endif
()
mediastreamer-config.h.cmake
View file @
0d0d460c
...
...
@@ -49,6 +49,9 @@
#cmakedefine WORDS_BIGENDIAN
#cmakedefine MS_FIXED_POINT
#cmakedefine HAVE_CU_GET_SUITE 1
#cmakedefine HAVE_CU_CURSES 1
#cmakedefine HAVE_SRTP
#cmakedefine HAVE_ZRTP
#cmakedefine HAVE_DTLS
...
...
tester/CMakeLists.txt
0 → 100644
View file @
0d0d460c
############################################################################
# CMakeLists.txt
# Copyright (C) 2015 Belledonne Communications, Grenoble France
#
############################################################################
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
############################################################################
set
(
SOURCE_FILES
mediastreamer2_adaptive_tester.c
mediastreamer2_audio_stream_tester.c
mediastreamer2_basic_audio_tester.c
mediastreamer2_framework_tester.c
mediastreamer2_player_tester.c
mediastreamer2_sound_card_tester.c
mediastreamer2_tester.c
mediastreamer2_tester_private.c
)
if
(
ENABLE_VIDEO
)
list
(
APPEND SOURCE_FILES mediastreamer2_video_stream_tester.c
)
endif
()
add_executable
(
mediastreamer2_tester
${
SOURCE_FILES
}
)
target_include_directories
(
mediastreamer2_tester PUBLIC
${
CUNIT_INCLUDE_DIRS
}
)
target_link_libraries
(
mediastreamer2_tester mediastreamer_voip mediastreamer_base
${
CUNIT_LIBRARIES
}
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment