Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
BC
public
mediastreamer2
Commits
5a4ae4dc
Commit
5a4ae4dc
authored
Jan 21, 2016
by
Ghislain MARY
Browse files
Support build for Windows 10 with CMake.
parent
017ed6ae
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
69 additions
and
20 deletions
+69
-20
CMakeLists.txt
CMakeLists.txt
+7
-7
src/CMakeLists.txt
src/CMakeLists.txt
+26
-5
tester/CMakeLists.txt
tester/CMakeLists.txt
+34
-6
tester/mediastreamer2_tester_windows.cpp
tester/mediastreamer2_tester_windows.cpp
+1
-1
tester/mediastreamer2_tester_windows.h
tester/mediastreamer2_tester_windows.h
+1
-1
No files found.
CMakeLists.txt
View file @
5a4ae4dc
...
...
@@ -121,11 +121,6 @@ include(CheckIncludeFile)
include
(
CheckLibraryExists
)
include
(
CMakePushCheckState
)
set
(
MSVC_INCLUDE_DIR
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/include/MSVC"
)
if
(
MSVC
)
list
(
APPEND CMAKE_REQUIRED_INCLUDES
"
${
MSVC_INCLUDE_DIR
}
"
)
endif
()
find_package
(
Threads
)
check_include_file
(
sys/shm.h HAVE_SYS_SHM_H
)
...
...
@@ -442,8 +437,13 @@ if(MATROSKA2_FOUND)
set
(
HAVE_MATROSKA 1
)
endif
()
if
(
ENABLE_RELATIVE_PREFIX
)
set
(
PACKAGE_PLUGINS_DIR
"./lib/mediastreamer/plugins"
)
set
(
PACKAGE_DATA_DIR
"./share"
)
if
(
CMAKE_SYSTEM_NAME STREQUAL
"WindowsPhone"
OR CMAKE_SYSTEM_NAME STREQUAL
"WindowsStore"
)
set
(
PACKAGE_PLUGINS_DIR
"."
)
set
(
PACKAGE_DATA_DIR
"."
)
else
()
set
(
PACKAGE_PLUGINS_DIR
"./lib/mediastreamer/plugins"
)
set
(
PACKAGE_DATA_DIR
"./share"
)
endif
()
else
()
set
(
PACKAGE_PLUGINS_DIR
"
${
CMAKE_INSTALL_PREFIX
}
/lib/mediastreamer/plugins"
)
set
(
PACKAGE_DATA_DIR
"
${
CMAKE_INSTALL_PREFIX
}
/share"
)
...
...
src/CMakeLists.txt
View file @
5a4ae4dc
...
...
@@ -20,7 +20,7 @@
#
############################################################################
if
(
MSVC AND NOT CMAKE_SYSTEM_NAME STREQUAL
"WindowsPhone"
)
if
(
MSVC AND NOT CMAKE_SYSTEM_NAME STREQUAL
"WindowsPhone"
AND NOT CMAKE_SYSTEM_NAME STREQUAL
"WindowsStore"
)
find_library
(
LIBGCC NAMES gcc
)
find_library
(
LIBMINGWEX NAMES mingwex
)
endif
()
...
...
@@ -70,7 +70,7 @@ add_definitions(
set
(
BASE_LIBS
${
ORTP_LIBRARIES
}
)
if
(
WIN32 AND NOT CMAKE_SYSTEM_NAME STREQUAL
"WindowsPhone"
)
if
(
WIN32 AND NOT CMAKE_SYSTEM_NAME STREQUAL
"WindowsPhone"
AND NOT CMAKE_SYSTEM_NAME STREQUAL
"WindowsStore"
)
list
(
APPEND BASE_LIBS
${
LIBGCC
}
${
LIBMINGWEX
}
ole32 oleaut32 uuid
)
endif
()
if
(
HAVE_DLOPEN
)
...
...
@@ -193,7 +193,7 @@ if(IOS)
list
(
APPEND VOIP_SOURCE_FILES_C audiofilters/aac-eld.c
)
list
(
APPEND VOIP_SOURCE_FILES_OBJC audiofilters/msiounit.m
)
endif
()
if
(
WIN32 AND NOT CMAKE_SYSTEM_NAME STREQUAL
"WindowsPhone"
)
if
(
WIN32 AND NOT CMAKE_SYSTEM_NAME STREQUAL
"WindowsPhone"
AND NOT CMAKE_SYSTEM_NAME STREQUAL
"WindowsStore"
)
list
(
APPEND VOIP_SOURCE_FILES_C audiofilters/winsnd3.c
)
endif
()
...
...
@@ -233,7 +233,7 @@ if(ENABLE_VIDEO)
voip/videostream.c
voip/video_preset_high_fps.c
)
if
(
WIN32 AND NOT CMAKE_SYSTEM_NAME STREQUAL
"WindowsPhone"
)
if
(
WIN32 AND NOT CMAKE_SYSTEM_NAME STREQUAL
"WindowsPhone"
AND NOT CMAKE_SYSTEM_NAME STREQUAL
"WindowsStore"
)
add_definitions
(
-DHAVE_DIRECTSHOW
)
list
(
APPEND VOIP_SOURCE_FILES_C
videofilters/drawdib-display.c
...
...
@@ -376,7 +376,7 @@ set(VOIP_LIBS
mediastreamer_base
)
if
(
WIN32
)
if
(
NOT CMAKE_SYSTEM_NAME STREQUAL
"WindowsPhone"
)
if
(
NOT CMAKE_SYSTEM_NAME STREQUAL
"WindowsPhone"
AND NOT CMAKE_SYSTEM_NAME STREQUAL
"WindowsStore"
)
list
(
APPEND VOIP_LIBS
${
LIBGCC
}
${
LIBMINGWEX
}
ole32 oleaut32 uuid
)
if
(
ENABLE_VIDEO
)
list
(
APPEND VOIP_LIBS gdi32 user32 vfw32
)
...
...
@@ -491,3 +491,24 @@ if(ENABLE_VIDEO)
PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
)
endif
()
if
(
ENABLE_VIDEO AND CMAKE_SYSTEM_NAME STREQUAL
"WindowsStore"
)
add_library
(
mswinrtjpeg2yuv MODULE
"videofilters/winrtjpeg2yuv.cpp"
)
set_target_properties
(
mswinrtjpeg2yuv PROPERTIES LINKER_LANGUAGE CXX VS_WINRT_COMPONENT TRUE
)
target_link_libraries
(
mswinrtjpeg2yuv mediastreamer_voip
)
install
(
TARGETS mswinrtjpeg2yuv
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
)
if
(
CMAKE_BUILD_TYPE STREQUAL
"Debug"
)
install
(
FILES
${
CMAKE_CURRENT_BINARY_DIR
}
/Debug/mswinrtjpeg2yuv.pdb
DESTINATION bin
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
)
endif
()
endif
()
tester/CMakeLists.txt
View file @
5a4ae4dc
...
...
@@ -51,10 +51,38 @@ endif()
apply_compile_flags
(
SOURCE_FILES_C
"CPP"
"C"
)
apply_compile_flags
(
SOURCE_FILES_OBJC
"CPP"
"OBJC"
)
add_executable
(
mediastreamer2_tester
${
SOURCE_FILES_C
}
${
SOURCE_FILES_OBJC
}
)
target_include_directories
(
mediastreamer2_tester PUBLIC
${
CUNIT_INCLUDE_DIRS
}
PRIVATE common
)
target_link_libraries
(
mediastreamer2_tester mediastreamer_voip mediastreamer_base
${
CUNIT_LIBRARIES
}
)
string
(
REPLACE
";"
" "
LINK_FLAGS_STR
"
${
LINK_FLAGS
}
"
)
if
(
LINK_FLAGS_STR
)
set_target_properties
(
mediastreamer2_tester PROPERTIES LINK_FLAGS
"
${
LINK_FLAGS_STR
}
"
)
if
(
CMAKE_SYSTEM_NAME STREQUAL
"WindowsStore"
)
add_library
(
mediastreamer2_tester_static STATIC
${
SOURCE_FILES_C
}
)
target_include_directories
(
mediastreamer2_tester_static PUBLIC
${
CUNIT_INCLUDE_DIRS
}
PRIVATE common
)
target_link_libraries
(
mediastreamer2_tester_static mediastreamer_voip mediastreamer_base
${
CUNIT_LIBRARIES
}
)
set
(
RUNTIME_COMPONENT_SOURCES
mediastreamer2_tester_windows.cpp
mediastreamer2_tester_windows.h
)
add_library
(
mediastreamer2_tester_runtime MODULE
${
RUNTIME_COMPONENT_SOURCES
}
)
target_include_directories
(
mediastreamer2_tester_runtime PRIVATE common
)
target_include_directories
(
mediastreamer2_tester_runtime PRIVATE
"../../../mswinrtvid"
)
# HACK!!
target_link_libraries
(
mediastreamer2_tester_runtime mediastreamer2_tester_static
)
set_target_properties
(
mediastreamer2_tester_runtime PROPERTIES VS_WINRT_COMPONENT TRUE
)
install
(
TARGETS mediastreamer2_tester_runtime
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
)
install
(
FILES
"
${
CMAKE_CURRENT_BINARY_DIR
}
/
${
CMAKE_BUILD_TYPE
}
/mediastreamer2_tester_runtime.winmd"
DESTINATION bin
)
else
()
add_executable
(
mediastreamer2_tester
${
SOURCE_FILES_C
}
${
SOURCE_FILES_OBJC
}
)
target_include_directories
(
mediastreamer2_tester PUBLIC
${
CUNIT_INCLUDE_DIRS
}
PRIVATE common
)
target_link_libraries
(
mediastreamer2_tester mediastreamer_voip mediastreamer_base
${
CUNIT_LIBRARIES
}
)
string
(
REPLACE
";"
" "
LINK_FLAGS_STR
"
${
LINK_FLAGS
}
"
)
if
(
LINK_FLAGS_STR
)
set_target_properties
(
mediastreamer2_tester PROPERTIES LINK_FLAGS
"
${
LINK_FLAGS_STR
}
"
)
endif
()
endif
()
tester/mediastreamer2_tester_windows.cpp
View file @
5a4ae4dc
...
...
@@ -4,7 +4,7 @@
#include "mediastreamer2_tester_windows.h"
#include "mswinrtvid.h"
using
namespace
m
s
2_tester_runtime
_component
;
using
namespace
m
ediastreamer
2_tester_runtime
;
using
namespace
Platform
;
using
namespace
Platform
::
Collections
;
using
namespace
Windows
::
Foundation
;
...
...
tester/mediastreamer2_tester_windows.h
View file @
5a4ae4dc
...
...
@@ -3,7 +3,7 @@
#include "mediastreamer2/mscommon.h"
#include "mediastreamer2_tester.h"
namespace
m
s
2_tester_runtime
_component
namespace
m
ediastreamer
2_tester_runtime
{
public
interface
class
OutputTraceListener
{
...
...
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