Commit 7dc27b82 authored by Ghislain MARY's avatar Ghislain MARY

Correct definitions of MS2_PUBLIC and MEDIASTREAMER2_CPPFLAGS on Windows.

parent 1ce0e420
......@@ -527,8 +527,13 @@ string(REPLACE ";" " " LINK_FLAGS_STR "${LINK_FLAGS}")
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/mediastreamer-config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/mediastreamer-config.h)
set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/mediastreamer-config.h PROPERTIES GENERATED ON)
add_definitions("-DHAVE_CONFIG_H")
add_definitions(${ORTP_CPPFLAGS})
add_definitions("-DMS2_EXPORTS")
set(MEDIASTREAMER2_CPPFLAGS ${ORTP_CPPFLAGS})
if(ENABLE_STATIC)
list(APPEND MEDIASTREAMER2_CPPFLAGS "-DMS2_STATIC")
add_definitions(${MEDIASTREAMER2_CPPFLAGS})
endif()
if(ANDROID)
add_definitions("-DANDROID")
endif()
......
......@@ -70,6 +70,6 @@ if(BZRTP_FOUND)
list(APPEND MEDIASTREAMER2_INCLUDE_DIRS ${BZRTP_INCLUDE_DIRS})
list(APPEND MEDIASTREAMER2_LIBRARIES ${BZRTP_LIBRARIES})
endif()
set(MEDIASTREAMER2_CPPFLAGS ${ORTP_CPPFLAGS})
set(MEDIASTREAMER2_CPPFLAGS @MEDIASTREAMER2_CPPFLAGS@)
set(MEDIASTREAMER2_LDFLAGS "@LINK_FLAGS_STR@")
set(MEDIASTREAMER2_FOUND 1)
......@@ -92,6 +92,10 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#endif
#if defined(_MSC_VER)
#ifdef MS2_STATIC
#define MS2_PUBLIC
#define MS2_VAR_PUBLIC
#else
#ifdef MS2_EXPORTS
#define MS2_PUBLIC __declspec(dllexport)
#define MS2_VAR_PUBLIC extern __declspec(dllexport)
......@@ -99,6 +103,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#define MS2_PUBLIC __declspec(dllimport)
#define MS2_VAR_PUBLIC extern __declspec(dllimport)
#endif
#endif
#else
#define MS2_PUBLIC
#define MS2_VAR_PUBLIC extern
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment