mirror of
https://github.com/UltraCoderRU/libwebrtc.git
synced 2026-01-28 03:15:11 +00:00
Define WEBRTC_MAC under macOS, set correct pthread and debugging flags
This commit is contained in:
parent
b35dc15d8d
commit
bc9c05404f
1 changed files with 15 additions and 8 deletions
|
|
@ -64,17 +64,24 @@ if (NOT ${TARGET_CPU} IN_LIST TARGET_CPU_LIST)
|
|||
message(FATAL_ERROR "Unknown value '${TARGET_CPU}' for variable TARGET_CPU, options are: ${TARGET_CPU_LIST}")
|
||||
endif (NOT ${TARGET_CPU} IN_LIST TARGET_CPU_LIST)
|
||||
|
||||
if (APPLE)
|
||||
list(APPEND LIBWEBRTC_DEFINITIONS WEBRTC_MAC)
|
||||
endif (APPLE)
|
||||
|
||||
if (UNIX)
|
||||
if (ARCH_X86)
|
||||
list(APPEND LIBWEBRTC_REQUIRED_CXX_FLAGS "-m32")
|
||||
endif (ARCH_X86)
|
||||
if (TARGET_CPU STREQUAL "x86")
|
||||
set(LIBWEBRTC_REQUIRED_CXX_FLAGS "${LIBWEBRTC_REQUIRED_CXX_FLAGS} -m32")
|
||||
endif (TARGET_CPU STREQUAL "x86")
|
||||
|
||||
list(APPEND LIBWEBRTC_REQUIRED_CXX_FLAGS "-std=gnu++0x")
|
||||
set(LIBWEBRTC_REQUIRED_CXX_FLAGS "${LIBWEBRTC_REQUIRED_CXX_FLAGS} -std=gnu++0x")
|
||||
|
||||
if(THREADS_HAVE_PTHREAD_ARG)
|
||||
list(APPEND LIBWEBRTC_REQUIRED_CXX_FLAGS "-pthread")
|
||||
endif()
|
||||
if (CMAKE_USE_PTHREADS_INIT)
|
||||
set(LIBWEBRTC_REQUIRED_CXX_FLAGS "${LIBWEBRTC_REQUIRED_CXX_FLAGS} -pthread")
|
||||
endif ()
|
||||
|
||||
if (CMAKE_BUILD_TYPE MATCHES Debug)
|
||||
list(APPEND LIBWEBRTC_DEFINITIONS _GLIBCXX_DEBUG=1 _DEBUG=1)
|
||||
endif (CMAKE_BUILD_TYPE MATCHES Debug)
|
||||
list(APPEND LIBWEBRTC_DEFINITIONS WEBRTC_POSIX _GLIBCXX_USE_CXX11_ABI=0)
|
||||
elseif (WIN32)
|
||||
set(LIBWEBRTC_REQUIRED_C_FLAGS_DEBUG "/MTd")
|
||||
|
|
@ -82,6 +89,6 @@ elseif (WIN32)
|
|||
set(LIBWEBRTC_REQUIRED_CXX_FLAGS_DEBUG "/MTd")
|
||||
set(LIBWEBRTC_REQUIRED_CXX_FLAGS_RELEASE "/MT")
|
||||
list(APPEND LIBWEBRTC_DEFINITIONS WEBRTC_WIN NOMINMAX _CRT_SECURE_NO_WARNINGS)
|
||||
endif(UNIX)
|
||||
endif (UNIX)
|
||||
|
||||
message(STATUS "Building for ${TARGET_OS} (${TARGET_CPU})")
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue