Skip to content

Commit

Permalink
for windows build
Browse files Browse the repository at this point in the history
  • Loading branch information
litkinger committed Jun 11, 2021
1 parent c62e418 commit 966b90c
Show file tree
Hide file tree
Showing 24 changed files with 1,004 additions and 114 deletions.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified 3rd/apache-log4cxx-0.10.0/projects/UpgradeLog.htm
Binary file not shown.
1 change: 1 addition & 0 deletions 3rd/apache-log4cxx-0.10.0/src/main/cpp/stringhelper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#include <log4cxx/helpers/transcoder.h>
#include <algorithm>
#include <vector>
#include <iterator>
#include <apr_strings.h>
#include <log4cxx/helpers/pool.h>
#if !defined(LOG4CXX)
Expand Down
2 changes: 0 additions & 2 deletions 3rd/apache-log4cxx-0.10.0/src/main/include/log4cxx/log4cxx.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,6 @@ typedef unsigned int log4cxx_uint32_t;
template class LOG4CXX_EXPORT log4cxx::helpers::ObjectPtrT<T>; \
typedef log4cxx::helpers::ObjectPtrT<T> T##Ptr
#define LOG4CXX_LIST_DEF(N, T) \
template class LOG4CXX_EXPORT std::allocator<T>; \
template class LOG4CXX_EXPORT std::vector<T>; \
typedef std::vector<T> N
//
// pointer and list definition macros when linking with DLL using VC
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,39 +18,67 @@
#ifndef LOG4CXX_PRIVATE_LOG4CXX_H
#define LOG4CXX_PRIVATE_LOG4CXX_H

/* GENERATED FILE WARNING! DO NOT EDIT log4cxx_private.h

/* GENERATED FILE WARNING! DO NOT EDIT log4cxx.h
*
* You must modify log4cxx.hw instead.
*
* You must modify log4cxx_private.h.in instead.
*
* This is the Win32 specific version of log4cxx.h.
*/

#include <log4cxx/log4cxx.h>

#if !defined(LOG4CXX) && !defined(LOG4CXX_TEST)
#error "log4cxx/private/log4cxx_private.h should only be used within log4cxx implementation or tests"
#error "log4cxx/private/log4cxx.h should only be used within log4cxx and tests implementation"
#endif


#if !defined(__BORLANDC__)
#define LOG4CXX_RETURN_AFTER_THROW 1
#else
#define LOG4CXX_RETURN_AFTER_THROW 0
#endif

#if defined(_WIN32_WCE)
#define LOG4CXX_HAS_STD_LOCALE 0
#else
#define LOG4CXX_HAS_STD_LOCALE 1
#define LOG4CXX_FORCE_WIDE_CONSOLE 0
#endif

#define LOG4CXX_FORCE_WIDE_CONSOLE 1
#define LOG4CXX_FORCE_BYTE_CONSOLE 0
#define LOG4CXX_MEMSET_IOS_BASE 0
#define LOG4CXX_HAVE_ODBC 0


#if defined(_MSC_VER)
#define LOG4CXX_MEMSET_IOS_BASE 1
#endif

#if !defined(_WIN32_WCE)
#define LOG4CXX_HAVE_ODBC 1
#if defined(__BORLANDC__)
#define LOG4CXX_HAS_MBSRTOWCS 0
#else
#define LOG4CXX_HAS_MBSRTOWCS 1
#define LOG4CXX_HAS_WCSTOMBS 1
#endif
#else
#define LOG4CXX_HAVE_ODBC 0
#define LOG4CXX_HAS_MBSRTOWCS 0
#endif

#define LOG4CXX_HAS_FWIDE 1
#define LOG4CXX_HAS_WCSTOMBS 1

#define LOG4CXX_CHARSET_UTF8 0
#define LOG4CXX_CHARSET_ISO88591 0
#define LOG4CXX_CHARSET_USASCII 0
#define LOG4CXX_CHARSET_EBCDIC 0


#define LOG4CXX_HAVE_LIBESMTP 0
#define LOG4CXX_HAVE_SYSLOG 1
#define LOG4CXX_HAVE_SYSLOG 0

#define LOG4CXX_WIN32_THREAD_FMTSPEC "0x%.8x"
#define LOG4CXX_APR_THREAD_FMTSPEC "0x%pt"


#endif
2 changes: 1 addition & 1 deletion 3rd/apr-util/include/apr_ldap.hw
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
*/

/* this will be defined if LDAP support was compiled into apr-util */
#define APR_HAS_LDAP 1
#define APR_HAS_LDAP 0

/* identify the LDAP toolkit used */
#define APR_HAS_NETSCAPE_LDAPSDK 0
Expand Down
2 changes: 1 addition & 1 deletion 3rd/apr-util/include/apu.hw
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@
#endif


#define APU_HAVE_APR_ICONV 1
#define APU_HAVE_APR_ICONV 0
#define APU_HAVE_ICONV 0
#define APR_HAS_XLATE (APU_HAVE_APR_ICONV || APU_HAVE_ICONV)

Expand Down
1 change: 1 addition & 0 deletions 3rd/apr/atomic/win32/apr_atomic.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#include "apr.h"
#include "apr_atomic.h"
#include "apr_thread_mutex.h"
#include <winnt.h>

APR_DECLARE(apr_status_t) apr_atomic_init(apr_pool_t *p)
{
Expand Down
6 changes: 4 additions & 2 deletions 3rd/apr/network_io/unix/multicast.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
#include <ifaddrs.h>
#endif

#define NTDDI_VERSION NTDDI_WINXP

#ifdef HAVE_STRUCT_IPMREQ
/* Only UDP and Raw Sockets can be used for Multicast */
static apr_status_t mcast_check_type(apr_socket_t *sock)
Expand Down Expand Up @@ -133,7 +135,7 @@ static apr_status_t do_mcast(int type, apr_socket_t *sock,
#if APR_HAVE_IPV6
struct ipv6_mreq mip6;
#endif
#if MCAST_JOIN_SOURCE_GROUP
#if defined (group_source_req)
struct group_source_req mip;
int ip_proto;
#endif
Expand All @@ -145,7 +147,7 @@ static apr_status_t do_mcast(int type, apr_socket_t *sock,
}

if (source != NULL) {
#if MCAST_JOIN_SOURCE_GROUP
#if defined (group_source_req)
if (sock_is_ipv4(sock)) {
ip_proto = IPPROTO_IP;
}
Expand Down
64 changes: 60 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,66 @@
cmake_minimum_required(VERSION 3.5)

project(ffmpeg_sdl_test LANGUAGES CXX)
project(media_test LANGUAGES CXX)

SET(PROJECT_ROOT_PATH "${CMAKE_SOURCE_DIR}/build-ffmpeg_sdl_test-Desktop_Qt_5_12_10_clang_64bit-Debug")
MESSAGE( STATUS "this var key = ${PROJECT_ROOT_PATH}.")
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)


set(CMAKE_INCLUDE_CURRENT_DIR ON)

set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)

set(CMAKE_INCLUDE_DIRECTORIES_BEFORE ON)

if (CMAKE_HOST_WIN32)
set(WINDOWS 1)
set(LIBSUFFIX .lib)
set(LIBPREFIX )
set(LIBRARY_SEARCH_PATHS
C:/msys64/usr/src/src/third_party/ffmpeg/x64
D:/workspace/leelen/source/freeswitch/x64/Debug
C:/msys64/usr/src/src/third_party/sdl/x64
D:/workspace/opensource/SDL2/lib/x64
D:/workspace/mycode/media_test/3rd/apache-log4cxx-0.10.0/projects/x64/Debug
src
)
include_directories(C:/msys64/usr/local/ffmpeg/include)
include_directories(C:/msys64/usr/src/src/third_party/sdl/include)
include_directories(src)
include_directories(D:/workspace/mycode/media_test/3rd/apache-log4cxx-0.10.0/src/main/include)
elseif(CMAKE_HOST_APPLE)
set(MACOS 1)
set(LIBSUFFIX .dylib)
set(LIBPREFIX lib)
set(LIBRARY_SEARCH_PATHS
../3rd/apr-1.7.0/.libs/
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/lib/
/usr/local/lib/
)
include_directories(/usr/local/include)
elseif(CMAKE_HOST_UNIX)
set(LINUX 1)
set(LIBSUFFIX .so)
set(LIBPREFIX lib)
endif()

if(WINDOWS)
set(Qt5_DIR "C:/Qt/Qt5.14.0/5.14.0/msvc2017_64/lib/cmake/Qt5")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -I C:/msys64/usr/local/ffmpeg/include -I D:/workspace/mycode/media_test/3rd/apache-log4cxx-0.10.0/src/main/include -IC:/msys64/usr/src/src/third_party/sdl/include -IC:/msys64/usr/src/ffmpeg-4.3.2")
elseif(LINUX)

elseif(MACOS)
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O0 ")
set(Qt5_DIR "/Users/yaoping.zheng/Qt5.12.10/5.12.10/clang_64/lib/cmake/Qt5")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -v -stdlib=libc++ -I/usr/local/include -L/usr/local/lib/ -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include -L/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/lib/")
endif()


#SET(PROJECT_ROOT_PATH "${CMAKE_SOURCE_DIR}/build-ffmpeg_sdl_test-Desktop_Qt_5_12_10_clang_64bit-Debug")
#MESSAGE( STATUS "this var key = ${PROJECT_ROOT_PATH}.")

add_subdirectory(src)
add_subdirectory(test)
#add_subdirectory(test)

Loading

0 comments on commit 966b90c

Please sign in to comment.