diff --git a/.devcontainer b/.devcontainer index ce6319e..9392dab 160000 --- a/.devcontainer +++ b/.devcontainer @@ -1 +1 @@ -Subproject commit ce6319e94134fb49e078f2267fcc37e7bc8fb0fd +Subproject commit 9392dab66088da3b820424480218fc88492927c7 diff --git a/.github/workflows/xpbuild.yml b/.github/workflows/xpbuild.yml index 9304a91..67fc093 100644 --- a/.github/workflows/xpbuild.yml +++ b/.github/workflows/xpbuild.yml @@ -7,24 +7,24 @@ on: workflow_dispatch: jobs: linux: - uses: externpro/externpro/.github/workflows/build-linux.yml@25.05.1 + uses: externpro/externpro/.github/workflows/build-linux.yml@25.05.2 with: cmake-workflow-preset: Linux runon: ubuntu-latest secrets: inherit linux-arm64: - uses: externpro/externpro/.github/workflows/build-linux.yml@25.05.1 + uses: externpro/externpro/.github/workflows/build-linux.yml@25.05.2 with: cmake-workflow-preset: Linux runon: ubuntu-24.04-arm secrets: inherit macos: - uses: externpro/externpro/.github/workflows/build-macos.yml@25.05.1 + uses: externpro/externpro/.github/workflows/build-macos.yml@25.05.2 with: cmake-workflow-preset: Darwin secrets: inherit windows: - uses: externpro/externpro/.github/workflows/build-windows.yml@25.05.1 + uses: externpro/externpro/.github/workflows/build-windows.yml@25.05.2 with: cmake-workflow-preset: WindowsRelease secrets: inherit diff --git a/.github/workflows/xprelease.yml b/.github/workflows/xprelease.yml index f868a82..273199e 100644 --- a/.github/workflows/xprelease.yml +++ b/.github/workflows/xprelease.yml @@ -9,7 +9,7 @@ on: jobs: # Upload build artifacts as release assets release-from-build: - uses: externpro/externpro/.github/workflows/release-from-build.yml@25.05.1 + uses: externpro/externpro/.github/workflows/release-from-build.yml@25.05.2 with: workflow_run_url: ${{ github.event.inputs.workflow_run_url }} artifact_pattern: "*.tar.xz" diff --git a/CMakePresetsBase.json b/CMakePresetsBase.json index bea12bd..37e5be6 100644 --- a/CMakePresetsBase.json +++ b/CMakePresetsBase.json @@ -12,5 +12,11 @@ "XP_BUILD_VERBOSE": "ON" } } + ], + "buildPresets": [ + { + "name": "build-base", + "hidden": true + } ] } diff --git a/patches/azmq.patch b/patches/azmq.patch deleted file mode 100644 index 6ae3a83..0000000 --- a/patches/azmq.patch +++ /dev/null @@ -1,171 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 42ace9a..61a1d46 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -1,7 +1,8 @@ --cmake_minimum_required(VERSION 2.8) -+cmake_minimum_required(VERSION 3.31) - project(azmq) - - include(AzmqCPack.cmake) -+include(xpflags) - - set(CMAKE_CXX_STANDARD 11) - set(CMAKE_CXX_STANDARD_REQUIRED ON) -@@ -37,10 +38,15 @@ if(USE_LIBCXX) - set(ADDITIONAL_LIBS "pthread") - endif() - --set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/config") -- --find_package(Boost 1.48 COMPONENTS system date_time thread chrono random REQUIRED) --find_package(ZeroMQ 4.0 REQUIRED) -+if(COMMAND xpFindPkg) -+ xpFindPkg(PKGS boost libzmq) -+ set(Boost_LIBRARIES Boost::system Boost::thread) -+ set(ZeroMQ_LIBRARIES xpro::libzmq-static) -+else() -+ set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/config") -+ find_package(Boost 1.48 COMPONENTS system date_time thread chrono random REQUIRED) -+ find_package(ZeroMQ 4.0 REQUIRED) -+endif() - - set(CMAKE_THREAD_PREFER_PTHREAD TRUE) - find_package(Threads REQUIRED) -@@ -64,5 +70,18 @@ if(NOT AZMQ_NO_TESTS) - add_subdirectory(doc) - endif() - -+include(GNUInstallDirs) -+add_library(${PROJECT_NAME} INTERFACE) -+target_include_directories(${PROJECT_NAME} INTERFACE $) -+target_link_libraries(${PROJECT_NAME} INTERFACE ${Boost_LIBRARIES} ${ZeroMQ_LIBRARIES}) -+install(TARGETS ${PROJECT_NAME} EXPORT ${PROJECT_NAME}-targets) -+if(DEFINED XP_NAMESPACE) -+ set(nameSpace NAMESPACE ${XP_NAMESPACE}::) -+endif() -+if(NOT DEFINED XP_INSTALL_CMAKEDIR) -+ set(XP_INSTALL_CMAKEDIR ${CMAKE_INSTALL_DATADIR}/cmake) -+endif() -+install(EXPORT ${PROJECT_NAME}-targets ${nameSpace} DESTINATION ${XP_INSTALL_CMAKEDIR}) -+ - install(DIRECTORY ${PROJECT_SOURCE_DIR}/azmq -- DESTINATION include) -+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) -diff --git a/azmq/detail/socket_ops.hpp b/azmq/detail/socket_ops.hpp -index 5259abe..0dfa28a 100644 ---- a/azmq/detail/socket_ops.hpp -+++ b/azmq/detail/socket_ops.hpp -@@ -78,9 +78,15 @@ namespace detail { - - static socket_type create_socket(context_ops::context_type context, - int type, -- boost::system::error_code & ec) { -+ boost::system::error_code & ec, -+ zmq_router_skt_peer_connect_notification_fn* pCnfn = nullptr, -+ void* pCnfnHint = nullptr) { - BOOST_ASSERT_MSG(context, "Invalid context"); -- auto res = zmq_socket(context.get(), type); -+ void* res = nullptr; -+ if (type == ZMQ_ROUTER && pCnfn) -+ res = zmq_new_router_socket(context.get(), pCnfn, pCnfnHint); -+ else -+ res = zmq_socket(context.get(), type); - if (!res) { - ec = make_error_code(); - return socket_type(); -diff --git a/azmq/detail/socket_service.hpp b/azmq/detail/socket_service.hpp -index 8250ee0..d816834 100644 ---- a/azmq/detail/socket_service.hpp -+++ b/azmq/detail/socket_service.hpp -@@ -97,9 +97,11 @@ namespace detail { - context_type & ctx, - int type, - bool optimize_single_threaded, -- boost::system::error_code & ec) { -+ boost::system::error_code & ec, -+ zmq_router_skt_peer_connect_notification_fn* pCnfn = nullptr, -+ void* pCnfnHint = nullptr) { - BOOST_ASSERT_MSG(!socket_, "socket already open"); -- socket_ = socket_ops::create_socket(ctx, type, ec); -+ socket_ = socket_ops::create_socket(ctx, type, ec, pCnfn, pCnfnHint); - if (ec) return; - - sd_ = socket_ops::get_stream_descriptor(ios, socket_, ec); -@@ -227,12 +229,14 @@ namespace detail { - boost::system::error_code do_open(implementation_type & impl, - int type, - bool optimize_single_threaded, -- boost::system::error_code & ec) { -+ boost::system::error_code & ec, -+ zmq_router_skt_peer_connect_notification_fn* pCnfn = nullptr, -+ void* pCnfnHint = nullptr) { - BOOST_ASSERT_MSG(impl, "impl"); - #ifdef AZMQ_DETAIL_USE_IO_SERVICE -- impl->do_open(get_io_service(), ctx_, type, optimize_single_threaded, ec); -+ impl->do_open(get_io_service(), ctx_, type, optimize_single_threaded, ec, pCnfn, pCnfnHint); - #else -- impl->do_open(get_io_context(), ctx_, type, optimize_single_threaded, ec); -+ impl->do_open(get_io_context(), ctx_, type, optimize_single_threaded, ec, pCnfn, pCnfnHint); - #endif - if (ec) - impl.reset(); -diff --git a/azmq/socket.hpp b/azmq/socket.hpp -index 533c1ef..aeae925 100644 ---- a/azmq/socket.hpp -+++ b/azmq/socket.hpp -@@ -105,10 +105,12 @@ public: - */ - explicit socket(boost::asio::io_service& ios, - int type, -- bool optimize_single_threaded = false) -+ bool optimize_single_threaded = false, -+ zmq_router_skt_peer_connect_notification_fn* pCnfn = nullptr, -+ void* pCnfnHint = nullptr) - : azmq::detail::basic_io_object(ios) { - boost::system::error_code ec; -- if (get_service().do_open(get_implementation(), type, optimize_single_threaded, ec)) -+ if (get_service().do_open(get_implementation(), type, optimize_single_threaded, ec, pCnfn, pCnfnHint)) - throw boost::system::system_error(ec); - } - -@@ -711,6 +713,39 @@ namespace detail { - return *this; - } - }; -+ -+ template<> -+ class specialized_socket: public socket -+ { -+ typedef socket Base; -+ -+ public: -+ specialized_socket(boost::asio::io_service & ios, -+ bool optimize_single_threaded = false) -+ : Base(ios, ZMQ_ROUTER, optimize_single_threaded) -+ { -+ // Note that we expect these to get sliced to socket, so DO NOT add any data members -+ static_assert(sizeof(*this) == sizeof(socket), "Specialized socket must not have any specific data members"); -+ } -+ specialized_socket(boost::asio::io_service & ios, -+ zmq_router_skt_peer_connect_notification_fn* pCnfn, -+ void* pCnfnHint) -+ : Base(ios, ZMQ_ROUTER, /*optimize_single_threaded=*/false, pCnfn, pCnfnHint) -+ { -+ // Note that we expect these to get sliced to socket, so DO NOT add any data members -+ static_assert(sizeof(*this) == sizeof(socket), "Specialized socket must not have any specific data members"); -+ } -+ -+ specialized_socket(specialized_socket&& op) -+ : Base(std::move(op)) -+ {} -+ -+ specialized_socket& operator= (specialized_socket&& rhs) -+ { -+ Base::operator=(std::move(rhs)); -+ return *this; -+ } -+ }; - } - - AZMQ_V1_INLINE_NAMESPACE_BEGIN diff --git a/patches/fecpp.patch b/patches/fecpp.patch deleted file mode 100644 index 5e4d4f0..0000000 --- a/patches/fecpp.patch +++ /dev/null @@ -1,220 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -new file mode 100644 -index 0000000..9f96ab1 ---- /dev/null -+++ b/CMakeLists.txt -@@ -0,0 +1,35 @@ -+cmake_minimum_required(VERSION 3.31) -+project(fecpp) -+include(GNUInstallDirs) -+include(xpflags) -+set(lib_name ${PROJECT_NAME}) -+####################################### -+set(${lib_name}_libsrcs -+ fecpp.cpp -+ fecpp.h -+ #fecpp_python.cpp # TODO -+ ) -+source_group("" FILES ${${lib_name}_libsrcs}) -+####################################### -+add_library(${lib_name} STATIC ${${lib_name}_libsrcs}) -+target_include_directories(${lib_name} PUBLIC $ -+ $ -+ ) -+add_subdirectory(test) -+####################################### -+set(targetsFile ${PROJECT_NAME}-targets) -+install(TARGETS ${lib_name} EXPORT ${targetsFile} -+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} -+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} -+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} -+ ) -+install(FILES fecpp.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME}) -+if(DEFINED XP_NAMESPACE) -+ set(nameSpace NAMESPACE ${XP_NAMESPACE}::) -+endif() -+if(NOT DEFINED XP_INSTALL_CMAKEDIR) -+ set(XP_INSTALL_CMAKEDIR ${CMAKE_INSTALL_DATADIR}/cmake) -+endif() -+install(EXPORT ${targetsFile} DESTINATION ${XP_INSTALL_CMAKEDIR} ${nameSpace}) -+set(txtFiles format.txt license.txt news.txt readme.txt) -+install(FILES ${txtFiles} DESTINATION ${CMAKE_INSTALL_DOCDIR}) -diff --git a/fecpp.cpp b/fecpp.cpp -index e2e5b56..82e21b2 100644 ---- a/fecpp.cpp -+++ b/fecpp.cpp -@@ -553,7 +553,7 @@ fec_code::fec_code(size_t K_arg, size_t N_arg) : - */ - void fec_code::encode( - const byte input[], size_t size, -- std::tr1::function output) -+ std::function output) - const - { - if(size % K != 0) -@@ -608,7 +608,7 @@ void fec_code::encode( - void fec_code::decode( - const std::map& shares, - size_t share_size, -- std::tr1::function output) const -+ std::function output) const - { - /* - Todo: -diff --git a/fecpp.h b/fecpp.h -index aa68bbe..b9888a4 100644 ---- a/fecpp.h -+++ b/fecpp.h -@@ -12,7 +12,7 @@ - - #include - #include --#include -+#include - - namespace fecpp { - -@@ -43,7 +43,7 @@ class fec_code - */ - void encode( - const byte input[], size_t size, -- std::tr1::function out) -+ std::function out) - const; - - /** -@@ -53,7 +53,7 @@ class fec_code - */ - void decode( - const std::map& shares, size_t share_size, -- std::tr1::function out) -+ std::function out) - const; - - private: -diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt -new file mode 100644 -index 0000000..5c8d1c4 ---- /dev/null -+++ b/test/CMakeLists.txt -@@ -0,0 +1,14 @@ -+xpFindPkg(PKGS boost) -+set(${PROJECT_NAME}_exes -+ benchmark -+ gen_test_vec -+ #test_fec # TODO: fix compile errors -+ test_recovery -+ zfec -+ ) -+set(test_recovery_deps Boost::boost) -+foreach(exe ${${PROJECT_NAME}_exes}) -+ source_group("" FILES ${exe}.cpp) -+ add_executable(${exe} ${exe}.cpp) -+ target_link_libraries(${exe} PRIVATE ${lib_name} ${${exe}_deps}) -+endforeach() -diff --git a/test/benchmark.cpp b/test/benchmark.cpp -index b690cef..462658a 100644 ---- a/test/benchmark.cpp -+++ b/test/benchmark.cpp -@@ -59,7 +59,7 @@ void benchmark_fec(size_t k, size_t n) - - save_to_map saver(share_len, shares); - -- fec.encode(&input[0], input.size(), std::tr1::ref(saver)); -+ fec.encode(&input[0], input.size(), std::ref(saver)); - - while(shares.size() > k) - shares.erase(shares.begin()); -diff --git a/test/test_fec.cpp b/test/test_fec.cpp -index ae76d6e..31fec19 100644 ---- a/test/test_fec.cpp -+++ b/test/test_fec.cpp -@@ -9,6 +9,8 @@ - #include - #include "fecpp.h" - -+using fecpp::byte; -+ - /* - * compatibility stuff - */ -@@ -77,7 +79,7 @@ my_malloc(int sz, const char *s) - */ - - int --test_decode(fec_code& code, size_t k, size_t index[], size_t sz, -+test_decode(fecpp::fec_code& code, size_t k, size_t index[], size_t sz, - const char *s) - { - int errors; -@@ -88,12 +90,12 @@ test_decode(fec_code& code, size_t k, size_t index[], size_t sz, - static byte **d_original = NULL, **d_src = NULL ; - - if (sz < 1 || sz > 8192) { -- fprintf(stderr, "test_decode: size %d invalid, must be 1..8K\n", -+ fprintf(stderr, "test_decode: size %zd invalid, must be 1..8K\n", - sz); - return 1 ; - } - if (k < 1 || k > 255 + 1) { -- fprintf(stderr, "test_decode: k %d invalid, must be 1..%d\n", -+ fprintf(stderr, "test_decode: k %zd invalid, must be 1..%d\n", - k, 255 + 1 ); - return 2 ; - } -@@ -148,11 +150,11 @@ test_decode(fec_code& code, size_t k, size_t index[], size_t sz, - fprintf(stderr, "error reconstructing block %d\n", i); - } - if (errors) -- fprintf(stderr, "Errors reconstructing %d blocks out of %d\n", -+ fprintf(stderr, "Errors reconstructing %d blocks out of %zd\n", - errors, k); - - fprintf(stderr, -- " k %3d, l %3d c_enc %10.6f MB/s c_dec %10.6f MB/s \r", -+ " k %3zd, l %3d c_enc %10.6f MB/s c_dec %10.6f MB/s \r", - k, reconstruct, - (double)(k * sz * reconstruct)/(double)ticks[2], - (double)(k * sz * reconstruct)/(double)ticks[1]); -@@ -206,7 +208,7 @@ main(int argc, char *argv[]) - - for ( kk = KK ; kk > 2 ; kk-- ) - { -- fec_code code(kk, lim); -+ fecpp::fec_code code(kk, lim); - ixs = (size_t*)my_malloc(kk * sizeof(size_t), "ixs" ); - - for (i=0; i]*>))*\.\)?//g; - s/\s+\(\@pxref\{(?:[^\}]*)\}\)//g; - s/;\s+\@pxref\{(?:[^\}]*)\}//g; -diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h -index 575dae13e4..826dc71f74 100644 ---- a/libavcodec/avcodec.h -+++ b/libavcodec/avcodec.h -@@ -532,6 +532,7 @@ enum AVCodecID { - AV_CODEC_ID_IDF = MKBETAG( 0 ,'I','D','F'), - AV_CODEC_ID_OTF = MKBETAG( 0 ,'O','T','F'), - AV_CODEC_ID_SMPTE_KLV = MKBETAG('K','L','V','A'), -+ AV_CODEC_ID_SMPTE_KLV_SYNC = MKBETAG('K','L','V','S'), //The tag uses KLVA, but needs something different to be able to distinguish it from async streams. - AV_CODEC_ID_DVD_NAV = MKBETAG('D','N','A','V'), - AV_CODEC_ID_TIMED_ID3 = MKBETAG('T','I','D','3'), - AV_CODEC_ID_BIN_DATA = MKBETAG('D','A','T','A'), -diff --git a/libavcodec/codec_desc.c b/libavcodec/codec_desc.c -index 32dc1fc372..faea5c8954 100644 ---- a/libavcodec/codec_desc.c -+++ b/libavcodec/codec_desc.c -@@ -2734,6 +2734,12 @@ static const AVCodecDescriptor codec_descriptors[] = { - .name = "klv", - .long_name = NULL_IF_CONFIG_SMALL("SMPTE 336M Key-Length-Value (KLV) metadata"), - }, -+ { -+ .id = AV_CODEC_ID_SMPTE_KLV_SYNC, -+ .type = AVMEDIA_TYPE_DATA, -+ .name = "klvSync", -+ .long_name = NULL_IF_CONFIG_SMALL("SMPTE 336M Key-Length-Value (KLV) synchronous metadata"), -+ }, - { - .id = AV_CODEC_ID_DVD_NAV, - .type = AVMEDIA_TYPE_DATA, -diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c -index 9e9ad4765e..992aed97dc 100644 ---- a/libavformat/mpegts.c -+++ b/libavformat/mpegts.c -@@ -712,14 +712,14 @@ static const StreamType REGD_types[] = { - { MKTAG('D', 'T', 'S', '2'), AVMEDIA_TYPE_AUDIO, AV_CODEC_ID_DTS }, - { MKTAG('D', 'T', 'S', '3'), AVMEDIA_TYPE_AUDIO, AV_CODEC_ID_DTS }, - { MKTAG('H', 'E', 'V', 'C'), AVMEDIA_TYPE_VIDEO, AV_CODEC_ID_HEVC }, -- { MKTAG('K', 'L', 'V', 'A'), AVMEDIA_TYPE_DATA, AV_CODEC_ID_SMPTE_KLV }, -+ { MKTAG('K', 'L', 'V', 'A'), AVMEDIA_TYPE_DATA, AV_CODEC_ID_SMPTE_KLV }, // The async KLV uses a registration descriptor so this add will catch it. - { MKTAG('V', 'C', '-', '1'), AVMEDIA_TYPE_VIDEO, AV_CODEC_ID_VC1 }, - { MKTAG('O', 'p', 'u', 's'), AVMEDIA_TYPE_AUDIO, AV_CODEC_ID_OPUS }, - { 0 }, - }; - - static const StreamType METADATA_types[] = { -- { MKTAG('K','L','V','A'), AVMEDIA_TYPE_DATA, AV_CODEC_ID_SMPTE_KLV }, -+ { MKTAG('K','L','V','A'), AVMEDIA_TYPE_DATA, AV_CODEC_ID_SMPTE_KLV_SYNC }, //The sync doesn't have the registration descriptor, but does use the metadata descriptor. Async also uses this, but will be caught in the REGD type because of the order of the checks. - { MKTAG('I','D','3',' '), AVMEDIA_TYPE_DATA, AV_CODEC_ID_TIMED_ID3 }, - { 0 }, - }; -@@ -1103,12 +1103,14 @@ skip: - p += sl_header_bytes; - buf_size -= sl_header_bytes; - } -- if (pes->stream_type == 0x15 && buf_size >= 5) { -- /* skip metadata access unit header */ -- pes->pes_header_size += 5; -- p += 5; -- buf_size -= 5; -- } -+ //TODO: Synchronous KLV streams have one or more metadata access unit headers within the stream -+ // The below check only removes the first one and thus causes problems if more than one exists. -+ //if (pes->stream_type == 0x15 && buf_size >= 5) { -+ // /* skip metadata access unit header */ -+ // pes->pes_header_size += 5; -+ // p += 5; -+ // buf_size -= 5; -+ //} - if (pes->ts->fix_teletext_pts && pes->st->codec->codec_id == AV_CODEC_ID_DVB_TELETEXT) { - AVProgram *p = NULL; - while ((p = av_find_program_from_stream(pes->stream, p, pes->st->index))) { -diff --git a/libavformat/mpegts.h b/libavformat/mpegts.h -index 84f30983c1..5efb1cd62f 100644 ---- a/libavformat/mpegts.h -+++ b/libavformat/mpegts.h -@@ -51,6 +51,7 @@ - #define STREAM_TYPE_AUDIO_AAC 0x0f - #define STREAM_TYPE_AUDIO_AAC_LATM 0x11 - #define STREAM_TYPE_VIDEO_MPEG4 0x10 -+#define STREAM_TYPE_DATA_KLV_SYNC 0x15 - #define STREAM_TYPE_VIDEO_H264 0x1b - #define STREAM_TYPE_VIDEO_HEVC 0x24 - #define STREAM_TYPE_VIDEO_CAVS 0x42 -diff --git a/libavformat/mpegtsenc.c b/libavformat/mpegtsenc.c -index cc650bbd29..c55cc1a103 100644 ---- a/libavformat/mpegtsenc.c -+++ b/libavformat/mpegtsenc.c -@@ -309,6 +309,9 @@ static int mpegts_write_pmt(AVFormatContext *s, MpegTSService *service) - case AV_CODEC_ID_TRUEHD: - stream_type = STREAM_TYPE_AUDIO_TRUEHD; - break; -+ case AV_CODEC_ID_SMPTE_KLV_SYNC: -+ stream_type = STREAM_TYPE_DATA_KLV_SYNC; -+ break; - default: - stream_type = STREAM_TYPE_PRIVATE_DATA; - break; -@@ -474,6 +477,36 @@ static int mpegts_write_pmt(AVFormatContext *s, MpegTSService *service) - *q++ = 'V'; - *q++ = 'A'; - } -+ if (st->codec->codec_id == AV_CODEC_ID_SMPTE_KLV_SYNC || st->codec->codec_id == AV_CODEC_ID_SMPTE_KLV) { -+ //Begin metadata_descriptor -+ *q++ = 0x26; -+ *q++ = 0x09; -+ //begin metadata_application_format -+ *q++ = 0x01; -+ *q++ = 0x00; -+ //beging metadata_format -+ *q++ = 0xFF; -+ *q++ = 'K'; -+ *q++ = 'L'; -+ *q++ = 'V'; -+ *q++ = 'A'; -+ *q++ = 0x00; -+ *q++ = 0x0f; -+ //begin metadata_std_descriptor -+ *q++ = 0x27; -+ *q++ = 0x09; -+ //2 reserved bits and metadata_input_leak_rate -+ *q++ = 0xC0; -+ *q++ = 0x02;//0x00; -+ *q++ = 0x71;//0x00;//0x04; -+ //2 reserved bits followed by metadata_buffer_size -+ *q++ = 0xC0; -+ *q++ = 0x00; -+ *q++ = 0x02;//0x00 -+ //2 reserved bits followed be metadata_output_leak_Rate -+ *q++ = 0xC0; -+ *q++ = 0x00; -+ *q++ = 0x00; } - break; - } - diff --git a/patches/ffmpeg_4.3.1.patch b/patches/ffmpeg_4.3.1.patch deleted file mode 100644 index 8faf582..0000000 --- a/patches/ffmpeg_4.3.1.patch +++ /dev/null @@ -1,4359 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -new file mode 100644 -index 0000000000..52b6e6c3df ---- /dev/null -+++ b/CMakeLists.txt -@@ -0,0 +1,5 @@ -+cmake_minimum_required(VERSION 3.31) -+project(ffmpeg) -+include(xpflags) -+include(configure.cmake) -+add_subdirectory(libavdevice) -diff --git a/config.h.cmake.in b/config.h.cmake.in -new file mode 100644 -index 0000000000..b5d6ce8c5a ---- /dev/null -+++ b/config.h.cmake.in -@@ -0,0 +1,1863 @@ -+/* Automatically generated by configure.cmake - do not modify! */ -+#ifndef FFMPEG_CONFIG_H -+#define FFMPEG_CONFIG_H -+#define FFMPEG_CONFIGURATION "--prefix=/bpvol/externpro/_bldf/xpbase/Install/ffmpeg_2.6.2_Release --enable-pic --enable-libopenh264 --disable-bzlib --disable-iconv --disable-libxcb --disable-libxcb-shm --disable-libxcb-xfixes --disable-libxcb-shape --disable-lzma --disable-sdl --disable-xlib --disable-zlib --disable-debug" -+#define FFMPEG_LICENSE "LGPL version 2.1 or later" -+#define CONFIG_THIS_YEAR 2015 -+#define FFMPEG_DATADIR "/bpvol/externpro/_bldf/xpbase/Install/ffmpeg_2.6.2_Release/share/ffmpeg" -+#define AVCONV_DATADIR "/bpvol/externpro/_bldf/xpbase/Install/ffmpeg_2.6.2_Release/share/ffmpeg" -+#define CC_IDENT "gcc 7 (GCC)" -+#define av_restrict restrict -+#define EXTERN_PREFIX "" -+#define EXTERN_ASM -+#define BUILDSUF "" -+#define SLIBSUF ".so" -+#define HAVE_MMX2 HAVE_MMXEXT -+#define SWS_MAX_FILTER_SIZE 256 -+/* ARCH_LIST */ -+#@DEFINE_@ ARCH_AARCH64 0 -+#@DEFINE_@ ARCH_ALPHA 0 -+#@DEFINE_@ ARCH_ARM 0 -+#@DEFINE_@ ARCH_AVR32 0 -+#@DEFINE_@ ARCH_AVR32_AP 0 -+#@DEFINE_@ ARCH_AVR32_UC 0 -+#@DEFINE_@ ARCH_BFIN 0 -+#@DEFINE_@ ARCH_IA64 0 -+#@DEFINE_@ ARCH_M68K 0 -+#@DEFINE_@ ARCH_MIPS 0 -+#@DEFINE_@ ARCH_MIPS64 0 -+#@DEFINE_@ ARCH_PARISC 0 -+#@DEFINE_@ ARCH_PPC 0 -+#@DEFINE_@ ARCH_PPC64 0 -+#@DEFINE_@ ARCH_S390 0 -+#@DEFINE_@ ARCH_SH4 0 -+#@DEFINE_@ ARCH_SPARC 0 -+#@DEFINE_@ ARCH_SPARC64 0 -+#@DEFINE_@ ARCH_TILEGX 0 -+#@DEFINE_@ ARCH_TILEPRO 0 -+#@DEFINE_@ ARCH_TOMI 0 -+#@DEFINE_@ ARCH_X86 1 -+#@DEFINE_@ ARCH_X86_32 0 -+#@DEFINE_@ ARCH_X86_64 1 -+/* HAVE_LIST */ -+#@DEFINE_@ HAVE_ARMV5TE 0 -+#@DEFINE_@ HAVE_ARMV6 0 -+#@DEFINE_@ HAVE_ARMV6T2 0 -+#@DEFINE_@ HAVE_ARMV8 0 -+#@DEFINE_@ HAVE_NEON 0 -+#@DEFINE_@ HAVE_VFP 0 -+#@DEFINE_@ HAVE_VFPV3 0 -+#@DEFINE_@ HAVE_SETEND 0 -+#@DEFINE_@ HAVE_ALTIVEC 0 -+#@DEFINE_@ HAVE_DCBZL 1 -+#@DEFINE_@ HAVE_LDBRX 1 -+#@DEFINE_@ HAVE_PPC4XX 0 -+#@DEFINE_@ HAVE_VSX 0 -+#@DEFINE_@ HAVE_AMD3DNOW 1 -+#@DEFINE_@ HAVE_AMD3DNOWEXT 1 -+#@DEFINE_@ HAVE_AVX 1 -+#@DEFINE_@ HAVE_AVX2 1 -+#@DEFINE_@ HAVE_FMA3 1 -+#@DEFINE_@ HAVE_FMA4 1 -+#@DEFINE_@ HAVE_MMX 1 -+#@DEFINE_@ HAVE_MMXEXT 1 -+#@DEFINE_@ HAVE_SSE 1 -+#@DEFINE_@ HAVE_SSE2 1 -+#@DEFINE_@ HAVE_SSE3 1 -+#@DEFINE_@ HAVE_SSE4 1 -+#@DEFINE_@ HAVE_SSE42 1 -+#@DEFINE_@ HAVE_SSSE3 1 -+#@DEFINE_@ HAVE_XOP 1 -+#@DEFINE_@ HAVE_CPUNOP 1 -+#@DEFINE_@ HAVE_I686 1 -+#@DEFINE_@ HAVE_MIPSFPU 0 -+#@DEFINE_@ HAVE_MIPS32R2 1 -+#@DEFINE_@ HAVE_MIPSDSPR1 0 -+#@DEFINE_@ HAVE_MIPSDSPR2 0 -+#@DEFINE_@ HAVE_LOONGSON 1 -+#@DEFINE_@ HAVE_ARMV5TE_EXTERNAL 0 -+#@DEFINE_@ HAVE_ARMV6_EXTERNAL 0 -+#@DEFINE_@ HAVE_ARMV6T2_EXTERNAL 0 -+#@DEFINE_@ HAVE_ARMV8_EXTERNAL 0 -+#@DEFINE_@ HAVE_NEON_EXTERNAL 0 -+#@DEFINE_@ HAVE_VFP_EXTERNAL 0 -+#@DEFINE_@ HAVE_VFPV3_EXTERNAL 0 -+#@DEFINE_@ HAVE_SETEND_EXTERNAL 0 -+#@DEFINE_@ HAVE_ALTIVEC_EXTERNAL 0 -+#@DEFINE_@ HAVE_DCBZL_EXTERNAL 0 -+#@DEFINE_@ HAVE_LDBRX_EXTERNAL 0 -+#@DEFINE_@ HAVE_PPC4XX_EXTERNAL 0 -+#@DEFINE_@ HAVE_VSX_EXTERNAL 0 -+#@DEFINE_@ HAVE_AMD3DNOW_EXTERNAL 1 -+#@DEFINE_@ HAVE_AMD3DNOWEXT_EXTERNAL 1 -+#@DEFINE_@ HAVE_AVX_EXTERNAL 1 -+#@DEFINE_@ HAVE_AVX2_EXTERNAL 1 -+#@DEFINE_@ HAVE_FMA3_EXTERNAL 1 -+#@DEFINE_@ HAVE_FMA4_EXTERNAL 1 -+#@DEFINE_@ HAVE_MMX_EXTERNAL 1 -+#@DEFINE_@ HAVE_MMXEXT_EXTERNAL 1 -+#@DEFINE_@ HAVE_SSE_EXTERNAL 1 -+#@DEFINE_@ HAVE_SSE2_EXTERNAL 1 -+#@DEFINE_@ HAVE_SSE3_EXTERNAL 1 -+#@DEFINE_@ HAVE_SSE4_EXTERNAL 1 -+#@DEFINE_@ HAVE_SSE42_EXTERNAL 1 -+#@DEFINE_@ HAVE_SSSE3_EXTERNAL 1 -+#@DEFINE_@ HAVE_XOP_EXTERNAL 1 -+#@DEFINE_@ HAVE_CPUNOP_EXTERNAL 0 -+#@DEFINE_@ HAVE_I686_EXTERNAL 0 -+#@DEFINE_@ HAVE_MIPSFPU_EXTERNAL 0 -+#@DEFINE_@ HAVE_MIPS32R2_EXTERNAL 0 -+#@DEFINE_@ HAVE_MIPSDSPR1_EXTERNAL 0 -+#@DEFINE_@ HAVE_MIPSDSPR2_EXTERNAL 0 -+#@DEFINE_@ HAVE_LOONGSON_EXTERNAL 0 -+#@DEFINE_@ HAVE_ARMV5TE_INLINE 0 -+#@DEFINE_@ HAVE_ARMV6_INLINE 0 -+#@DEFINE_@ HAVE_ARMV6T2_INLINE 0 -+#@DEFINE_@ HAVE_ARMV8_INLINE 0 -+#@DEFINE_@ HAVE_NEON_INLINE 0 -+#@DEFINE_@ HAVE_VFP_INLINE 0 -+#@DEFINE_@ HAVE_VFPV3_INLINE 0 -+#@DEFINE_@ HAVE_SETEND_INLINE 0 -+#@DEFINE_@ HAVE_ALTIVEC_INLINE 0 -+#@DEFINE_@ HAVE_DCBZL_INLINE 0 -+#@DEFINE_@ HAVE_LDBRX_INLINE 0 -+#@DEFINE_@ HAVE_PPC4XX_INLINE 0 -+#@DEFINE_@ HAVE_VSX_INLINE 0 -+#@DEFINE_@ HAVE_AMD3DNOW_INLINE 1 -+#@DEFINE_@ HAVE_AMD3DNOWEXT_INLINE 1 -+#@DEFINE_@ HAVE_AVX_INLINE 1 -+#@DEFINE_@ HAVE_AVX2_INLINE 1 -+#@DEFINE_@ HAVE_FMA3_INLINE 1 -+#@DEFINE_@ HAVE_FMA4_INLINE 1 -+#@DEFINE_@ HAVE_MMX_INLINE 1 -+#@DEFINE_@ HAVE_MMXEXT_INLINE 1 -+#@DEFINE_@ HAVE_SSE_INLINE 1 -+#@DEFINE_@ HAVE_SSE2_INLINE 1 -+#@DEFINE_@ HAVE_SSE3_INLINE 1 -+#@DEFINE_@ HAVE_SSE4_INLINE 1 -+#@DEFINE_@ HAVE_SSE42_INLINE 1 -+#@DEFINE_@ HAVE_SSSE3_INLINE 1 -+#@DEFINE_@ HAVE_XOP_INLINE 1 -+#@DEFINE_@ HAVE_CPUNOP_INLINE 0 -+#@DEFINE_@ HAVE_I686_INLINE 0 -+#@DEFINE_@ HAVE_MIPSFPU_INLINE 0 -+#@DEFINE_@ HAVE_MIPS32R2_INLINE 0 -+#@DEFINE_@ HAVE_MIPSDSPR1_INLINE 0 -+#@DEFINE_@ HAVE_MIPSDSPR2_INLINE 0 -+#@DEFINE_@ HAVE_LOONGSON_INLINE 0 -+#@DEFINE_@ HAVE_ALIGNED_STACK 1 -+#@DEFINE_@ HAVE_FAST_64BIT 1 -+#@DEFINE_@ HAVE_FAST_CLZ 1 -+#@DEFINE_@ HAVE_FAST_CMOV 1 -+#@DEFINE_@ HAVE_LOCAL_ALIGNED_8 1 -+#@DEFINE_@ HAVE_LOCAL_ALIGNED_16 1 -+#@DEFINE_@ HAVE_LOCAL_ALIGNED_32 1 -+#@DEFINE_@ HAVE_SIMD_ALIGN_16 1 -+#@DEFINE_@ HAVE_ATOMICS_GCC 1 -+#@DEFINE_@ HAVE_ATOMICS_SUNCC 0 -+#@DEFINE_@ HAVE_ATOMICS_WIN32 0 -+#@DEFINE_@ HAVE_ATOMIC_CAS_PTR 0 -+#@DEFINE_@ HAVE_ATOMIC_COMPARE_EXCHANGE 1 -+#@DEFINE_@ HAVE_MACHINE_RW_BARRIER 0 -+#@DEFINE_@ HAVE_MEMORYBARRIER 0 -+#@DEFINE_@ HAVE_MM_EMPTY 1 -+#@DEFINE_@ HAVE_RDTSC 0 -+#@DEFINE_@ HAVE_SARESTART 1 -+#@DEFINE_@ HAVE_SYNC_VAL_COMPARE_AND_SWAP 1 -+#@DEFINE_@ HAVE_INLINE_ASM 1 -+#@DEFINE_@ HAVE_SYMVER 1 -+#@DEFINE_@ HAVE_YASM 1 -+#@DEFINE_@ HAVE_BIGENDIAN 0 -+#@DEFINE_@ HAVE_FAST_UNALIGNED 1 -+#@DEFINE_@ HAVE_INCOMPATIBLE_LIBAV_ABI 0 -+#@DEFINE_@ HAVE_ALSA_ASOUNDLIB_H 0 -+#@DEFINE_@ HAVE_ALTIVEC_H 0 -+#@DEFINE_@ HAVE_ARPA_INET_H 1 -+#@DEFINE_@ HAVE_ASM_TYPES_H 1 -+#@DEFINE_@ HAVE_CDIO_PARANOIA_H 0 -+#@DEFINE_@ HAVE_CDIO_PARANOIA_PARANOIA_H 0 -+#@DEFINE_@ HAVE_DEV_BKTR_IOCTL_BT848_H 0 -+#@DEFINE_@ HAVE_DEV_BKTR_IOCTL_METEOR_H 0 -+#@DEFINE_@ HAVE_DEV_IC_BT8XX_H 0 -+#@DEFINE_@ HAVE_DEV_VIDEO_BKTR_IOCTL_BT848_H 0 -+#@DEFINE_@ HAVE_DEV_VIDEO_METEOR_IOCTL_METEOR_H 0 -+#@DEFINE_@ HAVE_DIRECT_H 0 -+#@DEFINE_@ HAVE_DLFCN_H 1 -+#@DEFINE_@ HAVE_DXVA_H 0 -+#@DEFINE_@ HAVE_ES2_GL_H 0 -+#@DEFINE_@ HAVE_GSM_H 0 -+#@DEFINE_@ HAVE_IO_H 0 -+#@DEFINE_@ HAVE_MACH_MACH_TIME_H 0 -+#@DEFINE_@ HAVE_MACHINE_IOCTL_BT848_H 0 -+#@DEFINE_@ HAVE_MACHINE_IOCTL_METEOR_H 0 -+#@DEFINE_@ HAVE_MALLOC_H 1 -+#@DEFINE_@ HAVE_OPENJPEG_1_5_OPENJPEG_H 0 -+#@DEFINE_@ HAVE_OPENGL_GL3_H 0 -+#@DEFINE_@ HAVE_POLL_H 1 -+#@DEFINE_@ HAVE_SNDIO_H 0 -+#@DEFINE_@ HAVE_SOUNDCARD_H 0 -+#@DEFINE_@ HAVE_SYS_MMAN_H 1 -+#@DEFINE_@ HAVE_SYS_PARAM_H 1 -+#@DEFINE_@ HAVE_SYS_RESOURCE_H 1 -+#@DEFINE_@ HAVE_SYS_SELECT_H 1 -+#@DEFINE_@ HAVE_SYS_SOUNDCARD_H 1 -+#@DEFINE_@ HAVE_SYS_TIME_H 1 -+#@DEFINE_@ HAVE_SYS_UN_H 1 -+#@DEFINE_@ HAVE_SYS_VIDEOIO_H 0 -+#@DEFINE_@ HAVE_TERMIOS_H 1 -+#@DEFINE_@ HAVE_UDPLITE_H 0 -+#@DEFINE_@ HAVE_UNISTD_H 1 -+#@DEFINE_@ HAVE_WINDOWS_H 0 -+#@DEFINE_@ HAVE_WINSOCK2_H 0 -+#@DEFINE_@ HAVE_INTRINSICS_NEON 0 -+#@DEFINE_@ HAVE_ATANF 1 -+#@DEFINE_@ HAVE_ATAN2F 1 -+#@DEFINE_@ HAVE_CBRT 1 -+#@DEFINE_@ HAVE_CBRTF 1 -+#@DEFINE_@ HAVE_COSF 1 -+#@DEFINE_@ HAVE_EXP2 1 -+#@DEFINE_@ HAVE_EXP2F 1 -+#@DEFINE_@ HAVE_EXPF 1 -+#@DEFINE_@ HAVE_ISINF 1 -+#@DEFINE_@ HAVE_ISNAN 1 -+#@DEFINE_@ HAVE_LDEXPF 1 -+#@DEFINE_@ HAVE_LLRINT 1 -+#@DEFINE_@ HAVE_LLRINTF 1 -+#@DEFINE_@ HAVE_LOG2 1 -+#@DEFINE_@ HAVE_LOG2F 1 -+#@DEFINE_@ HAVE_LOG10F 1 -+#@DEFINE_@ HAVE_LRINT 1 -+#@DEFINE_@ HAVE_LRINTF 1 -+#@DEFINE_@ HAVE_POWF 1 -+#@DEFINE_@ HAVE_RINT 1 -+#@DEFINE_@ HAVE_ROUND 1 -+#@DEFINE_@ HAVE_ROUNDF 1 -+#@DEFINE_@ HAVE_SINF 1 -+#@DEFINE_@ HAVE_TRUNC 1 -+#@DEFINE_@ HAVE_TRUNCF 1 -+#@DEFINE_@ HAVE_ACCESS 1 -+#@DEFINE_@ HAVE_ALIGNED_MALLOC 0 -+#@DEFINE_@ HAVE_CLOCK_GETTIME 1 -+#@DEFINE_@ HAVE_CLOSESOCKET 0 -+#@DEFINE_@ HAVE_COMMANDLINETOARGVW 0 -+#@DEFINE_@ HAVE_COTASKMEMFREE 0 -+#@DEFINE_@ HAVE_CRYPTGENRANDOM 0 -+#@DEFINE_@ HAVE_DLOPEN 1 -+#@DEFINE_@ HAVE_FCNTL 1 -+#@DEFINE_@ HAVE_FLT_LIM 1 -+#@DEFINE_@ HAVE_FORK 1 -+#@DEFINE_@ HAVE_GETADDRINFO 1 -+#@DEFINE_@ HAVE_GETHRTIME 0 -+#@DEFINE_@ HAVE_GETOPT 1 -+#@DEFINE_@ HAVE_GETPROCESSAFFINITYMASK 0 -+#@DEFINE_@ HAVE_GETPROCESSMEMORYINFO 0 -+#@DEFINE_@ HAVE_GETPROCESSTIMES 0 -+#@DEFINE_@ HAVE_GETRUSAGE 1 -+#@DEFINE_@ HAVE_GETSERVBYPORT 1 -+#@DEFINE_@ HAVE_GETSYSTEMTIMEASFILETIME 0 -+#@DEFINE_@ HAVE_GETTIMEOFDAY 1 -+#@DEFINE_@ HAVE_GLOB 1 -+#@DEFINE_@ HAVE_GLXGETPROCADDRESS 0 -+#@DEFINE_@ HAVE_GMTIME_R 1 -+#@DEFINE_@ HAVE_INET_ATON 1 -+#@DEFINE_@ HAVE_ISATTY 1 -+#@DEFINE_@ HAVE_JACK_PORT_GET_LATENCY_RANGE 0 -+#@DEFINE_@ HAVE_KBHIT 0 -+#@DEFINE_@ HAVE_LOCALTIME_R 1 -+#@DEFINE_@ HAVE_LZO1X_999_COMPRESS 0 -+#@DEFINE_@ HAVE_MACH_ABSOLUTE_TIME 0 -+#@DEFINE_@ HAVE_MAPVIEWOFFILE 0 -+#@DEFINE_@ HAVE_MEMALIGN 1 -+#@DEFINE_@ HAVE_MKSTEMP 1 -+#@DEFINE_@ HAVE_MMAP 1 -+#@DEFINE_@ HAVE_MPROTECT 1 -+#@DEFINE_@ HAVE_NANOSLEEP 1 -+#@DEFINE_@ HAVE_PEEKNAMEDPIPE 0 -+#@DEFINE_@ HAVE_POSIX_MEMALIGN 1 -+#@DEFINE_@ HAVE_PTHREAD_CANCEL 1 -+#@DEFINE_@ HAVE_SCHED_GETAFFINITY 1 -+#@DEFINE_@ HAVE_SETCONSOLETEXTATTRIBUTE 0 -+#@DEFINE_@ HAVE_SETMODE 0 -+#@DEFINE_@ HAVE_SETRLIMIT 1 -+#@DEFINE_@ HAVE_SLEEP 0 -+#@DEFINE_@ HAVE_STRERROR_R 1 -+#@DEFINE_@ HAVE_SYSCONF 1 -+#@DEFINE_@ HAVE_SYSCTL 1 -+#@DEFINE_@ HAVE_USLEEP 1 -+#@DEFINE_@ HAVE_VIRTUALALLOC 0 -+#@DEFINE_@ HAVE_WGLGETPROCADDRESS 0 -+#@DEFINE_@ HAVE_PTHREADS 1 -+#@DEFINE_@ HAVE_OS2THREADS 0 -+#@DEFINE_@ HAVE_W32THREADS 0 -+#@DEFINE_@ HAVE_AS_DN_DIRECTIVE 0 -+#@DEFINE_@ HAVE_AS_FUNC 0 -+#@DEFINE_@ HAVE_AS_OBJECT_ARCH 0 -+#@DEFINE_@ HAVE_ASM_MOD_Q 0 -+#@DEFINE_@ HAVE_ATTRIBUTE_MAY_ALIAS 1 -+#@DEFINE_@ HAVE_ATTRIBUTE_PACKED 1 -+#@DEFINE_@ HAVE_EBP_AVAILABLE 1 -+#@DEFINE_@ HAVE_EBX_AVAILABLE 1 -+#@DEFINE_@ HAVE_GNU_AS 0 -+#@DEFINE_@ HAVE_GNU_WINDRES 0 -+#@DEFINE_@ HAVE_IBM_ASM 0 -+#@DEFINE_@ HAVE_INLINE_ASM_LABELS 1 -+#@DEFINE_@ HAVE_INLINE_ASM_NONLOCAL_LABELS 1 -+#@DEFINE_@ HAVE_INLINE_ASM_DIRECT_SYMBOL_REFS 1 -+#@DEFINE_@ HAVE_PRAGMA_DEPRECATED 1 -+#@DEFINE_@ HAVE_RSYNC_CONTIMEOUT 0 -+#@DEFINE_@ HAVE_SYMVER_ASM_LABEL 0 -+#@DEFINE_@ HAVE_SYMVER_GNU_ASM 1 -+#@DEFINE_@ HAVE_VFP_ARGS 0 -+#@DEFINE_@ HAVE_XFORM_ASM 0 -+#@DEFINE_@ HAVE_XMM_CLOBBERS 1 -+#@DEFINE_@ HAVE_CONDITION_VARIABLE_PTR 0 -+#@DEFINE_@ HAVE_DXVA_PICPARAMS_HEVC 0 -+#@DEFINE_@ HAVE_SOCKLEN_T 1 -+#@DEFINE_@ HAVE_STRUCT_ADDRINFO 1 -+#@DEFINE_@ HAVE_STRUCT_GROUP_SOURCE_REQ 1 -+#@DEFINE_@ HAVE_STRUCT_IP_MREQ_SOURCE 1 -+#@DEFINE_@ HAVE_STRUCT_IPV6_MREQ 1 -+#@DEFINE_@ HAVE_STRUCT_POLLFD 1 -+#@DEFINE_@ HAVE_STRUCT_RUSAGE_RU_MAXRSS 1 -+#@DEFINE_@ HAVE_STRUCT_SCTP_EVENT_SUBSCRIBE 0 -+#@DEFINE_@ HAVE_STRUCT_SOCKADDR_IN6 1 -+#@DEFINE_@ HAVE_STRUCT_SOCKADDR_SA_LEN 0 -+#@DEFINE_@ HAVE_STRUCT_SOCKADDR_STORAGE 1 -+#@DEFINE_@ HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC 1 -+#@DEFINE_@ HAVE_STRUCT_V4L2_FRMIVALENUM_DISCRETE 1 -+#@DEFINE_@ HAVE_ATOMICS_NATIVE 1 -+#@DEFINE_@ HAVE_DOS_PATHS 0 -+#@DEFINE_@ HAVE_DXVA2API_COBJ 0 -+#@DEFINE_@ HAVE_DXVA2_LIB 0 -+#@DEFINE_@ HAVE_LIBC_MSVCRT 0 -+#@DEFINE_@ HAVE_LIBDC1394_1 0 -+#@DEFINE_@ HAVE_LIBDC1394_2 0 -+#@DEFINE_@ HAVE_MAKEINFO 0 -+#@DEFINE_@ HAVE_MAKEINFO_HTML 0 -+#@DEFINE_@ HAVE_PERL 1 -+#@DEFINE_@ HAVE_POD2MAN 1 -+#@DEFINE_@ HAVE_SDL 0 -+#@DEFINE_@ HAVE_SECTION_DATA_REL_RO 1 -+#@DEFINE_@ HAVE_TEXI2HTML 0 -+#@DEFINE_@ HAVE_THREADS 1 -+#@DEFINE_@ HAVE_VAAPI_X11 0 -+#@DEFINE_@ HAVE_VDPAU_X11 0 -+#@DEFINE_@ HAVE_XLIB 0 -+/* CONFIG_LIST */ -+#@DEFINE_@ CONFIG_BSFS 1 -+#@DEFINE_@ CONFIG_DECODERS 1 -+#@DEFINE_@ CONFIG_DEMUXERS 1 -+#@DEFINE_@ CONFIG_ENCODERS 1 -+#@DEFINE_@ CONFIG_FILTERS 1 -+#@DEFINE_@ CONFIG_HWACCELS 0 -+#@DEFINE_@ CONFIG_INDEVS 1 -+#@DEFINE_@ CONFIG_MUXERS 1 -+#@DEFINE_@ CONFIG_OUTDEVS 1 -+#@DEFINE_@ CONFIG_PARSERS 1 -+#@DEFINE_@ CONFIG_PROTOCOLS 1 -+#@DEFINE_@ CONFIG_DOC 1 -+#@DEFINE_@ CONFIG_HTMLPAGES 0 -+#@DEFINE_@ CONFIG_MANPAGES 1 -+#@DEFINE_@ CONFIG_PODPAGES 1 -+#@DEFINE_@ CONFIG_TXTPAGES 0 -+#@DEFINE_@ CONFIG_AVIO_READING_EXAMPLE 1 -+#@DEFINE_@ CONFIG_DECODING_ENCODING_EXAMPLE 1 -+#@DEFINE_@ CONFIG_DEMUXING_DECODING_EXAMPLE 1 -+#@DEFINE_@ CONFIG_EXTRACT_MVS_EXAMPLE 1 -+#@DEFINE_@ CONFIG_FILTER_AUDIO_EXAMPLE 1 -+#@DEFINE_@ CONFIG_FILTERING_AUDIO_EXAMPLE 1 -+#@DEFINE_@ CONFIG_FILTERING_VIDEO_EXAMPLE 1 -+#@DEFINE_@ CONFIG_METADATA_EXAMPLE 1 -+#@DEFINE_@ CONFIG_MUXING_EXAMPLE 1 -+#@DEFINE_@ CONFIG_QSVDEC_EXAMPLE 0 -+#@DEFINE_@ CONFIG_REMUXING_EXAMPLE 1 -+#@DEFINE_@ CONFIG_RESAMPLING_AUDIO_EXAMPLE 1 -+#@DEFINE_@ CONFIG_SCALING_VIDEO_EXAMPLE 1 -+#@DEFINE_@ CONFIG_TRANSCODE_AAC_EXAMPLE 1 -+#@DEFINE_@ CONFIG_TRANSCODING_EXAMPLE 1 -+#@DEFINE_@ CONFIG_AVISYNTH 0 -+#@DEFINE_@ CONFIG_BZLIB 0 -+#@DEFINE_@ CONFIG_CRYSTALHD 0 -+#@DEFINE_@ CONFIG_DECKLINK 0 -+#@DEFINE_@ CONFIG_FREI0R 0 -+#@DEFINE_@ CONFIG_GNUTLS 0 -+#@DEFINE_@ CONFIG_ICONV 0 -+#@DEFINE_@ CONFIG_LADSPA 0 -+#@DEFINE_@ CONFIG_LIBAACPLUS 0 -+#@DEFINE_@ CONFIG_LIBASS 0 -+#@DEFINE_@ CONFIG_LIBBLURAY 0 -+#@DEFINE_@ CONFIG_LIBBS2B 0 -+#@DEFINE_@ CONFIG_LIBCACA 0 -+#@DEFINE_@ CONFIG_LIBCDIO 0 -+#@DEFINE_@ CONFIG_LIBCELT 0 -+#@DEFINE_@ CONFIG_LIBDC1394 0 -+#@DEFINE_@ CONFIG_LIBFAAC 0 -+#@DEFINE_@ CONFIG_LIBFDK_AAC 0 -+#@DEFINE_@ CONFIG_LIBFLITE 0 -+#@DEFINE_@ CONFIG_LIBFONTCONFIG 0 -+#@DEFINE_@ CONFIG_LIBFREETYPE 0 -+#@DEFINE_@ CONFIG_LIBFRIBIDI 0 -+#@DEFINE_@ CONFIG_LIBGME 0 -+#@DEFINE_@ CONFIG_LIBGSM 0 -+#@DEFINE_@ CONFIG_LIBIEC61883 0 -+#@DEFINE_@ CONFIG_LIBILBC 0 -+#@DEFINE_@ CONFIG_LIBMFX 0 -+#@DEFINE_@ CONFIG_LIBMODPLUG 0 -+#@DEFINE_@ CONFIG_LIBMP3LAME 0 -+#@DEFINE_@ CONFIG_LIBNUT 0 -+#@DEFINE_@ CONFIG_LIBOPENCORE_AMRNB 0 -+#@DEFINE_@ CONFIG_LIBOPENCORE_AMRWB 0 -+#@DEFINE_@ CONFIG_LIBOPENCV 0 -+#@DEFINE_@ CONFIG_LIBOPENH264 1 -+#@DEFINE_@ CONFIG_LIBOPENJPEG 0 -+#@DEFINE_@ CONFIG_LIBOPUS 0 -+#@DEFINE_@ CONFIG_LIBPULSE 0 -+#@DEFINE_@ CONFIG_LIBQUVI 0 -+#@DEFINE_@ CONFIG_LIBRTMP 0 -+#@DEFINE_@ CONFIG_LIBSCHROEDINGER 0 -+#@DEFINE_@ CONFIG_LIBSHINE 0 -+#@DEFINE_@ CONFIG_LIBSMBCLIENT 0 -+#@DEFINE_@ CONFIG_LIBSOXR 0 -+#@DEFINE_@ CONFIG_LIBSPEEX 0 -+#@DEFINE_@ CONFIG_LIBSSH 0 -+#@DEFINE_@ CONFIG_LIBSTAGEFRIGHT_H264 0 -+#@DEFINE_@ CONFIG_LIBTHEORA 0 -+#@DEFINE_@ CONFIG_LIBTWOLAME 0 -+#@DEFINE_@ CONFIG_LIBUTVIDEO 0 -+#@DEFINE_@ CONFIG_LIBV4L2 0 -+#@DEFINE_@ CONFIG_LIBVIDSTAB 0 -+#@DEFINE_@ CONFIG_LIBVO_AACENC 0 -+#@DEFINE_@ CONFIG_LIBVO_AMRWBENC 0 -+#@DEFINE_@ CONFIG_LIBVORBIS 0 -+#@DEFINE_@ CONFIG_LIBVPX 0 -+#@DEFINE_@ CONFIG_LIBWAVPACK 0 -+#@DEFINE_@ CONFIG_LIBWEBP 0 -+#@DEFINE_@ CONFIG_LIBX264 0 -+#@DEFINE_@ CONFIG_LIBX265 0 -+#@DEFINE_@ CONFIG_LIBXAVS 0 -+#@DEFINE_@ CONFIG_LIBXCB 0 -+#@DEFINE_@ CONFIG_LIBXCB_SHM 0 -+#@DEFINE_@ CONFIG_LIBXCB_SHAPE 0 -+#@DEFINE_@ CONFIG_LIBXCB_XFIXES 0 -+#@DEFINE_@ CONFIG_LIBXVID 0 -+#@DEFINE_@ CONFIG_LIBZMQ 0 -+#@DEFINE_@ CONFIG_LIBZVBI 0 -+#@DEFINE_@ CONFIG_LZMA 0 -+#@DEFINE_@ CONFIG_NVENC 0 -+#@DEFINE_@ CONFIG_OPENAL 0 -+#@DEFINE_@ CONFIG_OPENCL 0 -+#@DEFINE_@ CONFIG_OPENGL 0 -+#@DEFINE_@ CONFIG_OPENSSL 0 -+#@DEFINE_@ CONFIG_SDL 0 -+#@DEFINE_@ CONFIG_X11GRAB 0 -+#@DEFINE_@ CONFIG_XLIB 0 -+#@DEFINE_@ CONFIG_ZLIB 0 -+#@DEFINE_@ CONFIG_FTRAPV 0 -+#@DEFINE_@ CONFIG_GRAY 0 -+#@DEFINE_@ CONFIG_HARDCODED_TABLES 0 -+#@DEFINE_@ CONFIG_RUNTIME_CPUDETECT 1 -+#@DEFINE_@ CONFIG_SAFE_BITSTREAM_READER 1 -+#@DEFINE_@ CONFIG_SHARED 0 -+#@DEFINE_@ CONFIG_SMALL 0 -+#@DEFINE_@ CONFIG_STATIC 1 -+#@DEFINE_@ CONFIG_SWSCALE_ALPHA 1 -+#@DEFINE_@ CONFIG_DXVA2 0 -+#@DEFINE_@ CONFIG_VAAPI 0 -+#@DEFINE_@ CONFIG_VDA 0 -+#@DEFINE_@ CONFIG_VDPAU 0 -+#@DEFINE_@ CONFIG_XVMC 0 -+#@DEFINE_@ CONFIG_GPL 0 -+#@DEFINE_@ CONFIG_NONFREE 0 -+#@DEFINE_@ CONFIG_VERSION3 0 -+#@DEFINE_@ CONFIG_AVCODEC 1 -+#@DEFINE_@ CONFIG_AVDEVICE 1 -+#@DEFINE_@ CONFIG_AVFILTER 1 -+#@DEFINE_@ CONFIG_AVFORMAT 1 -+#@DEFINE_@ CONFIG_AVRESAMPLE 0 -+#@DEFINE_@ CONFIG_AVUTIL 1 -+#@DEFINE_@ CONFIG_POSTPROC 0 -+#@DEFINE_@ CONFIG_SWRESAMPLE 1 -+#@DEFINE_@ CONFIG_SWSCALE 1 -+#@DEFINE_@ CONFIG_FFPLAY 0 -+#@DEFINE_@ CONFIG_FFPROBE 1 -+#@DEFINE_@ CONFIG_FFSERVER 1 -+#@DEFINE_@ CONFIG_FFMPEG 1 -+#@DEFINE_@ CONFIG_DCT 1 -+#@DEFINE_@ CONFIG_DWT 1 -+#@DEFINE_@ CONFIG_ERROR_RESILIENCE 1 -+#@DEFINE_@ CONFIG_FAAN 1 -+#@DEFINE_@ CONFIG_FAST_UNALIGNED 1 -+#@DEFINE_@ CONFIG_FFT 1 -+#@DEFINE_@ CONFIG_LSP 1 -+#@DEFINE_@ CONFIG_LZO 1 -+#@DEFINE_@ CONFIG_MDCT 1 -+#@DEFINE_@ CONFIG_PIXELUTILS 1 -+#@DEFINE_@ CONFIG_NETWORK 1 -+#@DEFINE_@ CONFIG_QSV 0 -+#@DEFINE_@ CONFIG_RDFT 1 -+#@DEFINE_@ CONFIG_FONTCONFIG 0 -+#@DEFINE_@ CONFIG_INCOMPATIBLE_LIBAV_ABI 0 -+#@DEFINE_@ CONFIG_MEMALIGN_HACK 0 -+#@DEFINE_@ CONFIG_MEMORY_POISONING 0 -+#@DEFINE_@ CONFIG_NEON_CLOBBER_TEST 0 -+#@DEFINE_@ CONFIG_PIC 1 -+#@DEFINE_@ CONFIG_POD2MAN 1 -+#@DEFINE_@ CONFIG_RAISE_MAJOR 0 -+#@DEFINE_@ CONFIG_THUMB 0 -+#@DEFINE_@ CONFIG_XMM_CLOBBER_TEST 0 -+/* CONFIG_EXTRA */ -+#@DEFINE_@ CONFIG_AANDCTTABLES 1 -+#@DEFINE_@ CONFIG_AC3DSP 1 -+#@DEFINE_@ CONFIG_AUDIO_FRAME_QUEUE 1 -+#@DEFINE_@ CONFIG_AUDIODSP 1 -+#@DEFINE_@ CONFIG_BLOCKDSP 1 -+#@DEFINE_@ CONFIG_BSWAPDSP 1 -+#@DEFINE_@ CONFIG_CABAC 1 -+#@DEFINE_@ CONFIG_DVPROFILE 1 -+#@DEFINE_@ CONFIG_EXIF 1 -+#@DEFINE_@ CONFIG_FAANDCT 1 -+#@DEFINE_@ CONFIG_FAANIDCT 1 -+#@DEFINE_@ CONFIG_FDCTDSP 1 -+#@DEFINE_@ CONFIG_FMTCONVERT 1 -+#@DEFINE_@ CONFIG_FRAME_THREAD_ENCODER 1 -+#@DEFINE_@ CONFIG_GCRYPT 0 -+#@DEFINE_@ CONFIG_GOLOMB 1 -+#@DEFINE_@ CONFIG_GPLV3 0 -+#@DEFINE_@ CONFIG_H263DSP 1 -+#@DEFINE_@ CONFIG_H264CHROMA 1 -+#@DEFINE_@ CONFIG_H264DSP 1 -+#@DEFINE_@ CONFIG_H264PRED 1 -+#@DEFINE_@ CONFIG_H264QPEL 1 -+#@DEFINE_@ CONFIG_HPELDSP 1 -+#@DEFINE_@ CONFIG_HUFFMAN 1 -+#@DEFINE_@ CONFIG_HUFFYUVDSP 1 -+#@DEFINE_@ CONFIG_HUFFYUVENCDSP 1 -+#@DEFINE_@ CONFIG_IDCTDSP 1 -+#@DEFINE_@ CONFIG_IIRFILTER 1 -+#@DEFINE_@ CONFIG_IMDCT15 1 -+#@DEFINE_@ CONFIG_INTRAX8 1 -+#@DEFINE_@ CONFIG_LGPLV3 0 -+#@DEFINE_@ CONFIG_LLAUDDSP 1 -+#@DEFINE_@ CONFIG_LLVIDDSP 1 -+#@DEFINE_@ CONFIG_LPC 1 -+#@DEFINE_@ CONFIG_ME_CMP 1 -+#@DEFINE_@ CONFIG_MPEG_ER 1 -+#@DEFINE_@ CONFIG_MPEGAUDIO 1 -+#@DEFINE_@ CONFIG_MPEGAUDIODSP 1 -+#@DEFINE_@ CONFIG_MPEGVIDEO 1 -+#@DEFINE_@ CONFIG_MPEGVIDEOENC 1 -+#@DEFINE_@ CONFIG_NETTLE 0 -+#@DEFINE_@ CONFIG_PIXBLOCKDSP 1 -+#@DEFINE_@ CONFIG_QPELDSP 1 -+#@DEFINE_@ CONFIG_RANGECODER 1 -+#@DEFINE_@ CONFIG_RIFFDEC 1 -+#@DEFINE_@ CONFIG_RIFFENC 1 -+#@DEFINE_@ CONFIG_RTPDEC 1 -+#@DEFINE_@ CONFIG_RTPENC_CHAIN 1 -+#@DEFINE_@ CONFIG_SINEWIN 1 -+#@DEFINE_@ CONFIG_STARTCODE 1 -+#@DEFINE_@ CONFIG_TPELDSP 1 -+#@DEFINE_@ CONFIG_VIDEODSP 1 -+#@DEFINE_@ CONFIG_VP3DSP 1 -+#@DEFINE_@ CONFIG_WMA_FREQS 1 -+/* ALL_COMPONENTS */ -+#@DEFINE_@ CONFIG_AAC_ADTSTOASC_BSF 1 -+#@DEFINE_@ CONFIG_CHOMP_BSF 1 -+#@DEFINE_@ CONFIG_DUMP_EXTRADATA_BSF 1 -+#@DEFINE_@ CONFIG_H264_MP4TOANNEXB_BSF 1 -+#@DEFINE_@ CONFIG_IMX_DUMP_HEADER_BSF 1 -+#@DEFINE_@ CONFIG_MJPEG2JPEG_BSF 1 -+#@DEFINE_@ CONFIG_MJPEGA_DUMP_HEADER_BSF 1 -+#@DEFINE_@ CONFIG_MP3_HEADER_DECOMPRESS_BSF 1 -+#@DEFINE_@ CONFIG_MOV2TEXTSUB_BSF 1 -+#@DEFINE_@ CONFIG_NOISE_BSF 1 -+#@DEFINE_@ CONFIG_REMOVE_EXTRADATA_BSF 1 -+#@DEFINE_@ CONFIG_TEXT2MOVSUB_BSF 1 -+#@DEFINE_@ CONFIG_AASC_DECODER 1 -+#@DEFINE_@ CONFIG_AIC_DECODER 1 -+#@DEFINE_@ CONFIG_ALIAS_PIX_DECODER 1 -+#@DEFINE_@ CONFIG_AMV_DECODER 1 -+#@DEFINE_@ CONFIG_ANM_DECODER 1 -+#@DEFINE_@ CONFIG_ANSI_DECODER 1 -+#@DEFINE_@ CONFIG_APNG_DECODER 0 -+#@DEFINE_@ CONFIG_ASV1_DECODER 1 -+#@DEFINE_@ CONFIG_ASV2_DECODER 1 -+#@DEFINE_@ CONFIG_AURA_DECODER 1 -+#@DEFINE_@ CONFIG_AURA2_DECODER 1 -+#@DEFINE_@ CONFIG_AVRP_DECODER 1 -+#@DEFINE_@ CONFIG_AVRN_DECODER 1 -+#@DEFINE_@ CONFIG_AVS_DECODER 1 -+#@DEFINE_@ CONFIG_AVUI_DECODER 1 -+#@DEFINE_@ CONFIG_AYUV_DECODER 1 -+#@DEFINE_@ CONFIG_BETHSOFTVID_DECODER 1 -+#@DEFINE_@ CONFIG_BFI_DECODER 1 -+#@DEFINE_@ CONFIG_BINK_DECODER 1 -+#@DEFINE_@ CONFIG_BMP_DECODER 1 -+#@DEFINE_@ CONFIG_BMV_VIDEO_DECODER 1 -+#@DEFINE_@ CONFIG_BRENDER_PIX_DECODER 1 -+#@DEFINE_@ CONFIG_C93_DECODER 1 -+#@DEFINE_@ CONFIG_CAVS_DECODER 1 -+#@DEFINE_@ CONFIG_CDGRAPHICS_DECODER 1 -+#@DEFINE_@ CONFIG_CDXL_DECODER 1 -+#@DEFINE_@ CONFIG_CINEPAK_DECODER 1 -+#@DEFINE_@ CONFIG_CLJR_DECODER 1 -+#@DEFINE_@ CONFIG_CLLC_DECODER 1 -+#@DEFINE_@ CONFIG_COMFORTNOISE_DECODER 1 -+#@DEFINE_@ CONFIG_CPIA_DECODER 1 -+#@DEFINE_@ CONFIG_CSCD_DECODER 1 -+#@DEFINE_@ CONFIG_CYUV_DECODER 1 -+#@DEFINE_@ CONFIG_DFA_DECODER 1 -+#@DEFINE_@ CONFIG_DIRAC_DECODER 1 -+#@DEFINE_@ CONFIG_DNXHD_DECODER 1 -+#@DEFINE_@ CONFIG_DPX_DECODER 1 -+#@DEFINE_@ CONFIG_DSICINVIDEO_DECODER 1 -+#@DEFINE_@ CONFIG_DVVIDEO_DECODER 1 -+#@DEFINE_@ CONFIG_DXA_DECODER 0 -+#@DEFINE_@ CONFIG_DXTORY_DECODER 1 -+#@DEFINE_@ CONFIG_EACMV_DECODER 1 -+#@DEFINE_@ CONFIG_EAMAD_DECODER 1 -+#@DEFINE_@ CONFIG_EATGQ_DECODER 1 -+#@DEFINE_@ CONFIG_EATGV_DECODER 1 -+#@DEFINE_@ CONFIG_EATQI_DECODER 1 -+#@DEFINE_@ CONFIG_EIGHTBPS_DECODER 1 -+#@DEFINE_@ CONFIG_EIGHTSVX_EXP_DECODER 1 -+#@DEFINE_@ CONFIG_EIGHTSVX_FIB_DECODER 1 -+#@DEFINE_@ CONFIG_ESCAPE124_DECODER 1 -+#@DEFINE_@ CONFIG_ESCAPE130_DECODER 1 -+#@DEFINE_@ CONFIG_EXR_DECODER 0 -+#@DEFINE_@ CONFIG_FFV1_DECODER 1 -+#@DEFINE_@ CONFIG_FFVHUFF_DECODER 1 -+#@DEFINE_@ CONFIG_FIC_DECODER 1 -+#@DEFINE_@ CONFIG_FLASHSV_DECODER 0 -+#@DEFINE_@ CONFIG_FLASHSV2_DECODER 0 -+#@DEFINE_@ CONFIG_FLIC_DECODER 1 -+#@DEFINE_@ CONFIG_FLV_DECODER 1 -+#@DEFINE_@ CONFIG_FOURXM_DECODER 1 -+#@DEFINE_@ CONFIG_FRAPS_DECODER 1 -+#@DEFINE_@ CONFIG_FRWU_DECODER 1 -+#@DEFINE_@ CONFIG_G2M_DECODER 0 -+#@DEFINE_@ CONFIG_GIF_DECODER 1 -+#@DEFINE_@ CONFIG_H261_DECODER 1 -+#@DEFINE_@ CONFIG_H263_DECODER 1 -+#@DEFINE_@ CONFIG_H263I_DECODER 1 -+#@DEFINE_@ CONFIG_H263P_DECODER 1 -+#@DEFINE_@ CONFIG_H264_DECODER 1 -+#@DEFINE_@ CONFIG_H264_CRYSTALHD_DECODER 0 -+#@DEFINE_@ CONFIG_H264_QSV_DECODER 0 -+#@DEFINE_@ CONFIG_H264_VDA_DECODER 0 -+#@DEFINE_@ CONFIG_H264_VDPAU_DECODER 0 -+#@DEFINE_@ CONFIG_HEVC_DECODER 1 -+#@DEFINE_@ CONFIG_HNM4_VIDEO_DECODER 1 -+#@DEFINE_@ CONFIG_HQX_DECODER 1 -+#@DEFINE_@ CONFIG_HUFFYUV_DECODER 1 -+#@DEFINE_@ CONFIG_IDCIN_DECODER 1 -+#@DEFINE_@ CONFIG_IFF_BYTERUN1_DECODER 1 -+#@DEFINE_@ CONFIG_IFF_ILBM_DECODER 1 -+#@DEFINE_@ CONFIG_INDEO2_DECODER 1 -+#@DEFINE_@ CONFIG_INDEO3_DECODER 1 -+#@DEFINE_@ CONFIG_INDEO4_DECODER 1 -+#@DEFINE_@ CONFIG_INDEO5_DECODER 1 -+#@DEFINE_@ CONFIG_INTERPLAY_VIDEO_DECODER 1 -+#@DEFINE_@ CONFIG_JPEG2000_DECODER 1 -+#@DEFINE_@ CONFIG_JPEGLS_DECODER 1 -+#@DEFINE_@ CONFIG_JV_DECODER 1 -+#@DEFINE_@ CONFIG_KGV1_DECODER 1 -+#@DEFINE_@ CONFIG_KMVC_DECODER 1 -+#@DEFINE_@ CONFIG_LAGARITH_DECODER 1 -+#@DEFINE_@ CONFIG_LOCO_DECODER 1 -+#@DEFINE_@ CONFIG_MDEC_DECODER 1 -+#@DEFINE_@ CONFIG_MIMIC_DECODER 1 -+#@DEFINE_@ CONFIG_MJPEG_DECODER 1 -+#@DEFINE_@ CONFIG_MJPEGB_DECODER 1 -+#@DEFINE_@ CONFIG_MMVIDEO_DECODER 1 -+#@DEFINE_@ CONFIG_MOTIONPIXELS_DECODER 1 -+#@DEFINE_@ CONFIG_MPEG_XVMC_DECODER 0 -+#@DEFINE_@ CONFIG_MPEG1VIDEO_DECODER 1 -+#@DEFINE_@ CONFIG_MPEG2VIDEO_DECODER 1 -+#@DEFINE_@ CONFIG_MPEG4_DECODER 1 -+#@DEFINE_@ CONFIG_MPEG4_CRYSTALHD_DECODER 0 -+#@DEFINE_@ CONFIG_MPEG4_VDPAU_DECODER 0 -+#@DEFINE_@ CONFIG_MPEGVIDEO_DECODER 1 -+#@DEFINE_@ CONFIG_MPEG_VDPAU_DECODER 0 -+#@DEFINE_@ CONFIG_MPEG1_VDPAU_DECODER 0 -+#@DEFINE_@ CONFIG_MPEG2_CRYSTALHD_DECODER 0 -+#@DEFINE_@ CONFIG_MSA1_DECODER 1 -+#@DEFINE_@ CONFIG_MSMPEG4_CRYSTALHD_DECODER 0 -+#@DEFINE_@ CONFIG_MSMPEG4V1_DECODER 1 -+#@DEFINE_@ CONFIG_MSMPEG4V2_DECODER 1 -+#@DEFINE_@ CONFIG_MSMPEG4V3_DECODER 1 -+#@DEFINE_@ CONFIG_MSRLE_DECODER 1 -+#@DEFINE_@ CONFIG_MSS1_DECODER 1 -+#@DEFINE_@ CONFIG_MSS2_DECODER 1 -+#@DEFINE_@ CONFIG_MSVIDEO1_DECODER 1 -+#@DEFINE_@ CONFIG_MSZH_DECODER 1 -+#@DEFINE_@ CONFIG_MTS2_DECODER 1 -+#@DEFINE_@ CONFIG_MVC1_DECODER 1 -+#@DEFINE_@ CONFIG_MVC2_DECODER 1 -+#@DEFINE_@ CONFIG_MXPEG_DECODER 1 -+#@DEFINE_@ CONFIG_NUV_DECODER 1 -+#@DEFINE_@ CONFIG_PAF_VIDEO_DECODER 1 -+#@DEFINE_@ CONFIG_PAM_DECODER 1 -+#@DEFINE_@ CONFIG_PBM_DECODER 1 -+#@DEFINE_@ CONFIG_PCX_DECODER 1 -+#@DEFINE_@ CONFIG_PGM_DECODER 1 -+#@DEFINE_@ CONFIG_PGMYUV_DECODER 1 -+#@DEFINE_@ CONFIG_PICTOR_DECODER 1 -+#@DEFINE_@ CONFIG_PNG_DECODER 0 -+#@DEFINE_@ CONFIG_PPM_DECODER 1 -+#@DEFINE_@ CONFIG_PRORES_DECODER 1 -+#@DEFINE_@ CONFIG_PRORES_LGPL_DECODER 1 -+#@DEFINE_@ CONFIG_PTX_DECODER 1 -+#@DEFINE_@ CONFIG_QDRAW_DECODER 1 -+#@DEFINE_@ CONFIG_QPEG_DECODER 1 -+#@DEFINE_@ CONFIG_QTRLE_DECODER 1 -+#@DEFINE_@ CONFIG_R10K_DECODER 1 -+#@DEFINE_@ CONFIG_R210_DECODER 1 -+#@DEFINE_@ CONFIG_RAWVIDEO_DECODER 1 -+#@DEFINE_@ CONFIG_RL2_DECODER 1 -+#@DEFINE_@ CONFIG_ROQ_DECODER 1 -+#@DEFINE_@ CONFIG_RPZA_DECODER 1 -+#@DEFINE_@ CONFIG_RV10_DECODER 1 -+#@DEFINE_@ CONFIG_RV20_DECODER 1 -+#@DEFINE_@ CONFIG_RV30_DECODER 1 -+#@DEFINE_@ CONFIG_RV40_DECODER 1 -+#@DEFINE_@ CONFIG_S302M_DECODER 1 -+#@DEFINE_@ CONFIG_SANM_DECODER 1 -+#@DEFINE_@ CONFIG_SGI_DECODER 1 -+#@DEFINE_@ CONFIG_SGIRLE_DECODER 1 -+#@DEFINE_@ CONFIG_SMACKER_DECODER 1 -+#@DEFINE_@ CONFIG_SMC_DECODER 1 -+#@DEFINE_@ CONFIG_SMVJPEG_DECODER 1 -+#@DEFINE_@ CONFIG_SNOW_DECODER 1 -+#@DEFINE_@ CONFIG_SP5X_DECODER 1 -+#@DEFINE_@ CONFIG_SUNRAST_DECODER 1 -+#@DEFINE_@ CONFIG_SVQ1_DECODER 1 -+#@DEFINE_@ CONFIG_SVQ3_DECODER 1 -+#@DEFINE_@ CONFIG_TARGA_DECODER 1 -+#@DEFINE_@ CONFIG_TARGA_Y216_DECODER 1 -+#@DEFINE_@ CONFIG_THEORA_DECODER 1 -+#@DEFINE_@ CONFIG_THP_DECODER 1 -+#@DEFINE_@ CONFIG_TIERTEXSEQVIDEO_DECODER 1 -+#@DEFINE_@ CONFIG_TIFF_DECODER 1 -+#@DEFINE_@ CONFIG_TMV_DECODER 1 -+#@DEFINE_@ CONFIG_TRUEMOTION1_DECODER 1 -+#@DEFINE_@ CONFIG_TRUEMOTION2_DECODER 1 -+#@DEFINE_@ CONFIG_TSCC_DECODER 0 -+#@DEFINE_@ CONFIG_TSCC2_DECODER 1 -+#@DEFINE_@ CONFIG_TXD_DECODER 1 -+#@DEFINE_@ CONFIG_ULTI_DECODER 1 -+#@DEFINE_@ CONFIG_UTVIDEO_DECODER 1 -+#@DEFINE_@ CONFIG_V210_DECODER 1 -+#@DEFINE_@ CONFIG_V210X_DECODER 1 -+#@DEFINE_@ CONFIG_V308_DECODER 1 -+#@DEFINE_@ CONFIG_V408_DECODER 1 -+#@DEFINE_@ CONFIG_V410_DECODER 1 -+#@DEFINE_@ CONFIG_VB_DECODER 1 -+#@DEFINE_@ CONFIG_VBLE_DECODER 1 -+#@DEFINE_@ CONFIG_VC1_DECODER 1 -+#@DEFINE_@ CONFIG_VC1_CRYSTALHD_DECODER 0 -+#@DEFINE_@ CONFIG_VC1_VDPAU_DECODER 0 -+#@DEFINE_@ CONFIG_VC1IMAGE_DECODER 1 -+#@DEFINE_@ CONFIG_VCR1_DECODER 1 -+#@DEFINE_@ CONFIG_VMDVIDEO_DECODER 1 -+#@DEFINE_@ CONFIG_VMNC_DECODER 1 -+#@DEFINE_@ CONFIG_VP3_DECODER 1 -+#@DEFINE_@ CONFIG_VP5_DECODER 1 -+#@DEFINE_@ CONFIG_VP6_DECODER 1 -+#@DEFINE_@ CONFIG_VP6A_DECODER 1 -+#@DEFINE_@ CONFIG_VP6F_DECODER 1 -+#@DEFINE_@ CONFIG_VP7_DECODER 1 -+#@DEFINE_@ CONFIG_VP8_DECODER 1 -+#@DEFINE_@ CONFIG_VP9_DECODER 1 -+#@DEFINE_@ CONFIG_VQA_DECODER 1 -+#@DEFINE_@ CONFIG_WEBP_DECODER 1 -+#@DEFINE_@ CONFIG_WMV1_DECODER 1 -+#@DEFINE_@ CONFIG_WMV2_DECODER 1 -+#@DEFINE_@ CONFIG_WMV3_DECODER 1 -+#@DEFINE_@ CONFIG_WMV3_CRYSTALHD_DECODER 0 -+#@DEFINE_@ CONFIG_WMV3_VDPAU_DECODER 0 -+#@DEFINE_@ CONFIG_WMV3IMAGE_DECODER 1 -+#@DEFINE_@ CONFIG_WNV1_DECODER 1 -+#@DEFINE_@ CONFIG_XAN_WC3_DECODER 1 -+#@DEFINE_@ CONFIG_XAN_WC4_DECODER 1 -+#@DEFINE_@ CONFIG_XBM_DECODER 1 -+#@DEFINE_@ CONFIG_XFACE_DECODER 1 -+#@DEFINE_@ CONFIG_XL_DECODER 1 -+#@DEFINE_@ CONFIG_XWD_DECODER 1 -+#@DEFINE_@ CONFIG_Y41P_DECODER 1 -+#@DEFINE_@ CONFIG_YOP_DECODER 1 -+#@DEFINE_@ CONFIG_YUV4_DECODER 1 -+#@DEFINE_@ CONFIG_ZERO12V_DECODER 1 -+#@DEFINE_@ CONFIG_ZEROCODEC_DECODER 0 -+#@DEFINE_@ CONFIG_ZLIB_DECODER 0 -+#@DEFINE_@ CONFIG_ZMBV_DECODER 0 -+#@DEFINE_@ CONFIG_AAC_DECODER 1 -+#@DEFINE_@ CONFIG_AAC_LATM_DECODER 1 -+#@DEFINE_@ CONFIG_AC3_DECODER 1 -+#@DEFINE_@ CONFIG_AC3_FIXED_DECODER 1 -+#@DEFINE_@ CONFIG_ALAC_DECODER 1 -+#@DEFINE_@ CONFIG_ALS_DECODER 1 -+#@DEFINE_@ CONFIG_AMRNB_DECODER 1 -+#@DEFINE_@ CONFIG_AMRWB_DECODER 1 -+#@DEFINE_@ CONFIG_APE_DECODER 1 -+#@DEFINE_@ CONFIG_ATRAC1_DECODER 1 -+#@DEFINE_@ CONFIG_ATRAC3_DECODER 1 -+#@DEFINE_@ CONFIG_ATRAC3P_DECODER 1 -+#@DEFINE_@ CONFIG_BINKAUDIO_DCT_DECODER 1 -+#@DEFINE_@ CONFIG_BINKAUDIO_RDFT_DECODER 1 -+#@DEFINE_@ CONFIG_BMV_AUDIO_DECODER 1 -+#@DEFINE_@ CONFIG_COOK_DECODER 1 -+#@DEFINE_@ CONFIG_DCA_DECODER 1 -+#@DEFINE_@ CONFIG_DSD_LSBF_DECODER 1 -+#@DEFINE_@ CONFIG_DSD_MSBF_DECODER 1 -+#@DEFINE_@ CONFIG_DSD_LSBF_PLANAR_DECODER 1 -+#@DEFINE_@ CONFIG_DSD_MSBF_PLANAR_DECODER 1 -+#@DEFINE_@ CONFIG_DSICINAUDIO_DECODER 1 -+#@DEFINE_@ CONFIG_DSS_SP_DECODER 1 -+#@DEFINE_@ CONFIG_EAC3_DECODER 1 -+#@DEFINE_@ CONFIG_EVRC_DECODER 1 -+#@DEFINE_@ CONFIG_FFWAVESYNTH_DECODER 1 -+#@DEFINE_@ CONFIG_FLAC_DECODER 1 -+#@DEFINE_@ CONFIG_G723_1_DECODER 1 -+#@DEFINE_@ CONFIG_G729_DECODER 1 -+#@DEFINE_@ CONFIG_GSM_DECODER 1 -+#@DEFINE_@ CONFIG_GSM_MS_DECODER 1 -+#@DEFINE_@ CONFIG_IAC_DECODER 1 -+#@DEFINE_@ CONFIG_IMC_DECODER 1 -+#@DEFINE_@ CONFIG_MACE3_DECODER 1 -+#@DEFINE_@ CONFIG_MACE6_DECODER 1 -+#@DEFINE_@ CONFIG_METASOUND_DECODER 1 -+#@DEFINE_@ CONFIG_MLP_DECODER 1 -+#@DEFINE_@ CONFIG_MP1_DECODER 1 -+#@DEFINE_@ CONFIG_MP1FLOAT_DECODER 1 -+#@DEFINE_@ CONFIG_MP2_DECODER 1 -+#@DEFINE_@ CONFIG_MP2FLOAT_DECODER 1 -+#@DEFINE_@ CONFIG_MP3_DECODER 1 -+#@DEFINE_@ CONFIG_MP3FLOAT_DECODER 1 -+#@DEFINE_@ CONFIG_MP3ADU_DECODER 1 -+#@DEFINE_@ CONFIG_MP3ADUFLOAT_DECODER 1 -+#@DEFINE_@ CONFIG_MP3ON4_DECODER 1 -+#@DEFINE_@ CONFIG_MP3ON4FLOAT_DECODER 1 -+#@DEFINE_@ CONFIG_MPC7_DECODER 1 -+#@DEFINE_@ CONFIG_MPC8_DECODER 1 -+#@DEFINE_@ CONFIG_NELLYMOSER_DECODER 1 -+#@DEFINE_@ CONFIG_ON2AVC_DECODER 1 -+#@DEFINE_@ CONFIG_OPUS_DECODER 1 -+#@DEFINE_@ CONFIG_PAF_AUDIO_DECODER 1 -+#@DEFINE_@ CONFIG_QCELP_DECODER 1 -+#@DEFINE_@ CONFIG_QDM2_DECODER 1 -+#@DEFINE_@ CONFIG_RA_144_DECODER 1 -+#@DEFINE_@ CONFIG_RA_288_DECODER 1 -+#@DEFINE_@ CONFIG_RALF_DECODER 1 -+#@DEFINE_@ CONFIG_SHORTEN_DECODER 1 -+#@DEFINE_@ CONFIG_SIPR_DECODER 1 -+#@DEFINE_@ CONFIG_SMACKAUD_DECODER 1 -+#@DEFINE_@ CONFIG_SONIC_DECODER 1 -+#@DEFINE_@ CONFIG_TAK_DECODER 1 -+#@DEFINE_@ CONFIG_TRUEHD_DECODER 1 -+#@DEFINE_@ CONFIG_TRUESPEECH_DECODER 1 -+#@DEFINE_@ CONFIG_TTA_DECODER 1 -+#@DEFINE_@ CONFIG_TWINVQ_DECODER 1 -+#@DEFINE_@ CONFIG_VMDAUDIO_DECODER 1 -+#@DEFINE_@ CONFIG_VORBIS_DECODER 1 -+#@DEFINE_@ CONFIG_WAVPACK_DECODER 1 -+#@DEFINE_@ CONFIG_WMALOSSLESS_DECODER 1 -+#@DEFINE_@ CONFIG_WMAPRO_DECODER 1 -+#@DEFINE_@ CONFIG_WMAV1_DECODER 1 -+#@DEFINE_@ CONFIG_WMAV2_DECODER 1 -+#@DEFINE_@ CONFIG_WMAVOICE_DECODER 1 -+#@DEFINE_@ CONFIG_WS_SND1_DECODER 1 -+#@DEFINE_@ CONFIG_PCM_ALAW_DECODER 1 -+#@DEFINE_@ CONFIG_PCM_BLURAY_DECODER 1 -+#@DEFINE_@ CONFIG_PCM_DVD_DECODER 1 -+#@DEFINE_@ CONFIG_PCM_F32BE_DECODER 1 -+#@DEFINE_@ CONFIG_PCM_F32LE_DECODER 1 -+#@DEFINE_@ CONFIG_PCM_F64BE_DECODER 1 -+#@DEFINE_@ CONFIG_PCM_F64LE_DECODER 1 -+#@DEFINE_@ CONFIG_PCM_LXF_DECODER 1 -+#@DEFINE_@ CONFIG_PCM_MULAW_DECODER 1 -+#@DEFINE_@ CONFIG_PCM_S8_DECODER 1 -+#@DEFINE_@ CONFIG_PCM_S8_PLANAR_DECODER 1 -+#@DEFINE_@ CONFIG_PCM_S16BE_DECODER 1 -+#@DEFINE_@ CONFIG_PCM_S16BE_PLANAR_DECODER 1 -+#@DEFINE_@ CONFIG_PCM_S16LE_DECODER 1 -+#@DEFINE_@ CONFIG_PCM_S16LE_PLANAR_DECODER 1 -+#@DEFINE_@ CONFIG_PCM_S24BE_DECODER 1 -+#@DEFINE_@ CONFIG_PCM_S24DAUD_DECODER 1 -+#@DEFINE_@ CONFIG_PCM_S24LE_DECODER 1 -+#@DEFINE_@ CONFIG_PCM_S24LE_PLANAR_DECODER 1 -+#@DEFINE_@ CONFIG_PCM_S32BE_DECODER 1 -+#@DEFINE_@ CONFIG_PCM_S32LE_DECODER 1 -+#@DEFINE_@ CONFIG_PCM_S32LE_PLANAR_DECODER 1 -+#@DEFINE_@ CONFIG_PCM_U8_DECODER 1 -+#@DEFINE_@ CONFIG_PCM_U16BE_DECODER 1 -+#@DEFINE_@ CONFIG_PCM_U16LE_DECODER 1 -+#@DEFINE_@ CONFIG_PCM_U24BE_DECODER 1 -+#@DEFINE_@ CONFIG_PCM_U24LE_DECODER 1 -+#@DEFINE_@ CONFIG_PCM_U32BE_DECODER 1 -+#@DEFINE_@ CONFIG_PCM_U32LE_DECODER 1 -+#@DEFINE_@ CONFIG_PCM_ZORK_DECODER 1 -+#@DEFINE_@ CONFIG_INTERPLAY_DPCM_DECODER 1 -+#@DEFINE_@ CONFIG_ROQ_DPCM_DECODER 1 -+#@DEFINE_@ CONFIG_SOL_DPCM_DECODER 1 -+#@DEFINE_@ CONFIG_XAN_DPCM_DECODER 1 -+#@DEFINE_@ CONFIG_ADPCM_4XM_DECODER 1 -+#@DEFINE_@ CONFIG_ADPCM_ADX_DECODER 1 -+#@DEFINE_@ CONFIG_ADPCM_AFC_DECODER 1 -+#@DEFINE_@ CONFIG_ADPCM_CT_DECODER 1 -+#@DEFINE_@ CONFIG_ADPCM_DTK_DECODER 1 -+#@DEFINE_@ CONFIG_ADPCM_EA_DECODER 1 -+#@DEFINE_@ CONFIG_ADPCM_EA_MAXIS_XA_DECODER 1 -+#@DEFINE_@ CONFIG_ADPCM_EA_R1_DECODER 1 -+#@DEFINE_@ CONFIG_ADPCM_EA_R2_DECODER 1 -+#@DEFINE_@ CONFIG_ADPCM_EA_R3_DECODER 1 -+#@DEFINE_@ CONFIG_ADPCM_EA_XAS_DECODER 1 -+#@DEFINE_@ CONFIG_ADPCM_G722_DECODER 1 -+#@DEFINE_@ CONFIG_ADPCM_G726_DECODER 1 -+#@DEFINE_@ CONFIG_ADPCM_G726LE_DECODER 1 -+#@DEFINE_@ CONFIG_ADPCM_IMA_AMV_DECODER 1 -+#@DEFINE_@ CONFIG_ADPCM_IMA_APC_DECODER 1 -+#@DEFINE_@ CONFIG_ADPCM_IMA_DK3_DECODER 1 -+#@DEFINE_@ CONFIG_ADPCM_IMA_DK4_DECODER 1 -+#@DEFINE_@ CONFIG_ADPCM_IMA_EA_EACS_DECODER 1 -+#@DEFINE_@ CONFIG_ADPCM_IMA_EA_SEAD_DECODER 1 -+#@DEFINE_@ CONFIG_ADPCM_IMA_ISS_DECODER 1 -+#@DEFINE_@ CONFIG_ADPCM_IMA_OKI_DECODER 1 -+#@DEFINE_@ CONFIG_ADPCM_IMA_QT_DECODER 1 -+#@DEFINE_@ CONFIG_ADPCM_IMA_RAD_DECODER 1 -+#@DEFINE_@ CONFIG_ADPCM_IMA_SMJPEG_DECODER 1 -+#@DEFINE_@ CONFIG_ADPCM_IMA_WAV_DECODER 1 -+#@DEFINE_@ CONFIG_ADPCM_IMA_WS_DECODER 1 -+#@DEFINE_@ CONFIG_ADPCM_MS_DECODER 1 -+#@DEFINE_@ CONFIG_ADPCM_SBPRO_2_DECODER 1 -+#@DEFINE_@ CONFIG_ADPCM_SBPRO_3_DECODER 1 -+#@DEFINE_@ CONFIG_ADPCM_SBPRO_4_DECODER 1 -+#@DEFINE_@ CONFIG_ADPCM_SWF_DECODER 1 -+#@DEFINE_@ CONFIG_ADPCM_THP_DECODER 1 -+#@DEFINE_@ CONFIG_ADPCM_VIMA_DECODER 1 -+#@DEFINE_@ CONFIG_ADPCM_XA_DECODER 1 -+#@DEFINE_@ CONFIG_ADPCM_YAMAHA_DECODER 1 -+#@DEFINE_@ CONFIG_VIMA_DECODER 1 -+#@DEFINE_@ CONFIG_SSA_DECODER 1 -+#@DEFINE_@ CONFIG_ASS_DECODER 1 -+#@DEFINE_@ CONFIG_CCAPTION_DECODER 1 -+#@DEFINE_@ CONFIG_DVBSUB_DECODER 1 -+#@DEFINE_@ CONFIG_DVDSUB_DECODER 1 -+#@DEFINE_@ CONFIG_JACOSUB_DECODER 1 -+#@DEFINE_@ CONFIG_MICRODVD_DECODER 1 -+#@DEFINE_@ CONFIG_MOVTEXT_DECODER 1 -+#@DEFINE_@ CONFIG_MPL2_DECODER 1 -+#@DEFINE_@ CONFIG_PGSSUB_DECODER 1 -+#@DEFINE_@ CONFIG_PJS_DECODER 1 -+#@DEFINE_@ CONFIG_REALTEXT_DECODER 1 -+#@DEFINE_@ CONFIG_SAMI_DECODER 1 -+#@DEFINE_@ CONFIG_SRT_DECODER 1 -+#@DEFINE_@ CONFIG_STL_DECODER 1 -+#@DEFINE_@ CONFIG_SUBRIP_DECODER 1 -+#@DEFINE_@ CONFIG_SUBVIEWER_DECODER 1 -+#@DEFINE_@ CONFIG_SUBVIEWER1_DECODER 1 -+#@DEFINE_@ CONFIG_TEXT_DECODER 1 -+#@DEFINE_@ CONFIG_VPLAYER_DECODER 1 -+#@DEFINE_@ CONFIG_WEBVTT_DECODER 1 -+#@DEFINE_@ CONFIG_XSUB_DECODER 1 -+#@DEFINE_@ CONFIG_LIBCELT_DECODER 0 -+#@DEFINE_@ CONFIG_LIBFDK_AAC_DECODER 0 -+#@DEFINE_@ CONFIG_LIBGSM_DECODER 0 -+#@DEFINE_@ CONFIG_LIBGSM_MS_DECODER 0 -+#@DEFINE_@ CONFIG_LIBILBC_DECODER 0 -+#@DEFINE_@ CONFIG_LIBOPENCORE_AMRNB_DECODER 0 -+#@DEFINE_@ CONFIG_LIBOPENCORE_AMRWB_DECODER 0 -+#@DEFINE_@ CONFIG_LIBOPENJPEG_DECODER 0 -+#@DEFINE_@ CONFIG_LIBOPUS_DECODER 0 -+#@DEFINE_@ CONFIG_LIBSCHROEDINGER_DECODER 0 -+#@DEFINE_@ CONFIG_LIBSPEEX_DECODER 0 -+#@DEFINE_@ CONFIG_LIBSTAGEFRIGHT_H264_DECODER 0 -+#@DEFINE_@ CONFIG_LIBUTVIDEO_DECODER 0 -+#@DEFINE_@ CONFIG_LIBVORBIS_DECODER 0 -+#@DEFINE_@ CONFIG_LIBVPX_VP8_DECODER 0 -+#@DEFINE_@ CONFIG_LIBVPX_VP9_DECODER 0 -+#@DEFINE_@ CONFIG_LIBZVBI_TELETEXT_DECODER 0 -+#@DEFINE_@ CONFIG_BINTEXT_DECODER 1 -+#@DEFINE_@ CONFIG_XBIN_DECODER 1 -+#@DEFINE_@ CONFIG_IDF_DECODER 1 -+#@DEFINE_@ CONFIG_AAC_DEMUXER 1 -+#@DEFINE_@ CONFIG_AC3_DEMUXER 1 -+#@DEFINE_@ CONFIG_ACT_DEMUXER 1 -+#@DEFINE_@ CONFIG_ADF_DEMUXER 1 -+#@DEFINE_@ CONFIG_ADP_DEMUXER 1 -+#@DEFINE_@ CONFIG_ADX_DEMUXER 1 -+#@DEFINE_@ CONFIG_AEA_DEMUXER 1 -+#@DEFINE_@ CONFIG_AFC_DEMUXER 1 -+#@DEFINE_@ CONFIG_AIFF_DEMUXER 1 -+#@DEFINE_@ CONFIG_AMR_DEMUXER 1 -+#@DEFINE_@ CONFIG_ANM_DEMUXER 1 -+#@DEFINE_@ CONFIG_APC_DEMUXER 1 -+#@DEFINE_@ CONFIG_APE_DEMUXER 1 -+#@DEFINE_@ CONFIG_APNG_DEMUXER 1 -+#@DEFINE_@ CONFIG_AQTITLE_DEMUXER 1 -+#@DEFINE_@ CONFIG_ASF_DEMUXER 1 -+#@DEFINE_@ CONFIG_ASS_DEMUXER 1 -+#@DEFINE_@ CONFIG_AST_DEMUXER 1 -+#@DEFINE_@ CONFIG_AU_DEMUXER 1 -+#@DEFINE_@ CONFIG_AVI_DEMUXER 1 -+#@DEFINE_@ CONFIG_AVISYNTH_DEMUXER 0 -+#@DEFINE_@ CONFIG_AVR_DEMUXER 1 -+#@DEFINE_@ CONFIG_AVS_DEMUXER 1 -+#@DEFINE_@ CONFIG_BETHSOFTVID_DEMUXER 1 -+#@DEFINE_@ CONFIG_BFI_DEMUXER 1 -+#@DEFINE_@ CONFIG_BINTEXT_DEMUXER 1 -+#@DEFINE_@ CONFIG_BINK_DEMUXER 1 -+#@DEFINE_@ CONFIG_BIT_DEMUXER 1 -+#@DEFINE_@ CONFIG_BMV_DEMUXER 1 -+#@DEFINE_@ CONFIG_BRSTM_DEMUXER 1 -+#@DEFINE_@ CONFIG_BOA_DEMUXER 1 -+#@DEFINE_@ CONFIG_C93_DEMUXER 1 -+#@DEFINE_@ CONFIG_CAF_DEMUXER 1 -+#@DEFINE_@ CONFIG_CAVSVIDEO_DEMUXER 1 -+#@DEFINE_@ CONFIG_CDG_DEMUXER 1 -+#@DEFINE_@ CONFIG_CDXL_DEMUXER 1 -+#@DEFINE_@ CONFIG_CINE_DEMUXER 1 -+#@DEFINE_@ CONFIG_CONCAT_DEMUXER 1 -+#@DEFINE_@ CONFIG_DATA_DEMUXER 1 -+#@DEFINE_@ CONFIG_DAUD_DEMUXER 1 -+#@DEFINE_@ CONFIG_DFA_DEMUXER 1 -+#@DEFINE_@ CONFIG_DIRAC_DEMUXER 1 -+#@DEFINE_@ CONFIG_DNXHD_DEMUXER 1 -+#@DEFINE_@ CONFIG_DSF_DEMUXER 1 -+#@DEFINE_@ CONFIG_DSICIN_DEMUXER 1 -+#@DEFINE_@ CONFIG_DSS_DEMUXER 1 -+#@DEFINE_@ CONFIG_DTS_DEMUXER 1 -+#@DEFINE_@ CONFIG_DTSHD_DEMUXER 1 -+#@DEFINE_@ CONFIG_DV_DEMUXER 1 -+#@DEFINE_@ CONFIG_DVBSUB_DEMUXER 1 -+#@DEFINE_@ CONFIG_DXA_DEMUXER 1 -+#@DEFINE_@ CONFIG_EA_DEMUXER 1 -+#@DEFINE_@ CONFIG_EA_CDATA_DEMUXER 1 -+#@DEFINE_@ CONFIG_EAC3_DEMUXER 1 -+#@DEFINE_@ CONFIG_EPAF_DEMUXER 1 -+#@DEFINE_@ CONFIG_FFM_DEMUXER 1 -+#@DEFINE_@ CONFIG_FFMETADATA_DEMUXER 1 -+#@DEFINE_@ CONFIG_FILMSTRIP_DEMUXER 1 -+#@DEFINE_@ CONFIG_FLAC_DEMUXER 1 -+#@DEFINE_@ CONFIG_FLIC_DEMUXER 1 -+#@DEFINE_@ CONFIG_FLV_DEMUXER 1 -+#@DEFINE_@ CONFIG_LIVE_FLV_DEMUXER 1 -+#@DEFINE_@ CONFIG_FOURXM_DEMUXER 1 -+#@DEFINE_@ CONFIG_FRM_DEMUXER 1 -+#@DEFINE_@ CONFIG_G722_DEMUXER 1 -+#@DEFINE_@ CONFIG_G723_1_DEMUXER 1 -+#@DEFINE_@ CONFIG_G729_DEMUXER 1 -+#@DEFINE_@ CONFIG_GIF_DEMUXER 1 -+#@DEFINE_@ CONFIG_GSM_DEMUXER 1 -+#@DEFINE_@ CONFIG_GXF_DEMUXER 1 -+#@DEFINE_@ CONFIG_H261_DEMUXER 1 -+#@DEFINE_@ CONFIG_H263_DEMUXER 1 -+#@DEFINE_@ CONFIG_H264_DEMUXER 1 -+#@DEFINE_@ CONFIG_HEVC_DEMUXER 1 -+#@DEFINE_@ CONFIG_HLS_DEMUXER 1 -+#@DEFINE_@ CONFIG_HNM_DEMUXER 1 -+#@DEFINE_@ CONFIG_ICO_DEMUXER 1 -+#@DEFINE_@ CONFIG_IDCIN_DEMUXER 1 -+#@DEFINE_@ CONFIG_IDF_DEMUXER 1 -+#@DEFINE_@ CONFIG_IFF_DEMUXER 1 -+#@DEFINE_@ CONFIG_ILBC_DEMUXER 1 -+#@DEFINE_@ CONFIG_IMAGE2_DEMUXER 1 -+#@DEFINE_@ CONFIG_IMAGE2PIPE_DEMUXER 1 -+#@DEFINE_@ CONFIG_IMAGE2_ALIAS_PIX_DEMUXER 1 -+#@DEFINE_@ CONFIG_IMAGE2_BRENDER_PIX_DEMUXER 1 -+#@DEFINE_@ CONFIG_INGENIENT_DEMUXER 1 -+#@DEFINE_@ CONFIG_IPMOVIE_DEMUXER 1 -+#@DEFINE_@ CONFIG_IRCAM_DEMUXER 1 -+#@DEFINE_@ CONFIG_ISS_DEMUXER 1 -+#@DEFINE_@ CONFIG_IV8_DEMUXER 1 -+#@DEFINE_@ CONFIG_IVF_DEMUXER 1 -+#@DEFINE_@ CONFIG_JACOSUB_DEMUXER 1 -+#@DEFINE_@ CONFIG_JV_DEMUXER 1 -+#@DEFINE_@ CONFIG_LATM_DEMUXER 1 -+#@DEFINE_@ CONFIG_LMLM4_DEMUXER 1 -+#@DEFINE_@ CONFIG_LOAS_DEMUXER 1 -+#@DEFINE_@ CONFIG_LRC_DEMUXER 1 -+#@DEFINE_@ CONFIG_LVF_DEMUXER 1 -+#@DEFINE_@ CONFIG_LXF_DEMUXER 1 -+#@DEFINE_@ CONFIG_M4V_DEMUXER 1 -+#@DEFINE_@ CONFIG_MATROSKA_DEMUXER 1 -+#@DEFINE_@ CONFIG_MGSTS_DEMUXER 1 -+#@DEFINE_@ CONFIG_MICRODVD_DEMUXER 1 -+#@DEFINE_@ CONFIG_MJPEG_DEMUXER 1 -+#@DEFINE_@ CONFIG_MLP_DEMUXER 1 -+#@DEFINE_@ CONFIG_MLV_DEMUXER 1 -+#@DEFINE_@ CONFIG_MM_DEMUXER 1 -+#@DEFINE_@ CONFIG_MMF_DEMUXER 1 -+#@DEFINE_@ CONFIG_MOV_DEMUXER 1 -+#@DEFINE_@ CONFIG_MP3_DEMUXER 1 -+#@DEFINE_@ CONFIG_MPC_DEMUXER 1 -+#@DEFINE_@ CONFIG_MPC8_DEMUXER 1 -+#@DEFINE_@ CONFIG_MPEGPS_DEMUXER 1 -+#@DEFINE_@ CONFIG_MPEGTS_DEMUXER 1 -+#@DEFINE_@ CONFIG_MPEGTSRAW_DEMUXER 1 -+#@DEFINE_@ CONFIG_MPEGVIDEO_DEMUXER 1 -+#@DEFINE_@ CONFIG_MPL2_DEMUXER 1 -+#@DEFINE_@ CONFIG_MPSUB_DEMUXER 1 -+#@DEFINE_@ CONFIG_MSNWC_TCP_DEMUXER 1 -+#@DEFINE_@ CONFIG_MTV_DEMUXER 1 -+#@DEFINE_@ CONFIG_MV_DEMUXER 1 -+#@DEFINE_@ CONFIG_MVI_DEMUXER 1 -+#@DEFINE_@ CONFIG_MXF_DEMUXER 1 -+#@DEFINE_@ CONFIG_MXG_DEMUXER 1 -+#@DEFINE_@ CONFIG_NC_DEMUXER 1 -+#@DEFINE_@ CONFIG_NISTSPHERE_DEMUXER 1 -+#@DEFINE_@ CONFIG_NSV_DEMUXER 1 -+#@DEFINE_@ CONFIG_NUT_DEMUXER 1 -+#@DEFINE_@ CONFIG_NUV_DEMUXER 1 -+#@DEFINE_@ CONFIG_OGG_DEMUXER 1 -+#@DEFINE_@ CONFIG_OMA_DEMUXER 1 -+#@DEFINE_@ CONFIG_PAF_DEMUXER 1 -+#@DEFINE_@ CONFIG_PCM_ALAW_DEMUXER 1 -+#@DEFINE_@ CONFIG_PCM_MULAW_DEMUXER 1 -+#@DEFINE_@ CONFIG_PCM_F64BE_DEMUXER 1 -+#@DEFINE_@ CONFIG_PCM_F64LE_DEMUXER 1 -+#@DEFINE_@ CONFIG_PCM_F32BE_DEMUXER 1 -+#@DEFINE_@ CONFIG_PCM_F32LE_DEMUXER 1 -+#@DEFINE_@ CONFIG_PCM_S32BE_DEMUXER 1 -+#@DEFINE_@ CONFIG_PCM_S32LE_DEMUXER 1 -+#@DEFINE_@ CONFIG_PCM_S24BE_DEMUXER 1 -+#@DEFINE_@ CONFIG_PCM_S24LE_DEMUXER 1 -+#@DEFINE_@ CONFIG_PCM_S16BE_DEMUXER 1 -+#@DEFINE_@ CONFIG_PCM_S16LE_DEMUXER 1 -+#@DEFINE_@ CONFIG_PCM_S8_DEMUXER 1 -+#@DEFINE_@ CONFIG_PCM_U32BE_DEMUXER 1 -+#@DEFINE_@ CONFIG_PCM_U32LE_DEMUXER 1 -+#@DEFINE_@ CONFIG_PCM_U24BE_DEMUXER 1 -+#@DEFINE_@ CONFIG_PCM_U24LE_DEMUXER 1 -+#@DEFINE_@ CONFIG_PCM_U16BE_DEMUXER 1 -+#@DEFINE_@ CONFIG_PCM_U16LE_DEMUXER 1 -+#@DEFINE_@ CONFIG_PCM_U8_DEMUXER 1 -+#@DEFINE_@ CONFIG_PJS_DEMUXER 1 -+#@DEFINE_@ CONFIG_PMP_DEMUXER 1 -+#@DEFINE_@ CONFIG_PVA_DEMUXER 1 -+#@DEFINE_@ CONFIG_PVF_DEMUXER 1 -+#@DEFINE_@ CONFIG_QCP_DEMUXER 1 -+#@DEFINE_@ CONFIG_R3D_DEMUXER 1 -+#@DEFINE_@ CONFIG_RAWVIDEO_DEMUXER 1 -+#@DEFINE_@ CONFIG_REALTEXT_DEMUXER 1 -+#@DEFINE_@ CONFIG_REDSPARK_DEMUXER 1 -+#@DEFINE_@ CONFIG_RL2_DEMUXER 1 -+#@DEFINE_@ CONFIG_RM_DEMUXER 1 -+#@DEFINE_@ CONFIG_ROQ_DEMUXER 1 -+#@DEFINE_@ CONFIG_RPL_DEMUXER 1 -+#@DEFINE_@ CONFIG_RSD_DEMUXER 1 -+#@DEFINE_@ CONFIG_RSO_DEMUXER 1 -+#@DEFINE_@ CONFIG_RTP_DEMUXER 1 -+#@DEFINE_@ CONFIG_RTSP_DEMUXER 1 -+#@DEFINE_@ CONFIG_SAMI_DEMUXER 1 -+#@DEFINE_@ CONFIG_SAP_DEMUXER 1 -+#@DEFINE_@ CONFIG_SBG_DEMUXER 1 -+#@DEFINE_@ CONFIG_SDP_DEMUXER 1 -+#@DEFINE_@ CONFIG_SDR2_DEMUXER 1 -+#@DEFINE_@ CONFIG_SEGAFILM_DEMUXER 1 -+#@DEFINE_@ CONFIG_SHORTEN_DEMUXER 1 -+#@DEFINE_@ CONFIG_SIFF_DEMUXER 1 -+#@DEFINE_@ CONFIG_SLN_DEMUXER 1 -+#@DEFINE_@ CONFIG_SMACKER_DEMUXER 1 -+#@DEFINE_@ CONFIG_SMJPEG_DEMUXER 1 -+#@DEFINE_@ CONFIG_SMUSH_DEMUXER 1 -+#@DEFINE_@ CONFIG_SOL_DEMUXER 1 -+#@DEFINE_@ CONFIG_SOX_DEMUXER 1 -+#@DEFINE_@ CONFIG_SPDIF_DEMUXER 1 -+#@DEFINE_@ CONFIG_SRT_DEMUXER 1 -+#@DEFINE_@ CONFIG_STR_DEMUXER 1 -+#@DEFINE_@ CONFIG_STL_DEMUXER 1 -+#@DEFINE_@ CONFIG_SUBVIEWER1_DEMUXER 1 -+#@DEFINE_@ CONFIG_SUBVIEWER_DEMUXER 1 -+#@DEFINE_@ CONFIG_SUP_DEMUXER 1 -+#@DEFINE_@ CONFIG_SWF_DEMUXER 1 -+#@DEFINE_@ CONFIG_TAK_DEMUXER 1 -+#@DEFINE_@ CONFIG_TEDCAPTIONS_DEMUXER 1 -+#@DEFINE_@ CONFIG_THP_DEMUXER 1 -+#@DEFINE_@ CONFIG_TIERTEXSEQ_DEMUXER 1 -+#@DEFINE_@ CONFIG_TMV_DEMUXER 1 -+#@DEFINE_@ CONFIG_TRUEHD_DEMUXER 1 -+#@DEFINE_@ CONFIG_TTA_DEMUXER 1 -+#@DEFINE_@ CONFIG_TXD_DEMUXER 1 -+#@DEFINE_@ CONFIG_TTY_DEMUXER 1 -+#@DEFINE_@ CONFIG_VC1_DEMUXER 1 -+#@DEFINE_@ CONFIG_VC1T_DEMUXER 1 -+#@DEFINE_@ CONFIG_VIVO_DEMUXER 1 -+#@DEFINE_@ CONFIG_VMD_DEMUXER 1 -+#@DEFINE_@ CONFIG_VOBSUB_DEMUXER 1 -+#@DEFINE_@ CONFIG_VOC_DEMUXER 1 -+#@DEFINE_@ CONFIG_VPLAYER_DEMUXER 1 -+#@DEFINE_@ CONFIG_VQF_DEMUXER 1 -+#@DEFINE_@ CONFIG_W64_DEMUXER 1 -+#@DEFINE_@ CONFIG_WAV_DEMUXER 1 -+#@DEFINE_@ CONFIG_WC3_DEMUXER 1 -+#@DEFINE_@ CONFIG_WEBM_DASH_MANIFEST_DEMUXER 1 -+#@DEFINE_@ CONFIG_WEBVTT_DEMUXER 1 -+#@DEFINE_@ CONFIG_WSAUD_DEMUXER 1 -+#@DEFINE_@ CONFIG_WSVQA_DEMUXER 1 -+#@DEFINE_@ CONFIG_WTV_DEMUXER 1 -+#@DEFINE_@ CONFIG_WV_DEMUXER 1 -+#@DEFINE_@ CONFIG_XA_DEMUXER 1 -+#@DEFINE_@ CONFIG_XBIN_DEMUXER 1 -+#@DEFINE_@ CONFIG_XMV_DEMUXER 1 -+#@DEFINE_@ CONFIG_XWMA_DEMUXER 1 -+#@DEFINE_@ CONFIG_YOP_DEMUXER 1 -+#@DEFINE_@ CONFIG_YUV4MPEGPIPE_DEMUXER 1 -+#@DEFINE_@ CONFIG_IMAGE_BMP_PIPE_DEMUXER 1 -+#@DEFINE_@ CONFIG_IMAGE_DPX_PIPE_DEMUXER 1 -+#@DEFINE_@ CONFIG_IMAGE_EXR_PIPE_DEMUXER 1 -+#@DEFINE_@ CONFIG_IMAGE_J2K_PIPE_DEMUXER 1 -+#@DEFINE_@ CONFIG_IMAGE_JPEG_PIPE_DEMUXER 1 -+#@DEFINE_@ CONFIG_IMAGE_JPEGLS_PIPE_DEMUXER 1 -+#@DEFINE_@ CONFIG_IMAGE_PICTOR_PIPE_DEMUXER 1 -+#@DEFINE_@ CONFIG_IMAGE_PNG_PIPE_DEMUXER 1 -+#@DEFINE_@ CONFIG_IMAGE_SGI_PIPE_DEMUXER 1 -+#@DEFINE_@ CONFIG_IMAGE_SUNRAST_PIPE_DEMUXER 1 -+#@DEFINE_@ CONFIG_IMAGE_TIFF_PIPE_DEMUXER 1 -+#@DEFINE_@ CONFIG_IMAGE_WEBP_PIPE_DEMUXER 1 -+#@DEFINE_@ CONFIG_LIBGME_DEMUXER 0 -+#@DEFINE_@ CONFIG_LIBMODPLUG_DEMUXER 0 -+#@DEFINE_@ CONFIG_LIBNUT_DEMUXER 0 -+#@DEFINE_@ CONFIG_LIBQUVI_DEMUXER 0 -+#@DEFINE_@ CONFIG_A64MULTI_ENCODER 1 -+#@DEFINE_@ CONFIG_A64MULTI5_ENCODER 1 -+#@DEFINE_@ CONFIG_ALIAS_PIX_ENCODER 1 -+#@DEFINE_@ CONFIG_AMV_ENCODER 1 -+#@DEFINE_@ CONFIG_ASV1_ENCODER 1 -+#@DEFINE_@ CONFIG_ASV2_ENCODER 1 -+#@DEFINE_@ CONFIG_AVRP_ENCODER 1 -+#@DEFINE_@ CONFIG_AVUI_ENCODER 1 -+#@DEFINE_@ CONFIG_AYUV_ENCODER 1 -+#@DEFINE_@ CONFIG_BMP_ENCODER 1 -+#@DEFINE_@ CONFIG_CINEPAK_ENCODER 1 -+#@DEFINE_@ CONFIG_CLJR_ENCODER 1 -+#@DEFINE_@ CONFIG_COMFORTNOISE_ENCODER 1 -+#@DEFINE_@ CONFIG_DNXHD_ENCODER 1 -+#@DEFINE_@ CONFIG_DPX_ENCODER 1 -+#@DEFINE_@ CONFIG_DVVIDEO_ENCODER 1 -+#@DEFINE_@ CONFIG_FFV1_ENCODER 1 -+#@DEFINE_@ CONFIG_FFVHUFF_ENCODER 1 -+#@DEFINE_@ CONFIG_FLASHSV_ENCODER 0 -+#@DEFINE_@ CONFIG_FLASHSV2_ENCODER 0 -+#@DEFINE_@ CONFIG_FLV_ENCODER 1 -+#@DEFINE_@ CONFIG_GIF_ENCODER 1 -+#@DEFINE_@ CONFIG_H261_ENCODER 1 -+#@DEFINE_@ CONFIG_H263_ENCODER 1 -+#@DEFINE_@ CONFIG_H263P_ENCODER 1 -+#@DEFINE_@ CONFIG_HUFFYUV_ENCODER 1 -+#@DEFINE_@ CONFIG_JPEG2000_ENCODER 1 -+#@DEFINE_@ CONFIG_JPEGLS_ENCODER 1 -+#@DEFINE_@ CONFIG_LJPEG_ENCODER 1 -+#@DEFINE_@ CONFIG_MJPEG_ENCODER 1 -+#@DEFINE_@ CONFIG_MPEG1VIDEO_ENCODER 1 -+#@DEFINE_@ CONFIG_MPEG2VIDEO_ENCODER 1 -+#@DEFINE_@ CONFIG_MPEG4_ENCODER 1 -+#@DEFINE_@ CONFIG_MSMPEG4V2_ENCODER 1 -+#@DEFINE_@ CONFIG_MSMPEG4V3_ENCODER 1 -+#@DEFINE_@ CONFIG_MSVIDEO1_ENCODER 1 -+#@DEFINE_@ CONFIG_NVENC_ENCODER 0 -+#@DEFINE_@ CONFIG_PAM_ENCODER 1 -+#@DEFINE_@ CONFIG_PBM_ENCODER 1 -+#@DEFINE_@ CONFIG_PCX_ENCODER 1 -+#@DEFINE_@ CONFIG_PGM_ENCODER 1 -+#@DEFINE_@ CONFIG_PGMYUV_ENCODER 1 -+#@DEFINE_@ CONFIG_PNG_ENCODER 0 -+#@DEFINE_@ CONFIG_PPM_ENCODER 1 -+#@DEFINE_@ CONFIG_PRORES_ENCODER 1 -+#@DEFINE_@ CONFIG_PRORES_AW_ENCODER 1 -+#@DEFINE_@ CONFIG_PRORES_KS_ENCODER 1 -+#@DEFINE_@ CONFIG_QTRLE_ENCODER 1 -+#@DEFINE_@ CONFIG_R10K_ENCODER 1 -+#@DEFINE_@ CONFIG_R210_ENCODER 1 -+#@DEFINE_@ CONFIG_RAWVIDEO_ENCODER 1 -+#@DEFINE_@ CONFIG_ROQ_ENCODER 1 -+#@DEFINE_@ CONFIG_RV10_ENCODER 1 -+#@DEFINE_@ CONFIG_RV20_ENCODER 1 -+#@DEFINE_@ CONFIG_S302M_ENCODER 1 -+#@DEFINE_@ CONFIG_SGI_ENCODER 1 -+#@DEFINE_@ CONFIG_SNOW_ENCODER 1 -+#@DEFINE_@ CONFIG_SUNRAST_ENCODER 1 -+#@DEFINE_@ CONFIG_SVQ1_ENCODER 1 -+#@DEFINE_@ CONFIG_TARGA_ENCODER 1 -+#@DEFINE_@ CONFIG_TIFF_ENCODER 1 -+#@DEFINE_@ CONFIG_UTVIDEO_ENCODER 1 -+#@DEFINE_@ CONFIG_V210_ENCODER 1 -+#@DEFINE_@ CONFIG_V308_ENCODER 1 -+#@DEFINE_@ CONFIG_V408_ENCODER 1 -+#@DEFINE_@ CONFIG_V410_ENCODER 1 -+#@DEFINE_@ CONFIG_WMV1_ENCODER 1 -+#@DEFINE_@ CONFIG_WMV2_ENCODER 1 -+#@DEFINE_@ CONFIG_XBM_ENCODER 1 -+#@DEFINE_@ CONFIG_XFACE_ENCODER 1 -+#@DEFINE_@ CONFIG_XWD_ENCODER 1 -+#@DEFINE_@ CONFIG_Y41P_ENCODER 1 -+#@DEFINE_@ CONFIG_YUV4_ENCODER 1 -+#@DEFINE_@ CONFIG_ZLIB_ENCODER 0 -+#@DEFINE_@ CONFIG_ZMBV_ENCODER 0 -+#@DEFINE_@ CONFIG_AAC_ENCODER 1 -+#@DEFINE_@ CONFIG_AC3_ENCODER 1 -+#@DEFINE_@ CONFIG_AC3_FIXED_ENCODER 1 -+#@DEFINE_@ CONFIG_ALAC_ENCODER 1 -+#@DEFINE_@ CONFIG_DCA_ENCODER 1 -+#@DEFINE_@ CONFIG_EAC3_ENCODER 1 -+#@DEFINE_@ CONFIG_FLAC_ENCODER 1 -+#@DEFINE_@ CONFIG_G723_1_ENCODER 1 -+#@DEFINE_@ CONFIG_MP2_ENCODER 1 -+#@DEFINE_@ CONFIG_MP2FIXED_ENCODER 1 -+#@DEFINE_@ CONFIG_NELLYMOSER_ENCODER 1 -+#@DEFINE_@ CONFIG_RA_144_ENCODER 1 -+#@DEFINE_@ CONFIG_SONIC_ENCODER 1 -+#@DEFINE_@ CONFIG_SONIC_LS_ENCODER 1 -+#@DEFINE_@ CONFIG_TTA_ENCODER 1 -+#@DEFINE_@ CONFIG_VORBIS_ENCODER 1 -+#@DEFINE_@ CONFIG_WAVPACK_ENCODER 1 -+#@DEFINE_@ CONFIG_WMAV1_ENCODER 1 -+#@DEFINE_@ CONFIG_WMAV2_ENCODER 1 -+#@DEFINE_@ CONFIG_PCM_ALAW_ENCODER 1 -+#@DEFINE_@ CONFIG_PCM_F32BE_ENCODER 1 -+#@DEFINE_@ CONFIG_PCM_F32LE_ENCODER 1 -+#@DEFINE_@ CONFIG_PCM_F64BE_ENCODER 1 -+#@DEFINE_@ CONFIG_PCM_F64LE_ENCODER 1 -+#@DEFINE_@ CONFIG_PCM_MULAW_ENCODER 1 -+#@DEFINE_@ CONFIG_PCM_S8_ENCODER 1 -+#@DEFINE_@ CONFIG_PCM_S8_PLANAR_ENCODER 1 -+#@DEFINE_@ CONFIG_PCM_S16BE_ENCODER 1 -+#@DEFINE_@ CONFIG_PCM_S16BE_PLANAR_ENCODER 1 -+#@DEFINE_@ CONFIG_PCM_S16LE_ENCODER 1 -+#@DEFINE_@ CONFIG_PCM_S16LE_PLANAR_ENCODER 1 -+#@DEFINE_@ CONFIG_PCM_S24BE_ENCODER 1 -+#@DEFINE_@ CONFIG_PCM_S24DAUD_ENCODER 1 -+#@DEFINE_@ CONFIG_PCM_S24LE_ENCODER 1 -+#@DEFINE_@ CONFIG_PCM_S24LE_PLANAR_ENCODER 1 -+#@DEFINE_@ CONFIG_PCM_S32BE_ENCODER 1 -+#@DEFINE_@ CONFIG_PCM_S32LE_ENCODER 1 -+#@DEFINE_@ CONFIG_PCM_S32LE_PLANAR_ENCODER 1 -+#@DEFINE_@ CONFIG_PCM_U8_ENCODER 1 -+#@DEFINE_@ CONFIG_PCM_U16BE_ENCODER 1 -+#@DEFINE_@ CONFIG_PCM_U16LE_ENCODER 1 -+#@DEFINE_@ CONFIG_PCM_U24BE_ENCODER 1 -+#@DEFINE_@ CONFIG_PCM_U24LE_ENCODER 1 -+#@DEFINE_@ CONFIG_PCM_U32BE_ENCODER 1 -+#@DEFINE_@ CONFIG_PCM_U32LE_ENCODER 1 -+#@DEFINE_@ CONFIG_ROQ_DPCM_ENCODER 1 -+#@DEFINE_@ CONFIG_ADPCM_ADX_ENCODER 1 -+#@DEFINE_@ CONFIG_ADPCM_G722_ENCODER 1 -+#@DEFINE_@ CONFIG_ADPCM_G726_ENCODER 1 -+#@DEFINE_@ CONFIG_ADPCM_IMA_QT_ENCODER 1 -+#@DEFINE_@ CONFIG_ADPCM_IMA_WAV_ENCODER 1 -+#@DEFINE_@ CONFIG_ADPCM_MS_ENCODER 1 -+#@DEFINE_@ CONFIG_ADPCM_SWF_ENCODER 1 -+#@DEFINE_@ CONFIG_ADPCM_YAMAHA_ENCODER 1 -+#@DEFINE_@ CONFIG_SSA_ENCODER 1 -+#@DEFINE_@ CONFIG_ASS_ENCODER 1 -+#@DEFINE_@ CONFIG_DVBSUB_ENCODER 1 -+#@DEFINE_@ CONFIG_DVDSUB_ENCODER 1 -+#@DEFINE_@ CONFIG_MOVTEXT_ENCODER 1 -+#@DEFINE_@ CONFIG_SRT_ENCODER 1 -+#@DEFINE_@ CONFIG_SUBRIP_ENCODER 1 -+#@DEFINE_@ CONFIG_WEBVTT_ENCODER 1 -+#@DEFINE_@ CONFIG_XSUB_ENCODER 1 -+#@DEFINE_@ CONFIG_LIBFAAC_ENCODER 0 -+#@DEFINE_@ CONFIG_LIBFDK_AAC_ENCODER 0 -+#@DEFINE_@ CONFIG_LIBGSM_ENCODER 0 -+#@DEFINE_@ CONFIG_LIBGSM_MS_ENCODER 0 -+#@DEFINE_@ CONFIG_LIBILBC_ENCODER 0 -+#@DEFINE_@ CONFIG_LIBMP3LAME_ENCODER 0 -+#@DEFINE_@ CONFIG_LIBOPENCORE_AMRNB_ENCODER 0 -+#@DEFINE_@ CONFIG_LIBOPENJPEG_ENCODER 0 -+#@DEFINE_@ CONFIG_LIBOPUS_ENCODER 0 -+#@DEFINE_@ CONFIG_LIBSCHROEDINGER_ENCODER 0 -+#@DEFINE_@ CONFIG_LIBSHINE_ENCODER 0 -+#@DEFINE_@ CONFIG_LIBSPEEX_ENCODER 0 -+#@DEFINE_@ CONFIG_LIBTHEORA_ENCODER 0 -+#@DEFINE_@ CONFIG_LIBTWOLAME_ENCODER 0 -+#@DEFINE_@ CONFIG_LIBUTVIDEO_ENCODER 0 -+#@DEFINE_@ CONFIG_LIBVO_AACENC_ENCODER 0 -+#@DEFINE_@ CONFIG_LIBVO_AMRWBENC_ENCODER 0 -+#@DEFINE_@ CONFIG_LIBVORBIS_ENCODER 0 -+#@DEFINE_@ CONFIG_LIBVPX_VP8_ENCODER 0 -+#@DEFINE_@ CONFIG_LIBVPX_VP9_ENCODER 0 -+#@DEFINE_@ CONFIG_LIBWAVPACK_ENCODER 0 -+#@DEFINE_@ CONFIG_LIBWEBP_ENCODER 0 -+#@DEFINE_@ CONFIG_LIBX264_ENCODER 0 -+#@DEFINE_@ CONFIG_LIBX264RGB_ENCODER 0 -+#@DEFINE_@ CONFIG_LIBX265_ENCODER 0 -+#@DEFINE_@ CONFIG_LIBXAVS_ENCODER 0 -+#@DEFINE_@ CONFIG_LIBXVID_ENCODER 0 -+#@DEFINE_@ CONFIG_LIBAACPLUS_ENCODER 0 -+#@DEFINE_@ CONFIG_LIBOPENH264_ENCODER 1 -+#@DEFINE_@ CONFIG_ADELAY_FILTER 1 -+#@DEFINE_@ CONFIG_AECHO_FILTER 1 -+#@DEFINE_@ CONFIG_AEVAL_FILTER 1 -+#@DEFINE_@ CONFIG_AFADE_FILTER 1 -+#@DEFINE_@ CONFIG_AFORMAT_FILTER 1 -+#@DEFINE_@ CONFIG_AINTERLEAVE_FILTER 1 -+#@DEFINE_@ CONFIG_ALLPASS_FILTER 1 -+#@DEFINE_@ CONFIG_AMERGE_FILTER 1 -+#@DEFINE_@ CONFIG_AMIX_FILTER 1 -+#@DEFINE_@ CONFIG_ANULL_FILTER 1 -+#@DEFINE_@ CONFIG_APAD_FILTER 1 -+#@DEFINE_@ CONFIG_APERMS_FILTER 1 -+#@DEFINE_@ CONFIG_APHASER_FILTER 1 -+#@DEFINE_@ CONFIG_ARESAMPLE_FILTER 1 -+#@DEFINE_@ CONFIG_ASELECT_FILTER 1 -+#@DEFINE_@ CONFIG_ASENDCMD_FILTER 1 -+#@DEFINE_@ CONFIG_ASETNSAMPLES_FILTER 1 -+#@DEFINE_@ CONFIG_ASETPTS_FILTER 1 -+#@DEFINE_@ CONFIG_ASETRATE_FILTER 1 -+#@DEFINE_@ CONFIG_ASETTB_FILTER 1 -+#@DEFINE_@ CONFIG_ASHOWINFO_FILTER 1 -+#@DEFINE_@ CONFIG_ASPLIT_FILTER 1 -+#@DEFINE_@ CONFIG_ASTATS_FILTER 1 -+#@DEFINE_@ CONFIG_ASTREAMSYNC_FILTER 1 -+#@DEFINE_@ CONFIG_ASYNCTS_FILTER 0 -+#@DEFINE_@ CONFIG_ATEMPO_FILTER 1 -+#@DEFINE_@ CONFIG_ATRIM_FILTER 1 -+#@DEFINE_@ CONFIG_AZMQ_FILTER 0 -+#@DEFINE_@ CONFIG_BANDPASS_FILTER 1 -+#@DEFINE_@ CONFIG_BANDREJECT_FILTER 1 -+#@DEFINE_@ CONFIG_BASS_FILTER 1 -+#@DEFINE_@ CONFIG_BIQUAD_FILTER 1 -+#@DEFINE_@ CONFIG_BS2B_FILTER 0 -+#@DEFINE_@ CONFIG_CHANNELMAP_FILTER 1 -+#@DEFINE_@ CONFIG_CHANNELSPLIT_FILTER 1 -+#@DEFINE_@ CONFIG_COMPAND_FILTER 1 -+#@DEFINE_@ CONFIG_DCSHIFT_FILTER 1 -+#@DEFINE_@ CONFIG_EARWAX_FILTER 1 -+#@DEFINE_@ CONFIG_EBUR128_FILTER 0 -+#@DEFINE_@ CONFIG_EQUALIZER_FILTER 1 -+#@DEFINE_@ CONFIG_FLANGER_FILTER 1 -+#@DEFINE_@ CONFIG_HIGHPASS_FILTER 1 -+#@DEFINE_@ CONFIG_JOIN_FILTER 1 -+#@DEFINE_@ CONFIG_LADSPA_FILTER 0 -+#@DEFINE_@ CONFIG_LOWPASS_FILTER 1 -+#@DEFINE_@ CONFIG_PAN_FILTER 1 -+#@DEFINE_@ CONFIG_REPLAYGAIN_FILTER 1 -+#@DEFINE_@ CONFIG_RESAMPLE_FILTER 0 -+#@DEFINE_@ CONFIG_SILENCEDETECT_FILTER 1 -+#@DEFINE_@ CONFIG_SILENCEREMOVE_FILTER 1 -+#@DEFINE_@ CONFIG_TREBLE_FILTER 1 -+#@DEFINE_@ CONFIG_VOLUME_FILTER 1 -+#@DEFINE_@ CONFIG_VOLUMEDETECT_FILTER 1 -+#@DEFINE_@ CONFIG_AEVALSRC_FILTER 1 -+#@DEFINE_@ CONFIG_ANULLSRC_FILTER 1 -+#@DEFINE_@ CONFIG_FLITE_FILTER 0 -+#@DEFINE_@ CONFIG_SINE_FILTER 1 -+#@DEFINE_@ CONFIG_ANULLSINK_FILTER 1 -+#@DEFINE_@ CONFIG_ALPHAEXTRACT_FILTER 1 -+#@DEFINE_@ CONFIG_ALPHAMERGE_FILTER 1 -+#@DEFINE_@ CONFIG_ASS_FILTER 0 -+#@DEFINE_@ CONFIG_BBOX_FILTER 1 -+#@DEFINE_@ CONFIG_BLACKDETECT_FILTER 1 -+#@DEFINE_@ CONFIG_BLACKFRAME_FILTER 0 -+#@DEFINE_@ CONFIG_BLEND_FILTER 1 -+#@DEFINE_@ CONFIG_BOXBLUR_FILTER 0 -+#@DEFINE_@ CONFIG_CODECVIEW_FILTER 1 -+#@DEFINE_@ CONFIG_COLORBALANCE_FILTER 1 -+#@DEFINE_@ CONFIG_COLORCHANNELMIXER_FILTER 1 -+#@DEFINE_@ CONFIG_COLORLEVELS_FILTER 1 -+#@DEFINE_@ CONFIG_COLORMATRIX_FILTER 0 -+#@DEFINE_@ CONFIG_COPY_FILTER 1 -+#@DEFINE_@ CONFIG_CROP_FILTER 1 -+#@DEFINE_@ CONFIG_CROPDETECT_FILTER 0 -+#@DEFINE_@ CONFIG_CURVES_FILTER 1 -+#@DEFINE_@ CONFIG_DCTDNOIZ_FILTER 1 -+#@DEFINE_@ CONFIG_DECIMATE_FILTER 1 -+#@DEFINE_@ CONFIG_DEJUDDER_FILTER 1 -+#@DEFINE_@ CONFIG_DELOGO_FILTER 0 -+#@DEFINE_@ CONFIG_DESHAKE_FILTER 1 -+#@DEFINE_@ CONFIG_DRAWBOX_FILTER 1 -+#@DEFINE_@ CONFIG_DRAWGRID_FILTER 1 -+#@DEFINE_@ CONFIG_DRAWTEXT_FILTER 0 -+#@DEFINE_@ CONFIG_EDGEDETECT_FILTER 1 -+#@DEFINE_@ CONFIG_ELBG_FILTER 1 -+#@DEFINE_@ CONFIG_EQ_FILTER 0 -+#@DEFINE_@ CONFIG_EXTRACTPLANES_FILTER 1 -+#@DEFINE_@ CONFIG_FADE_FILTER 1 -+#@DEFINE_@ CONFIG_FIELD_FILTER 1 -+#@DEFINE_@ CONFIG_FIELDMATCH_FILTER 1 -+#@DEFINE_@ CONFIG_FIELDORDER_FILTER 1 -+#@DEFINE_@ CONFIG_FORMAT_FILTER 1 -+#@DEFINE_@ CONFIG_FPS_FILTER 1 -+#@DEFINE_@ CONFIG_FRAMEPACK_FILTER 1 -+#@DEFINE_@ CONFIG_FRAMESTEP_FILTER 1 -+#@DEFINE_@ CONFIG_FREI0R_FILTER 0 -+#@DEFINE_@ CONFIG_FSPP_FILTER 0 -+#@DEFINE_@ CONFIG_GEQ_FILTER 0 -+#@DEFINE_@ CONFIG_GRADFUN_FILTER 1 -+#@DEFINE_@ CONFIG_HALDCLUT_FILTER 1 -+#@DEFINE_@ CONFIG_HFLIP_FILTER 1 -+#@DEFINE_@ CONFIG_HISTEQ_FILTER 0 -+#@DEFINE_@ CONFIG_HISTOGRAM_FILTER 1 -+#@DEFINE_@ CONFIG_HQDN3D_FILTER 0 -+#@DEFINE_@ CONFIG_HQX_FILTER 1 -+#@DEFINE_@ CONFIG_HUE_FILTER 1 -+#@DEFINE_@ CONFIG_IDET_FILTER 1 -+#@DEFINE_@ CONFIG_IL_FILTER 1 -+#@DEFINE_@ CONFIG_INTERLACE_FILTER 0 -+#@DEFINE_@ CONFIG_INTERLEAVE_FILTER 1 -+#@DEFINE_@ CONFIG_KERNDEINT_FILTER 0 -+#@DEFINE_@ CONFIG_LENSCORRECTION_FILTER 1 -+#@DEFINE_@ CONFIG_LUT3D_FILTER 1 -+#@DEFINE_@ CONFIG_LUT_FILTER 1 -+#@DEFINE_@ CONFIG_LUTRGB_FILTER 1 -+#@DEFINE_@ CONFIG_LUTYUV_FILTER 1 -+#@DEFINE_@ CONFIG_MCDEINT_FILTER 0 -+#@DEFINE_@ CONFIG_MERGEPLANES_FILTER 1 -+#@DEFINE_@ CONFIG_MPDECIMATE_FILTER 0 -+#@DEFINE_@ CONFIG_NEGATE_FILTER 1 -+#@DEFINE_@ CONFIG_NOFORMAT_FILTER 1 -+#@DEFINE_@ CONFIG_NOISE_FILTER 1 -+#@DEFINE_@ CONFIG_NULL_FILTER 1 -+#@DEFINE_@ CONFIG_OCV_FILTER 0 -+#@DEFINE_@ CONFIG_OVERLAY_FILTER 1 -+#@DEFINE_@ CONFIG_OWDENOISE_FILTER 0 -+#@DEFINE_@ CONFIG_PAD_FILTER 1 -+#@DEFINE_@ CONFIG_PALETTEGEN_FILTER 1 -+#@DEFINE_@ CONFIG_PALETTEUSE_FILTER 1 -+#@DEFINE_@ CONFIG_PERMS_FILTER 1 -+#@DEFINE_@ CONFIG_PERSPECTIVE_FILTER 0 -+#@DEFINE_@ CONFIG_PHASE_FILTER 0 -+#@DEFINE_@ CONFIG_PIXDESCTEST_FILTER 1 -+#@DEFINE_@ CONFIG_PP_FILTER 0 -+#@DEFINE_@ CONFIG_PP7_FILTER 0 -+#@DEFINE_@ CONFIG_PSNR_FILTER 1 -+#@DEFINE_@ CONFIG_PULLUP_FILTER 0 -+#@DEFINE_@ CONFIG_QP_FILTER 1 -+#@DEFINE_@ CONFIG_REMOVELOGO_FILTER 1 -+#@DEFINE_@ CONFIG_REPEATFIELDS_FILTER 0 -+#@DEFINE_@ CONFIG_ROTATE_FILTER 1 -+#@DEFINE_@ CONFIG_SAB_FILTER 0 -+#@DEFINE_@ CONFIG_SCALE_FILTER 1 -+#@DEFINE_@ CONFIG_SELECT_FILTER 1 -+#@DEFINE_@ CONFIG_SENDCMD_FILTER 1 -+#@DEFINE_@ CONFIG_SEPARATEFIELDS_FILTER 1 -+#@DEFINE_@ CONFIG_SETDAR_FILTER 1 -+#@DEFINE_@ CONFIG_SETFIELD_FILTER 1 -+#@DEFINE_@ CONFIG_SETPTS_FILTER 1 -+#@DEFINE_@ CONFIG_SETSAR_FILTER 1 -+#@DEFINE_@ CONFIG_SETTB_FILTER 1 -+#@DEFINE_@ CONFIG_SHOWINFO_FILTER 1 -+#@DEFINE_@ CONFIG_SHOWPALETTE_FILTER 1 -+#@DEFINE_@ CONFIG_SHUFFLEPLANES_FILTER 1 -+#@DEFINE_@ CONFIG_SIGNALSTATS_FILTER 1 -+#@DEFINE_@ CONFIG_SMARTBLUR_FILTER 0 -+#@DEFINE_@ CONFIG_SPLIT_FILTER 1 -+#@DEFINE_@ CONFIG_SPP_FILTER 0 -+#@DEFINE_@ CONFIG_STEREO3D_FILTER 0 -+#@DEFINE_@ CONFIG_SUBTITLES_FILTER 0 -+#@DEFINE_@ CONFIG_SUPER2XSAI_FILTER 0 -+#@DEFINE_@ CONFIG_SWAPUV_FILTER 1 -+#@DEFINE_@ CONFIG_TBLEND_FILTER 1 -+#@DEFINE_@ CONFIG_TELECINE_FILTER 1 -+#@DEFINE_@ CONFIG_THUMBNAIL_FILTER 1 -+#@DEFINE_@ CONFIG_TILE_FILTER 1 -+#@DEFINE_@ CONFIG_TINTERLACE_FILTER 0 -+#@DEFINE_@ CONFIG_TRANSPOSE_FILTER 1 -+#@DEFINE_@ CONFIG_TRIM_FILTER 1 -+#@DEFINE_@ CONFIG_UNSHARP_FILTER 1 -+#@DEFINE_@ CONFIG_USPP_FILTER 0 -+#@DEFINE_@ CONFIG_VFLIP_FILTER 1 -+#@DEFINE_@ CONFIG_VIDSTABDETECT_FILTER 0 -+#@DEFINE_@ CONFIG_VIDSTABTRANSFORM_FILTER 0 -+#@DEFINE_@ CONFIG_VIGNETTE_FILTER 1 -+#@DEFINE_@ CONFIG_W3FDIF_FILTER 1 -+#@DEFINE_@ CONFIG_XBR_FILTER 1 -+#@DEFINE_@ CONFIG_YADIF_FILTER 1 -+#@DEFINE_@ CONFIG_ZMQ_FILTER 0 -+#@DEFINE_@ CONFIG_ZOOMPAN_FILTER 1 -+#@DEFINE_@ CONFIG_CELLAUTO_FILTER 1 -+#@DEFINE_@ CONFIG_COLOR_FILTER 1 -+#@DEFINE_@ CONFIG_FREI0R_SRC_FILTER 0 -+#@DEFINE_@ CONFIG_HALDCLUTSRC_FILTER 1 -+#@DEFINE_@ CONFIG_LIFE_FILTER 1 -+#@DEFINE_@ CONFIG_MANDELBROT_FILTER 1 -+#@DEFINE_@ CONFIG_MPTESTSRC_FILTER 0 -+#@DEFINE_@ CONFIG_NULLSRC_FILTER 1 -+#@DEFINE_@ CONFIG_RGBTESTSRC_FILTER 1 -+#@DEFINE_@ CONFIG_SMPTEBARS_FILTER 1 -+#@DEFINE_@ CONFIG_SMPTEHDBARS_FILTER 1 -+#@DEFINE_@ CONFIG_TESTSRC_FILTER 1 -+#@DEFINE_@ CONFIG_NULLSINK_FILTER 1 -+#@DEFINE_@ CONFIG_AVECTORSCOPE_FILTER 1 -+#@DEFINE_@ CONFIG_CONCAT_FILTER 1 -+#@DEFINE_@ CONFIG_SHOWCQT_FILTER 1 -+#@DEFINE_@ CONFIG_SHOWSPECTRUM_FILTER 1 -+#@DEFINE_@ CONFIG_SHOWWAVES_FILTER 1 -+#@DEFINE_@ CONFIG_AMOVIE_FILTER 1 -+#@DEFINE_@ CONFIG_MOVIE_FILTER 1 -+#@DEFINE_@ CONFIG_H263_VAAPI_HWACCEL 0 -+#@DEFINE_@ CONFIG_H263_VDPAU_HWACCEL 0 -+#@DEFINE_@ CONFIG_H264_DXVA2_HWACCEL 0 -+#@DEFINE_@ CONFIG_H264_QSV_HWACCEL 0 -+#@DEFINE_@ CONFIG_H264_VAAPI_HWACCEL 0 -+#@DEFINE_@ CONFIG_H264_VDA_HWACCEL 0 -+#@DEFINE_@ CONFIG_H264_VDA_OLD_HWACCEL 0 -+#@DEFINE_@ CONFIG_H264_VDPAU_HWACCEL 0 -+#@DEFINE_@ CONFIG_HEVC_DXVA2_HWACCEL 0 -+#@DEFINE_@ CONFIG_MPEG1_XVMC_HWACCEL 0 -+#@DEFINE_@ CONFIG_MPEG1_VDPAU_HWACCEL 0 -+#@DEFINE_@ CONFIG_MPEG2_XVMC_HWACCEL 0 -+#@DEFINE_@ CONFIG_MPEG2_DXVA2_HWACCEL 0 -+#@DEFINE_@ CONFIG_MPEG2_VAAPI_HWACCEL 0 -+#@DEFINE_@ CONFIG_MPEG2_VDPAU_HWACCEL 0 -+#@DEFINE_@ CONFIG_MPEG4_VAAPI_HWACCEL 0 -+#@DEFINE_@ CONFIG_MPEG4_VDPAU_HWACCEL 0 -+#@DEFINE_@ CONFIG_VC1_DXVA2_HWACCEL 0 -+#@DEFINE_@ CONFIG_VC1_VAAPI_HWACCEL 0 -+#@DEFINE_@ CONFIG_VC1_VDPAU_HWACCEL 0 -+#@DEFINE_@ CONFIG_WMV3_DXVA2_HWACCEL 0 -+#@DEFINE_@ CONFIG_WMV3_VAAPI_HWACCEL 0 -+#@DEFINE_@ CONFIG_WMV3_VDPAU_HWACCEL 0 -+#@DEFINE_@ CONFIG_ALSA_INDEV 0 -+#@DEFINE_@ CONFIG_AVFOUNDATION_INDEV 0 -+#@DEFINE_@ CONFIG_BKTR_INDEV 0 -+#@DEFINE_@ CONFIG_DECKLINK_INDEV 0 -+#@DEFINE_@ CONFIG_DSHOW_INDEV 0 -+#@DEFINE_@ CONFIG_DV1394_INDEV 1 -+#@DEFINE_@ CONFIG_FBDEV_INDEV 1 -+#@DEFINE_@ CONFIG_GDIGRAB_INDEV 0 -+#@DEFINE_@ CONFIG_IEC61883_INDEV 0 -+#@DEFINE_@ CONFIG_JACK_INDEV 0 -+#@DEFINE_@ CONFIG_LAVFI_INDEV 1 -+#@DEFINE_@ CONFIG_OPENAL_INDEV 0 -+#@DEFINE_@ CONFIG_OSS_INDEV 1 -+#@DEFINE_@ CONFIG_PULSE_INDEV 0 -+#@DEFINE_@ CONFIG_QTKIT_INDEV 0 -+#@DEFINE_@ CONFIG_SNDIO_INDEV 0 -+#@DEFINE_@ CONFIG_V4L2_INDEV 1 -+#@DEFINE_@ CONFIG_VFWCAP_INDEV 0 -+#@DEFINE_@ CONFIG_X11GRAB_INDEV 0 -+#@DEFINE_@ CONFIG_X11GRAB_XCB_INDEV 0 -+#@DEFINE_@ CONFIG_LIBCDIO_INDEV 0 -+#@DEFINE_@ CONFIG_LIBDC1394_INDEV 0 -+#@DEFINE_@ CONFIG_A64_MUXER 1 -+#@DEFINE_@ CONFIG_AC3_MUXER 1 -+#@DEFINE_@ CONFIG_ADTS_MUXER 1 -+#@DEFINE_@ CONFIG_ADX_MUXER 1 -+#@DEFINE_@ CONFIG_AIFF_MUXER 1 -+#@DEFINE_@ CONFIG_AMR_MUXER 1 -+#@DEFINE_@ CONFIG_ASF_MUXER 1 -+#@DEFINE_@ CONFIG_ASS_MUXER 1 -+#@DEFINE_@ CONFIG_AST_MUXER 1 -+#@DEFINE_@ CONFIG_ASF_STREAM_MUXER 1 -+#@DEFINE_@ CONFIG_AU_MUXER 1 -+#@DEFINE_@ CONFIG_AVI_MUXER 1 -+#@DEFINE_@ CONFIG_AVM2_MUXER 1 -+#@DEFINE_@ CONFIG_BIT_MUXER 1 -+#@DEFINE_@ CONFIG_CAF_MUXER 1 -+#@DEFINE_@ CONFIG_CAVSVIDEO_MUXER 1 -+#@DEFINE_@ CONFIG_CRC_MUXER 1 -+#@DEFINE_@ CONFIG_DASH_MUXER 1 -+#@DEFINE_@ CONFIG_DATA_MUXER 1 -+#@DEFINE_@ CONFIG_DAUD_MUXER 1 -+#@DEFINE_@ CONFIG_DIRAC_MUXER 1 -+#@DEFINE_@ CONFIG_DNXHD_MUXER 1 -+#@DEFINE_@ CONFIG_DTS_MUXER 1 -+#@DEFINE_@ CONFIG_DV_MUXER 1 -+#@DEFINE_@ CONFIG_EAC3_MUXER 1 -+#@DEFINE_@ CONFIG_F4V_MUXER 1 -+#@DEFINE_@ CONFIG_FFM_MUXER 1 -+#@DEFINE_@ CONFIG_FFMETADATA_MUXER 1 -+#@DEFINE_@ CONFIG_FILMSTRIP_MUXER 1 -+#@DEFINE_@ CONFIG_FLAC_MUXER 1 -+#@DEFINE_@ CONFIG_FLV_MUXER 1 -+#@DEFINE_@ CONFIG_FRAMECRC_MUXER 1 -+#@DEFINE_@ CONFIG_FRAMEMD5_MUXER 1 -+#@DEFINE_@ CONFIG_G722_MUXER 1 -+#@DEFINE_@ CONFIG_G723_1_MUXER 1 -+#@DEFINE_@ CONFIG_GIF_MUXER 1 -+#@DEFINE_@ CONFIG_GXF_MUXER 1 -+#@DEFINE_@ CONFIG_H261_MUXER 1 -+#@DEFINE_@ CONFIG_H263_MUXER 1 -+#@DEFINE_@ CONFIG_H264_MUXER 1 -+#@DEFINE_@ CONFIG_HDS_MUXER 1 -+#@DEFINE_@ CONFIG_HEVC_MUXER 1 -+#@DEFINE_@ CONFIG_HLS_MUXER 1 -+#@DEFINE_@ CONFIG_ICO_MUXER 1 -+#@DEFINE_@ CONFIG_ILBC_MUXER 1 -+#@DEFINE_@ CONFIG_IMAGE2_MUXER 1 -+#@DEFINE_@ CONFIG_IMAGE2PIPE_MUXER 1 -+#@DEFINE_@ CONFIG_IPOD_MUXER 1 -+#@DEFINE_@ CONFIG_IRCAM_MUXER 1 -+#@DEFINE_@ CONFIG_ISMV_MUXER 1 -+#@DEFINE_@ CONFIG_IVF_MUXER 1 -+#@DEFINE_@ CONFIG_JACOSUB_MUXER 1 -+#@DEFINE_@ CONFIG_LATM_MUXER 1 -+#@DEFINE_@ CONFIG_LRC_MUXER 1 -+#@DEFINE_@ CONFIG_M4V_MUXER 1 -+#@DEFINE_@ CONFIG_MD5_MUXER 1 -+#@DEFINE_@ CONFIG_MATROSKA_MUXER 1 -+#@DEFINE_@ CONFIG_MATROSKA_AUDIO_MUXER 1 -+#@DEFINE_@ CONFIG_MICRODVD_MUXER 1 -+#@DEFINE_@ CONFIG_MJPEG_MUXER 1 -+#@DEFINE_@ CONFIG_MLP_MUXER 1 -+#@DEFINE_@ CONFIG_MMF_MUXER 1 -+#@DEFINE_@ CONFIG_MOV_MUXER 1 -+#@DEFINE_@ CONFIG_MP2_MUXER 1 -+#@DEFINE_@ CONFIG_MP3_MUXER 1 -+#@DEFINE_@ CONFIG_MP4_MUXER 1 -+#@DEFINE_@ CONFIG_MPEG1SYSTEM_MUXER 1 -+#@DEFINE_@ CONFIG_MPEG1VCD_MUXER 1 -+#@DEFINE_@ CONFIG_MPEG1VIDEO_MUXER 1 -+#@DEFINE_@ CONFIG_MPEG2DVD_MUXER 1 -+#@DEFINE_@ CONFIG_MPEG2SVCD_MUXER 1 -+#@DEFINE_@ CONFIG_MPEG2VIDEO_MUXER 1 -+#@DEFINE_@ CONFIG_MPEG2VOB_MUXER 1 -+#@DEFINE_@ CONFIG_MPEGTS_MUXER 1 -+#@DEFINE_@ CONFIG_MPJPEG_MUXER 1 -+#@DEFINE_@ CONFIG_MXF_MUXER 1 -+#@DEFINE_@ CONFIG_MXF_D10_MUXER 1 -+#@DEFINE_@ CONFIG_MXF_OPATOM_MUXER 1 -+#@DEFINE_@ CONFIG_NULL_MUXER 1 -+#@DEFINE_@ CONFIG_NUT_MUXER 1 -+#@DEFINE_@ CONFIG_OGA_MUXER 1 -+#@DEFINE_@ CONFIG_OGG_MUXER 1 -+#@DEFINE_@ CONFIG_OMA_MUXER 1 -+#@DEFINE_@ CONFIG_OPUS_MUXER 1 -+#@DEFINE_@ CONFIG_PCM_ALAW_MUXER 1 -+#@DEFINE_@ CONFIG_PCM_MULAW_MUXER 1 -+#@DEFINE_@ CONFIG_PCM_F64BE_MUXER 1 -+#@DEFINE_@ CONFIG_PCM_F64LE_MUXER 1 -+#@DEFINE_@ CONFIG_PCM_F32BE_MUXER 1 -+#@DEFINE_@ CONFIG_PCM_F32LE_MUXER 1 -+#@DEFINE_@ CONFIG_PCM_S32BE_MUXER 1 -+#@DEFINE_@ CONFIG_PCM_S32LE_MUXER 1 -+#@DEFINE_@ CONFIG_PCM_S24BE_MUXER 1 -+#@DEFINE_@ CONFIG_PCM_S24LE_MUXER 1 -+#@DEFINE_@ CONFIG_PCM_S16BE_MUXER 1 -+#@DEFINE_@ CONFIG_PCM_S16LE_MUXER 1 -+#@DEFINE_@ CONFIG_PCM_S8_MUXER 1 -+#@DEFINE_@ CONFIG_PCM_U32BE_MUXER 1 -+#@DEFINE_@ CONFIG_PCM_U32LE_MUXER 1 -+#@DEFINE_@ CONFIG_PCM_U24BE_MUXER 1 -+#@DEFINE_@ CONFIG_PCM_U24LE_MUXER 1 -+#@DEFINE_@ CONFIG_PCM_U16BE_MUXER 1 -+#@DEFINE_@ CONFIG_PCM_U16LE_MUXER 1 -+#@DEFINE_@ CONFIG_PCM_U8_MUXER 1 -+#@DEFINE_@ CONFIG_PSP_MUXER 1 -+#@DEFINE_@ CONFIG_RAWVIDEO_MUXER 1 -+#@DEFINE_@ CONFIG_RM_MUXER 1 -+#@DEFINE_@ CONFIG_ROQ_MUXER 1 -+#@DEFINE_@ CONFIG_RSO_MUXER 1 -+#@DEFINE_@ CONFIG_RTP_MUXER 1 -+#@DEFINE_@ CONFIG_RTP_MPEGTS_MUXER 1 -+#@DEFINE_@ CONFIG_RTSP_MUXER 1 -+#@DEFINE_@ CONFIG_SAP_MUXER 1 -+#@DEFINE_@ CONFIG_SEGMENT_MUXER 1 -+#@DEFINE_@ CONFIG_STREAM_SEGMENT_MUXER 1 -+#@DEFINE_@ CONFIG_SMJPEG_MUXER 1 -+#@DEFINE_@ CONFIG_SMOOTHSTREAMING_MUXER 1 -+#@DEFINE_@ CONFIG_SOX_MUXER 1 -+#@DEFINE_@ CONFIG_SPX_MUXER 1 -+#@DEFINE_@ CONFIG_SPDIF_MUXER 1 -+#@DEFINE_@ CONFIG_SRT_MUXER 1 -+#@DEFINE_@ CONFIG_SWF_MUXER 1 -+#@DEFINE_@ CONFIG_TEE_MUXER 1 -+#@DEFINE_@ CONFIG_TG2_MUXER 1 -+#@DEFINE_@ CONFIG_TGP_MUXER 1 -+#@DEFINE_@ CONFIG_MKVTIMESTAMP_V2_MUXER 1 -+#@DEFINE_@ CONFIG_TRUEHD_MUXER 1 -+#@DEFINE_@ CONFIG_UNCODEDFRAMECRC_MUXER 1 -+#@DEFINE_@ CONFIG_VC1_MUXER 1 -+#@DEFINE_@ CONFIG_VC1T_MUXER 1 -+#@DEFINE_@ CONFIG_VOC_MUXER 1 -+#@DEFINE_@ CONFIG_W64_MUXER 1 -+#@DEFINE_@ CONFIG_WAV_MUXER 1 -+#@DEFINE_@ CONFIG_WEBM_MUXER 1 -+#@DEFINE_@ CONFIG_WEBM_DASH_MANIFEST_MUXER 1 -+#@DEFINE_@ CONFIG_WEBP_MUXER 1 -+#@DEFINE_@ CONFIG_WEBVTT_MUXER 1 -+#@DEFINE_@ CONFIG_WTV_MUXER 1 -+#@DEFINE_@ CONFIG_WV_MUXER 1 -+#@DEFINE_@ CONFIG_YUV4MPEGPIPE_MUXER 1 -+#@DEFINE_@ CONFIG_LIBNUT_MUXER 0 -+#@DEFINE_@ CONFIG_ALSA_OUTDEV 0 -+#@DEFINE_@ CONFIG_CACA_OUTDEV 0 -+#@DEFINE_@ CONFIG_DECKLINK_OUTDEV 0 -+#@DEFINE_@ CONFIG_FBDEV_OUTDEV 1 -+#@DEFINE_@ CONFIG_OPENGL_OUTDEV 0 -+#@DEFINE_@ CONFIG_OSS_OUTDEV 1 -+#@DEFINE_@ CONFIG_PULSE_OUTDEV 0 -+#@DEFINE_@ CONFIG_SDL_OUTDEV 0 -+#@DEFINE_@ CONFIG_SNDIO_OUTDEV 0 -+#@DEFINE_@ CONFIG_V4L2_OUTDEV 1 -+#@DEFINE_@ CONFIG_XV_OUTDEV 0 -+#@DEFINE_@ CONFIG_AAC_PARSER 1 -+#@DEFINE_@ CONFIG_AAC_LATM_PARSER 1 -+#@DEFINE_@ CONFIG_AC3_PARSER 1 -+#@DEFINE_@ CONFIG_ADX_PARSER 1 -+#@DEFINE_@ CONFIG_BMP_PARSER 1 -+#@DEFINE_@ CONFIG_CAVSVIDEO_PARSER 1 -+#@DEFINE_@ CONFIG_COOK_PARSER 1 -+#@DEFINE_@ CONFIG_DCA_PARSER 1 -+#@DEFINE_@ CONFIG_DIRAC_PARSER 1 -+#@DEFINE_@ CONFIG_DNXHD_PARSER 1 -+#@DEFINE_@ CONFIG_DPX_PARSER 1 -+#@DEFINE_@ CONFIG_DVBSUB_PARSER 1 -+#@DEFINE_@ CONFIG_DVDSUB_PARSER 1 -+#@DEFINE_@ CONFIG_DVD_NAV_PARSER 1 -+#@DEFINE_@ CONFIG_FLAC_PARSER 1 -+#@DEFINE_@ CONFIG_GSM_PARSER 1 -+#@DEFINE_@ CONFIG_H261_PARSER 1 -+#@DEFINE_@ CONFIG_H263_PARSER 1 -+#@DEFINE_@ CONFIG_H264_PARSER 1 -+#@DEFINE_@ CONFIG_HEVC_PARSER 1 -+#@DEFINE_@ CONFIG_MJPEG_PARSER 1 -+#@DEFINE_@ CONFIG_MLP_PARSER 1 -+#@DEFINE_@ CONFIG_MPEG4VIDEO_PARSER 1 -+#@DEFINE_@ CONFIG_MPEGAUDIO_PARSER 1 -+#@DEFINE_@ CONFIG_MPEGVIDEO_PARSER 1 -+#@DEFINE_@ CONFIG_OPUS_PARSER 1 -+#@DEFINE_@ CONFIG_PNG_PARSER 1 -+#@DEFINE_@ CONFIG_PNM_PARSER 1 -+#@DEFINE_@ CONFIG_RV30_PARSER 1 -+#@DEFINE_@ CONFIG_RV40_PARSER 1 -+#@DEFINE_@ CONFIG_TAK_PARSER 1 -+#@DEFINE_@ CONFIG_VC1_PARSER 1 -+#@DEFINE_@ CONFIG_VORBIS_PARSER 1 -+#@DEFINE_@ CONFIG_VP3_PARSER 1 -+#@DEFINE_@ CONFIG_VP8_PARSER 1 -+#@DEFINE_@ CONFIG_VP9_PARSER 1 -+#@DEFINE_@ CONFIG_BLURAY_PROTOCOL 0 -+#@DEFINE_@ CONFIG_CACHE_PROTOCOL 1 -+#@DEFINE_@ CONFIG_CONCAT_PROTOCOL 1 -+#@DEFINE_@ CONFIG_CRYPTO_PROTOCOL 1 -+#@DEFINE_@ CONFIG_DATA_PROTOCOL 1 -+#@DEFINE_@ CONFIG_FFRTMPCRYPT_PROTOCOL 0 -+#@DEFINE_@ CONFIG_FFRTMPHTTP_PROTOCOL 1 -+#@DEFINE_@ CONFIG_FILE_PROTOCOL 1 -+#@DEFINE_@ CONFIG_FTP_PROTOCOL 1 -+#@DEFINE_@ CONFIG_GOPHER_PROTOCOL 1 -+#@DEFINE_@ CONFIG_HLS_PROTOCOL 1 -+#@DEFINE_@ CONFIG_HTTP_PROTOCOL 1 -+#@DEFINE_@ CONFIG_HTTPPROXY_PROTOCOL 1 -+#@DEFINE_@ CONFIG_HTTPS_PROTOCOL 0 -+#@DEFINE_@ CONFIG_ICECAST_PROTOCOL 1 -+#@DEFINE_@ CONFIG_MMSH_PROTOCOL 1 -+#@DEFINE_@ CONFIG_MMST_PROTOCOL 1 -+#@DEFINE_@ CONFIG_MD5_PROTOCOL 1 -+#@DEFINE_@ CONFIG_PIPE_PROTOCOL 1 -+#@DEFINE_@ CONFIG_RTMP_PROTOCOL 1 -+#@DEFINE_@ CONFIG_RTMPE_PROTOCOL 0 -+#@DEFINE_@ CONFIG_RTMPS_PROTOCOL 0 -+#@DEFINE_@ CONFIG_RTMPT_PROTOCOL 1 -+#@DEFINE_@ CONFIG_RTMPTE_PROTOCOL 0 -+#@DEFINE_@ CONFIG_RTMPTS_PROTOCOL 0 -+#@DEFINE_@ CONFIG_RTP_PROTOCOL 1 -+#@DEFINE_@ CONFIG_SCTP_PROTOCOL 0 -+#@DEFINE_@ CONFIG_SRTP_PROTOCOL 1 -+#@DEFINE_@ CONFIG_SUBFILE_PROTOCOL 1 -+#@DEFINE_@ CONFIG_TCP_PROTOCOL 1 -+#@DEFINE_@ CONFIG_TLS_PROTOCOL 0 -+#@DEFINE_@ CONFIG_UDP_PROTOCOL 1 -+#@DEFINE_@ CONFIG_UDPLITE_PROTOCOL 1 -+#@DEFINE_@ CONFIG_UNIX_PROTOCOL 1 -+#@DEFINE_@ CONFIG_LIBRTMP_PROTOCOL 0 -+#@DEFINE_@ CONFIG_LIBRTMPE_PROTOCOL 0 -+#@DEFINE_@ CONFIG_LIBRTMPS_PROTOCOL 0 -+#@DEFINE_@ CONFIG_LIBRTMPT_PROTOCOL 0 -+#@DEFINE_@ CONFIG_LIBRTMPTE_PROTOCOL 0 -+#@DEFINE_@ CONFIG_LIBSSH_PROTOCOL 0 -+#@DEFINE_@ CONFIG_LIBSMBCLIENT_PROTOCOL 0 -+#endif /* FFMPEG_CONFIG_H */ -diff --git a/configure.cmake b/configure.cmake -new file mode 100644 -index 0000000000..48419479ff ---- /dev/null -+++ b/configure.cmake -@@ -0,0 +1,2299 @@ -+include(CheckCSourceCompiles) -+include(CheckCXXSourceCompiles) -+include(CheckIncludeFile) -+ -+function(enable) -+ foreach(opt ${ARGN}) -+ set(${opt} ON PARENT_SCOPE) -+ endforeach() -+endfunction() -+ -+function(disable) -+ foreach(opt ${ARGN}) -+ set(${opt} OFF PARENT_SCOPE) -+ endforeach() -+endfunction() -+ -+function(check_func) -+ set(func ${ARGV0}) -+ check_c_source_compiles(" -+extern int ${func}(); -+int main(void){ ${func}(); } -+" -+ check_func_${func}_compiles -+ ) -+ if(check_func_${func}_compiles) -+ set(${func} ON PARENT_SCOPE) -+ else() -+ set(${func} OFF PARENT_SCOPE) -+ endif() -+endfunction() -+ -+function(check_func_headers) -+ set(headers ${ARGV0}) -+ set(func ${ARGV1}) -+ foreach(hdr ${headers}) -+ set(inc "${inc}\n#include \"${hdr}\"") -+ endforeach() -+ check_c_source_compiles(" -+${inc} -+#include -+long check_${func}(void) { return (long) ${func}; } -+int main(void) { int ret = 0; -+ ret |= ((intptr_t)check_${func}) & 0xFFFF; -+return ret; } -+" -+ check_func_headers_${func}_compiles -+ ) -+ if(check_func_headers_${func}_compiles) -+ set(${func} ON PARENT_SCOPE) -+ else() -+ set(${func} OFF PARENT_SCOPE) -+ endif() -+endfunction() -+ -+function(check_mathfunc) -+ set(func ${ARGV0}) -+ if(DEFINED ARGV1) -+ set(narg ${ARGV1}) -+ set(args "f, g") -+ else() -+ set(narg 1) -+ set(args "f") -+ endif() -+ check_c_source_compiles(" -+#include -+float foo(float f, float g) { return ${func}(${args}); } -+int main(void){ foo; } -+" -+ check_mathfunc_${func}_compiles -+ ) -+ if(check_mathfunc_${func}_compiles) -+ set(${func} ON PARENT_SCOPE) -+ else() -+ set(${func} OFF PARENT_SCOPE) -+ endif() -+endfunction() -+ -+function(check_headers) -+ set(header ${ARGV0}) -+ string(REPLACE "." "_" header_ ${header}) -+ string(REPLACE "/" "_" header_ ${header_}) -+ check_include_file(${header} check_headers_${header_}) -+ if(check_headers_${header_}) -+ set(${header_} ON PARENT_SCOPE) -+ else() -+ set(${header_} OFF PARENT_SCOPE) -+ endif() -+endfunction() -+ -+# CONFIG_LIST contains configurable options, while HAVE_LIST is for -+# system-dependent things. -+set(AVCODEC_COMPONENTS -+ bsfs -+ decoders -+ encoders -+ hwaccels -+ parsers -+ ) -+set(AVDEVICE_COMPONENTS -+ indevs -+ outdevs -+ ) -+set(AVFILTER_COMPONENTS -+ filters -+ ) -+set(AVFORMAT_COMPONENTS -+ demuxers -+ muxers -+ protocols -+ ) -+set(COMPONENT_LIST -+ ${AVCODEC_COMPONENTS} -+ ${AVDEVICE_COMPONENTS} -+ ${AVFILTER_COMPONENTS} -+ ${AVFORMAT_COMPONENTS} -+ ) -+set(EXAMPLE_LIST -+ avio_list_dir_example -+ avio_reading_example -+ decode_audio_example -+ decode_video_example -+ demuxing_decoding_example -+ encode_audio_example -+ encode_video_example -+ extract_mvs_example -+ filter_audio_example -+ filtering_audio_example -+ filtering_video_example -+ http_multiclient_example -+ hw_decode_example -+ metadata_example -+ muxing_example -+ qsvdec_example -+ remuxing_example -+ resampling_audio_example -+ scaling_video_example -+ transcode_aac_example -+ transcoding_example -+ vaapi_encode_example -+ vaapi_transcode_example -+ ) -+set(EXTERNAL_AUTODETECT_LIBRARY_LIST -+ alsa -+ appkit -+ avfoundation -+ bzlib -+ coreimage -+ iconv -+ libxcb -+ libxcb_shm -+ libxcb_shape -+ libxcb_xfixes -+ lzma -+ mediafoundation -+ schannel -+ sdl2 -+ securetransport -+ sndio -+ xlib -+ zlib -+ ) -+set(EXTERNAL_LIBRARY_GPL_LIST -+ avisynth -+ frei0r -+ libcdio -+ libdavs2 -+ librubberband -+ libvidstab -+ libx264 -+ libx265 -+ libxavs -+ libxavs2 -+ libxvid -+ ) -+set(EXTERNAL_LIBRARY_NONFREE_LIST -+ decklink -+ libfdk_aac -+ openssl -+ libtls -+ ) -+set(EXTERNAL_LIBRARY_VERSION3_LIST -+ gmp -+ libaribb24 -+ liblensfun -+ libopencore_amrnb -+ libopencore_amrwb -+ libvmaf -+ libvo_amrwbenc -+ mbedtls -+ rkmpp -+ ) -+set(EXTERNAL_LIBRARY_GPLV3_LIST -+ libsmbclient -+ ) -+set(EXTERNAL_LIBRARY_LIST -+ ${EXTERNAL_LIBRARY_GPL_LIST} -+ ${EXTERNAL_LIBRARY_NONFREE_LIST} -+ ${EXTERNAL_LIBRARY_VERSION3_LIST} -+ ${EXTERNAL_LIBRARY_GPLV3_LIST} -+ chromaprint -+ gcrypt -+ gnutls -+ jni -+ ladspa -+ libaom -+ libass -+ libbluray -+ libbs2b -+ libcaca -+ libcelt -+ libcodec2 -+ libdav1d -+ libdc1394 -+ libdrm -+ libflite -+ libfontconfig -+ libfreetype -+ libfribidi -+ libglslang -+ libgme -+ libgsm -+ libiec61883 -+ libilbc -+ libjack -+ libklvanc -+ libkvazaar -+ libmodplug -+ libmp3lame -+ libmysofa -+ libopencv -+ libopenh264 -+ libopenjpeg -+ libopenmpt -+ libopus -+ libpulse -+ librabbitmq -+ librav1e -+ librsvg -+ librtmp -+ libshine -+ libsmbclient -+ libsnappy -+ libsoxr -+ libspeex -+ libsrt -+ libssh -+ libtensorflow -+ libtesseract -+ libtheora -+ libtwolame -+ libv4l2 -+ libvorbis -+ libvpx -+ libwavpack -+ libwebp -+ libxml2 -+ libzimg -+ libzmq -+ libzvbi -+ lv2 -+ mediacodec -+ openal -+ opengl -+ pocketsphinx -+ vapoursynth -+ ) -+set(HWACCEL_AUTODETECT_LIBRARY_LIST -+ amf -+ audiotoolbox -+ crystalhd -+ cuda -+ cuda_llvm -+ cuvid -+ d3d11va -+ dxva2 -+ ffnvcodec -+ nvdec -+ nvenc -+ vaapi -+ vdpau -+ videotoolbox -+ v4l2_m2m -+ xvmc -+ ) -+# catchall list of things that require external libs to link -+set(EXTRALIBS_LIST -+ cpu_init -+ cws2fws -+ ) -+set(HWACCEL_LIBRARY_NONFREE_LIST -+ cuda_nvcc -+ cuda_sdk -+ libnpp -+ ) -+set(HWACCEL_LIBRARY_LIST -+ ${HWACCEL_LIBRARY_NONFREE_LIST} -+ libmfx -+ mmal -+ omx -+ opencl -+ vulkan -+ ) -+set(DOCUMENT_LIST -+ doc -+ htmlpages -+ manpages -+ podpages -+ txtpages -+ ) -+set(FEATURE_LIST -+ ftrapv -+ gray -+ hardcoded_tables -+ omx_rpi -+ runtime_cpudetect -+ safe_bitstream_reader -+ shared -+ small -+ static -+ swscale_alpha -+ ) -+# this list should be kept in linking order -+set(LIBRARY_LIST -+ avdevice -+ avfilter -+ swscale -+ postproc -+ avformat -+ avcodec -+ swresample -+ avresample -+ avutil -+ ) -+set(LICENSE_LIST -+ gpl -+ nonfree -+ version3 -+ ) -+set(PROGRAM_LIST -+ ffplay -+ ffprobe -+ ffmpeg -+ ) -+set(SUBSYSTEM_LIST -+ dct -+ dwt -+ error_resilience -+ faan -+ fast_unaligned -+ fft -+ lsp -+ lzo -+ mdct -+ pixelutils -+ network -+ rdft -+ ) -+# COMPONENT_LIST needs to come last to ensure correct dependency checking -+set(CONFIG_LIST -+ ${DOCUMENT_LIST} -+ ${EXAMPLE_LIST} -+ ${EXTERNAL_LIBRARY_LIST} -+ ${EXTERNAL_AUTODETECT_LIBRARY_LIST} -+ ${HWACCEL_LIBRARY_LIST} -+ ${HWACCEL_AUTODETECT_LIBRARY_LIST} -+ ${FEATURE_LIST} -+ ${LICENSE_LIST} -+ ${LIBRARY_LIST} -+ ${PROGRAM_LIST} -+ ${SUBSYSTEM_LIST} -+ autodetect -+ fontconfig -+ large_tests -+ linux_perf -+ memory_poisoning -+ neon_clobber_test -+ ossfuzz -+ pic -+ thumb -+ valgrind_backtrace -+ xmm_clobber_test -+ ${COMPONENT_LIST} -+ ) -+set(THREADS_LIST -+ pthreads -+ os2threads -+ w32threads -+ ) -+set(ATOMICS_LIST -+ atomics_gcc -+ atomics_suncc -+ atomics_win32 -+ ) -+set(AUTODETECT_LIBS -+ ${EXTERNAL_AUTODETECT_LIBRARY_LIST} -+ ${HWACCEL_AUTODETECT_LIBRARY_LIST} -+ ${THREADS_LIST} -+ ) -+set(ARCH_LIST -+ aarch64 -+ alpha -+ arm -+ avr32 -+ avr32_ap -+ avr32_uc -+ bfin -+ ia64 -+ m68k -+ mips -+ mips64 -+ parisc -+ ppc -+ ppc64 -+ s390 -+ sh4 -+ sparc -+ sparc64 -+ tilegx -+ tilepro -+ tomi -+ x86 -+ x86_32 -+ x86_64 -+ ) -+set(ARCH_EXT_LIST_ARM -+ armv5te -+ armv6 -+ armv6t2 -+ armv8 -+ neon -+ vfp -+ vfpv3 -+ setend -+ ) -+set(ARCH_EXT_LIST_MIPS -+ mipsfpu -+ mips32r2 -+ mips32r5 -+ mips64r2 -+ mips32r6 -+ mips64r6 -+ mipsdsp -+ mipsdspr2 -+ msa -+ msa2 -+ ) -+set(ARCH_EXT_LIST_LOONGSON -+ loongson2 -+ loongson3 -+ mmi -+ ) -+set(ARCH_EXT_LIST_X86_SIMD -+ aesni -+ amd3dnow -+ amd3dnowext -+ avx -+ avx2 -+ avx512 -+ fma3 -+ fma4 -+ mmx -+ mmxext -+ sse -+ sse2 -+ sse3 -+ sse4 -+ sse42 -+ ssse3 -+ xop -+ ) -+set(ARCH_EXT_LIST_PPC -+ altivec -+ dcbzl -+ ldbrx -+ power8 -+ ppc4xx -+ vsx -+ ) -+set(ARCH_EXT_LIST_X86 -+ ${ARCH_EXT_LIST_X86_SIMD} -+ cpunop -+ i686 -+ ) -+set(ARCH_EXT_LIST -+ ${ARCH_EXT_LIST_ARM} -+ ${ARCH_EXT_LIST_PPC} -+ ${ARCH_EXT_LIST_X86} -+ ${ARCH_EXT_LIST_MIPS} -+ ${ARCH_EXT_LIST_LOONGSON} -+ ) -+set(ARCH_FEATURES -+ aligned_stack -+ fast_64bit -+ fast_clz -+ fast_cmov -+ local_aligned -+ simd_align_16 -+ simd_align_32 -+ simd_align_64 -+ ) -+set(BUILTIN_LIST -+ atomic_cas_ptr -+ machine_rw_barrier -+ MemoryBarrier -+ mm_empty -+ rdtsc -+ sem_timedwait -+ sync_val_compare_and_swap -+ ) -+set(HAVE_LIST_CMDLINE -+ inline_asm -+ symver -+ yasm -+ ) -+set(HAVE_LIST_PUB -+ bigendian -+ fast_unaligned -+ ) -+set(HEADERS_LIST -+ arpa_inet_h -+ asm_types_h -+ cdio_paranoia_h -+ cdio_paranoia_paranoia_h -+ cuda_h -+ dispatch_dispatch_h -+ dev_bktr_ioctl_bt848_h -+ dev_bktr_ioctl_meteor_h -+ dev_ic_bt8xx_h -+ dev_video_bktr_ioctl_bt848_h -+ dev_video_meteor_ioctl_meteor_h -+ direct_h -+ dirent_h -+ dxgidebug_h -+ dxva_h -+ ES2_gl_h -+ gsm_h -+ io_h -+ linux_perf_event_h -+ machine_ioctl_bt848_h -+ machine_ioctl_meteor_h -+ malloc_h -+ opencv2_core_core_c_h -+ OpenGL_gl3_h -+ poll_h -+ sys_param_h -+ sys_resource_h -+ sys_select_h -+ sys_soundcard_h -+ sys_time_h -+ sys_un_h -+ sys_videoio_h -+ termios_h -+ udplite_h -+ unistd_h -+ valgrind_valgrind_h -+ windows_h -+ winsock2_h -+ ) -+set(INTRINSICS_LIST -+ intrinsics_neon -+ ) -+set(COMPLEX_FUNCS -+ cabs -+ cexp -+ ) -+set(MATH_FUNCS -+ atanf -+ atan2f -+ cbrt -+ cbrtf -+ copysign -+ cosf -+ erf -+ exp2 -+ exp2f -+ expf -+ hypot -+ isfinite -+ isinf -+ isnan -+ ldexpf -+ llrint -+ llrintf -+ log2 -+ log2f -+ log10f -+ lrint -+ lrintf -+ powf -+ rint -+ round -+ roundf -+ sinf -+ trunc -+ truncf -+ ) -+set(SYSTEM_FEATURES -+ dos_paths -+ libc_msvcrt -+ MMAL_PARAMETER_VIDEO_MAX_NUM_CALLBACKS -+ section_data_rel_ro -+ threads -+ uwp -+ winrt -+ ) -+set(SYSTEM_FUNCS -+ access -+ aligned_malloc -+ arc4random -+ clock_gettime -+ closesocket -+ CommandLineToArgvW -+ fcntl -+ getaddrinfo -+ gethrtime -+ getopt -+ GetModuleHandle -+ GetProcessAffinityMask -+ GetProcessMemoryInfo -+ GetProcessTimes -+ getrusage -+ GetStdHandle -+ GetSystemTimeAsFileTime -+ gettimeofday -+ glob -+ glXGetProcAddress -+ gmtime_r -+ inet_aton -+ isatty -+ kbhit -+ localtime_r -+ lstat -+ lzo1x_999_compress -+ mach_absolute_time -+ MapViewOfFile -+ memalign -+ mkstemp -+ mmap -+ mprotect -+ nanosleep -+ PeekNamedPipe -+ posix_memalign -+ pthread_cancel -+ sched_getaffinity -+ SecItemImport -+ SetConsoleTextAttribute -+ SetConsoleCtrlHandler -+ SetDllDirectory -+ setmode -+ setrlimit -+ Sleep -+ strerror_r -+ sysconf -+ sysctl -+ usleep -+ UTGetOSTypeFromString -+ VirtualAlloc -+ wglGetProcAddress -+ ) -+set(SYSTEM_LIBRARIES -+ bcrypt -+ vaapi_drm -+ vaapi_x11 -+ vdpau_x11 -+ ) -+set(TOOLCHAIN_FEATURES -+ as_arch_directive -+ as_dn_directive -+ as_fpu_directive -+ as_func -+ as_object_arch -+ asm_mod_q -+ blocks_extension -+ ebp_available -+ ebx_available -+ gnu_as -+ gnu_windres -+ ibm_asm -+ inline_asm_direct_symbol_refs -+ inline_asm_labels -+ inline_asm_nonlocal_labels -+ pragma_deprecated -+ rsync_contimeout -+ symver_asm_label -+ symver_gnu_asm -+ vfp_args -+ xform_asm -+ xmm_clobbers -+ ) -+set(TYPES_LIST -+ kCMVideoCodecType_HEVC -+ kCVPixelFormatType_420YpCbCr10BiPlanarVideoRange -+ kCVImageBufferTransferFunction_SMPTE_ST_2084_PQ -+ kCVImageBufferTransferFunction_ITU_R_2100_HLG -+ kCVImageBufferTransferFunction_Linear -+ socklen_t -+ struct_addrinfo -+ struct_group_source_req -+ struct_ip_mreq_source -+ struct_ipv6_mreq -+ struct_msghdr_msg_flags -+ struct_pollfd -+ struct_rusage_ru_maxrss -+ struct_sctp_event_subscribe -+ struct_sockaddr_in6 -+ struct_sockaddr_sa_len -+ struct_sockaddr_storage -+ struct_stat_st_mtim_tv_nsec -+ struct_v4l2_frmivalenum_discrete -+ ) -+list(TRANSFORM ARCH_EXT_LIST APPEND _external OUTPUT_VARIABLE ARCH_EXT_LIST_EXTERNAL) -+list(TRANSFORM ARCH_EXT_LIST APPEND _inline OUTPUT_VARIABLE ARCH_EXT_LIST_INLINE) -+set(HAVE_LIST -+ ${ARCH_EXT_LIST} -+ ${ARCH_EXT_LIST_EXTERNAL} -+ ${ARCH_EXT_LIST_INLINE} -+ ${ARCH_FEATURES} -+ ${BUILTIN_LIST} -+ ${COMPLEX_FUNCS} -+ ${HAVE_LIST_CMDLINE} -+ ${HAVE_LIST_PUB} -+ ${HEADERS_LIST} -+ ${INTRINSICS_LIST} -+ ${MATH_FUNCS} -+ ${SYSTEM_FEATURES} -+ ${SYSTEM_FUNCS} -+ ${SYSTEM_LIBRARIES} -+ ${THREADS_LIST} -+ ${TOOLCHAIN_FEATURES} -+ ${TYPES_LIST} -+ makeinfo -+ makeinfo_html -+ opencl_d3d11 -+ opencl_drm_arm -+ opencl_drm_beignet -+ opencl_dxva2 -+ opencl_vaapi_beignet -+ opencl_vaapi_intel_media -+ perl -+ pod2man -+ texi2html -+ ) -+# options emitted with CONFIG_ prefix but not available on the command line -+set(CONFIG_EXTRA -+ aandcttables -+ ac3dsp -+ adts_header -+ audio_frame_queue -+ audiodsp -+ blockdsp -+ bswapdsp -+ cabac -+ cbs -+ cbs_av1 -+ cbs_h264 -+ cbs_h265 -+ cbs_jpeg -+ cbs_mpeg2 -+ cbs_vp9 -+ dirac_parse -+ dnn -+ dvprofile -+ exif -+ faandct -+ faanidct -+ fdctdsp -+ flacdsp -+ fmtconvert -+ frame_thread_encoder -+ g722dsp -+ golomb -+ gplv3 -+ h263dsp -+ h264chroma -+ h264dsp -+ h264parse -+ h264pred -+ h264qpel -+ hevcparse -+ hpeldsp -+ huffman -+ huffyuvdsp -+ huffyuvencdsp -+ idctdsp -+ iirfilter -+ mdct15 -+ intrax8 -+ iso_media -+ ividsp -+ jpegtables -+ lgplv3 -+ libx262 -+ llauddsp -+ llviddsp -+ llvidencdsp -+ lpc -+ lzf -+ me_cmp -+ mpeg_er -+ mpegaudio -+ mpegaudiodsp -+ mpegaudioheader -+ mpegvideo -+ mpegvideoenc -+ mss34dsp -+ pixblockdsp -+ qpeldsp -+ qsv -+ qsvdec -+ qsvenc -+ qsvvpp -+ rangecoder -+ riffdec -+ riffenc -+ rtpdec -+ rtpenc_chain -+ rv34dsp -+ scene_sad -+ sinewin -+ snappy -+ srtp -+ startcode -+ texturedsp -+ texturedspenc -+ tpeldsp -+ vaapi_1 -+ vaapi_encode -+ vc1dsp -+ videodsp -+ vp3dsp -+ vp56dsp -+ vp8dsp -+ wma_freqs -+ wmv2dsp -+ ) -+set(CMDLINE_SELECT -+ ${ARCH_EXT_LIST} -+ ${CONFIG_LIST} -+ ${HAVE_LIST_CMDLINE} -+ ${THREADS_LIST} -+ asm -+ cross_compile -+ debug -+ extra_warnings -+ logging -+ lto -+ optimizations -+ rpath -+ stripping -+ ) -+set(PATHS_LIST -+ bindir -+ datadir -+ docdir -+ incdir -+ libdir -+ mandir -+ pkgconfigdir -+ prefix -+ shlibdir -+ install_name_dir -+ ) -+set(CMDLINE_SET -+ ${PATHS_LIST} -+ ar -+ arch -+ as -+ assert_level -+ build_suffix -+ cc -+ objcc -+ cpu -+ cross_prefix -+ custom_allocator -+ cxx -+ dep_cc -+ doxygen -+ env -+ extra_version -+ gas -+ host_cc -+ host_cflags -+ host_extralibs -+ host_ld -+ host_ldflags -+ host_os -+ ignore_tests -+ install -+ ld -+ ln_s -+ logfile -+ malloc_prefix -+ nm -+ optflags -+ nvcc -+ nvccflags -+ pkg_config -+ pkg_config_flags -+ progs_suffix -+ random_seed -+ ranlib -+ samples -+ strip -+ sws_max_filter_size -+ sysinclude -+ sysroot -+ target_exec -+ target_os -+ target_path -+ target_samples -+ tempprefix -+ toolchain -+ valgrind -+ windres -+ x86asmexe -+ ) -+set(CMDLINE_APPEND -+ extra_cflags -+ extra_cxxflags -+ extra_objcflags -+ host_cppflags -+ ) -+# code dependency declarations -+# architecture extensions -+set(armv5te_deps arm) -+set(armv6_deps arm) -+set(armv6t2_deps arm) -+set(armv8_deps aarch64) -+set(neon_deps_any aarch64 arm) -+set(intrinsics_neon_deps neon) -+set(vfp_deps_any aarch64 arm) -+set(vfpv3_deps vfp) -+set(setend_deps arm) -+#map 'eval ${v}_inline_deps=inline_asm' $ARCH_EXT_LIST_ARM -+set(altivec_deps ppc) -+set(dcbzl_deps ppc) -+set(ldbrx_deps ppc) -+set(ppc4xx_deps ppc) -+set(vsx_deps altivec) -+set(power8_deps vsx) -+### -+set(loongson2_deps mips) -+set(loongson3_deps mips) -+set(mips32r2_deps mips) -+set(mips32r5_deps mips) -+set(mips32r6_deps mips) -+set(mips64r2_deps mips) -+set(mips64r6_deps mips) -+set(mipsfpu_deps mips) -+set(mipsdsp_deps mips) -+set(mipsdspr2_deps mips) -+set(mmi_deps mips) -+set(msa_deps mipsfpu) -+set(msa2_deps msa) -+### -+set(cpunop_deps i686) -+set(x86_64_select i686) -+set(x86_64_suggest fast_cmov) -+### -+set(amd3dnow_deps mmx) -+set(amd3dnowext_deps amd3dnow) -+set(i686_deps x86) -+set(mmx_deps x86) -+set(mmxext_deps mmx) -+set(sse_deps mmxext) -+set(sse2_deps sse) -+set(sse3_deps sse2) -+set(ssse3_deps sse3) -+set(sse4_deps ssse3) -+set(sse42_deps sse4) -+set(aesni_deps sse42) -+set(avx_deps sse42) -+set(xop_deps avx) -+set(fma3_deps avx) -+set(fma4_deps avx) -+set(avx2_deps avx) -+set(avx512_deps avx2) -+### -+set(mmx_external_deps x86asm) -+set(mmx_inline_deps inline_asm x86) -+set(mmx_suggest mmx_external mmx_inline) -+### -+#for ext in $(filter_out mmx $ARCH_EXT_LIST_X86_SIMD); do -+# eval dep=\$${ext}_deps -+# eval ${ext}_external_deps='"${dep}_external"' -+# eval ${ext}_inline_deps='"${dep}_inline"' -+# eval ${ext}_suggest='"${ext}_external ${ext}_inline"' -+#done -+### -+set(aligned_stack_if_any aarch64 ppc x86) -+set(fast_64bit_if_any aarch64 alpha ia64 mips64 parisc64 ppc64 sparc64 x86_64) -+set(fast_clz_if_any aarch64 alpha avr32 mips ppc x86) -+set(fast_unaligned_if_any aarch64 ppc x86) -+set(simd_align_16_if_any altivec neon sse) -+set(simd_align_32_if_any avx) -+set(simd_align_64_if_any avx512) -+# system capabilities -+set(linux_perf_deps linux_perf_event_h) -+set(symver_if_any symver_asm_label symver_gnu_asm) -+set(valgrind_backtrace_conflict optimizations) -+set(valgrind_backtrace_deps valgrind_valgrind_h) -+# threading support -+set(atomics_gcc_if sync_val_compare_and_swap) -+set(atomics_suncc_if atomic_cas_ptr machine_rw_barrier) -+set(atomics_win32_if MemoryBarrier) -+set(atomics_native_if_any ${ATOMICS_LIST}) -+set(w32threads_deps atomics_native) -+set(threads_if_any $THREADS_LIST) -+# subsystems -+set(cbs_av1_select cbs) -+set(cbs_h264_select cbs) -+set(cbs_h265_select cbs) -+set(cbs_jpeg_select cbs) -+set(cbs_mpeg2_select cbs) -+set(cbs_vp9_select cbs) -+set(dct_select rdft) -+set(dirac_parse_select golomb) -+set(dnn_suggest libtensorflow) -+set(error_resilience_select me_cmp) -+set(faandct_deps faan) -+set(faandct_select fdctdsp) -+set(faanidct_deps faan) -+set(faanidct_select idctdsp) -+set(h264dsp_select startcode) -+set(hevcparse_select golomb) -+set(frame_thread_encoder_deps encoders threads) -+set(intrax8_select blockdsp idctdsp) -+set(mdct_select fft) -+set(mdct15_select fft) -+set(me_cmp_select fdctdsp idctdsp pixblockdsp) -+set(mpeg_er_select error_resilience) -+set(mpegaudio_select mpegaudiodsp mpegaudioheader) -+set(mpegaudiodsp_select dct) -+set(mpegvideo_select blockdsp h264chroma hpeldsp idctdsp me_cmp mpeg_er videodsp) -+set(mpegvideoenc_select aandcttables me_cmp mpegvideo pixblockdsp qpeldsp) -+set(vc1dsp_select h264chroma qpeldsp startcode) -+set(rdft_select fft) -+# decoders / encoders -+set(aac_decoder_select adts_header mdct15 mdct sinewin) -+set(aac_fixed_decoder_select adts_header mdct sinewin) -+set(aac_encoder_select audio_frame_queue iirfilter lpc mdct sinewin) -+set(aac_latm_decoder_select aac_decoder aac_latm_parser) -+set(ac3_decoder_select ac3_parser ac3dsp bswapdsp fmtconvert mdct) -+set(ac3_fixed_decoder_select ac3_parser ac3dsp bswapdsp mdct) -+set(ac3_encoder_select ac3dsp audiodsp mdct me_cmp) -+set(ac3_fixed_encoder_select ac3dsp audiodsp mdct me_cmp) -+set(acelp_kelvin_decoder_select audiodsp) -+set(adpcm_g722_decoder_select g722dsp) -+set(adpcm_g722_encoder_select g722dsp) -+set(aic_decoder_select golomb idctdsp) -+set(alac_encoder_select lpc) -+set(als_decoder_select bswapdsp) -+set(amrnb_decoder_select lsp) -+set(amrwb_decoder_select lsp) -+set(amv_decoder_select sp5x_decoder exif) -+set(amv_encoder_select jpegtables mpegvideoenc) -+set(ape_decoder_select bswapdsp llauddsp) -+set(apng_decoder_deps zlib) -+set(apng_encoder_deps zlib) -+set(apng_encoder_select llvidencdsp) -+set(aptx_decoder_select audio_frame_queue) -+set(aptx_encoder_select audio_frame_queue) -+set(aptx_hd_decoder_select audio_frame_queue) -+set(aptx_hd_encoder_select audio_frame_queue) -+set(asv1_decoder_select blockdsp bswapdsp idctdsp) -+set(asv1_encoder_select aandcttables bswapdsp fdctdsp pixblockdsp) -+set(asv2_decoder_select blockdsp bswapdsp idctdsp) -+set(asv2_encoder_select aandcttables bswapdsp fdctdsp pixblockdsp) -+set(atrac1_decoder_select mdct sinewin) -+set(atrac3_decoder_select mdct) -+set(atrac3al_decoder_select mdct) -+set(atrac3p_decoder_select mdct sinewin) -+set(atrac3pal_decoder_select mdct sinewin) -+set(atrac9_decoder_select mdct) -+set(avrn_decoder_select exif jpegtables) -+set(bink_decoder_select blockdsp hpeldsp) -+set(binkaudio_dct_decoder_select mdct rdft dct sinewin wma_freqs) -+set(binkaudio_rdft_decoder_select mdct rdft sinewin wma_freqs) -+set(cavs_decoder_select blockdsp golomb h264chroma idctdsp qpeldsp videodsp) -+set(clearvideo_decoder_select idctdsp) -+set(cllc_decoder_select bswapdsp) -+set(comfortnoise_encoder_select lpc) -+set(cook_decoder_select audiodsp mdct sinewin) -+set(cscd_decoder_select lzo) -+set(cscd_decoder_suggest zlib) -+set(dca_decoder_select mdct) -+set(dca_encoder_select mdct) -+set(dds_decoder_select texturedsp) -+set(dirac_decoder_select dirac_parse dwt golomb videodsp mpegvideoenc) -+set(dnxhd_decoder_select blockdsp idctdsp) -+set(dnxhd_encoder_select blockdsp fdctdsp idctdsp mpegvideoenc pixblockdsp) -+set(dolby_e_decoder_select mdct) -+set(dvvideo_decoder_select dvprofile idctdsp) -+set(dvvideo_encoder_select dvprofile fdctdsp me_cmp pixblockdsp) -+set(dxa_decoder_deps zlib) -+set(dxv_decoder_select lzf texturedsp) -+set(eac3_decoder_select ac3_decoder) -+set(eac3_encoder_select ac3_encoder) -+set(eamad_decoder_select aandcttables blockdsp bswapdsp idctdsp mpegvideo) -+set(eatgq_decoder_select aandcttables) -+set(eatqi_decoder_select aandcttables blockdsp bswapdsp idctdsp) -+set(exr_decoder_deps zlib) -+set(ffv1_decoder_select rangecoder) -+set(ffv1_encoder_select rangecoder) -+set(ffvhuff_decoder_select huffyuv_decoder) -+set(ffvhuff_encoder_select huffyuv_encoder) -+set(fic_decoder_select golomb) -+set(flac_decoder_select flacdsp) -+set(flac_encoder_select bswapdsp flacdsp lpc) -+set(flashsv2_decoder_deps zlib) -+set(flashsv2_encoder_deps zlib) -+set(flashsv_decoder_deps zlib) -+set(flashsv_encoder_deps zlib) -+set(flv_decoder_select h263_decoder) -+set(flv_encoder_select h263_encoder) -+set(fourxm_decoder_select blockdsp bswapdsp) -+set(fraps_decoder_select bswapdsp huffman) -+set(g2m_decoder_deps zlib) -+set(g2m_decoder_select blockdsp idctdsp jpegtables) -+set(g729_decoder_select audiodsp) -+set(h261_decoder_select mpegvideo) -+set(h261_encoder_select mpegvideoenc) -+set(h263_decoder_select h263_parser h263dsp mpegvideo qpeldsp) -+set(h263_encoder_select h263dsp mpegvideoenc) -+set(h263i_decoder_select h263_decoder) -+set(h263p_decoder_select h263_decoder) -+set(h263p_encoder_select h263_encoder) -+set(h264_decoder_select cabac golomb h264chroma h264dsp h264parse h264pred h264qpel videodsp) -+set(h264_decoder_suggest error_resilience) -+set(hap_decoder_select snappy texturedsp) -+set(hap_encoder_deps libsnappy) -+set(hap_encoder_select texturedspenc) -+set(hevc_decoder_select bswapdsp cabac golomb hevcparse videodsp) -+set(huffyuv_decoder_select bswapdsp huffyuvdsp llviddsp) -+set(huffyuv_encoder_select bswapdsp huffman huffyuvencdsp llvidencdsp) -+set(hymt_decoder_select huffyuv_decoder) -+set(iac_decoder_select imc_decoder) -+set(imc_decoder_select bswapdsp fft mdct sinewin) -+set(imm4_decoder_select bswapdsp) -+set(imm5_decoder_select h264_decoder hevc_decoder) -+set(indeo3_decoder_select hpeldsp) -+set(indeo4_decoder_select ividsp) -+set(indeo5_decoder_select ividsp) -+set(interplay_video_decoder_select hpeldsp) -+set(jpegls_decoder_select mjpeg_decoder) -+set(jv_decoder_select blockdsp) -+set(lagarith_decoder_select llviddsp) -+set(ljpeg_encoder_select idctdsp jpegtables mpegvideoenc) -+set(lscr_decoder_deps zlib) -+set(magicyuv_decoder_select llviddsp) -+set(magicyuv_encoder_select llvidencdsp) -+set(mdec_decoder_select blockdsp bswapdsp idctdsp mpegvideo) -+set(metasound_decoder_select lsp mdct sinewin) -+set(mimic_decoder_select blockdsp bswapdsp hpeldsp idctdsp) -+set(mjpeg_decoder_select blockdsp hpeldsp exif idctdsp jpegtables) -+set(mjpeg_encoder_select jpegtables mpegvideoenc) -+set(mjpegb_decoder_select mjpeg_decoder) -+set(mlp_decoder_select mlp_parser) -+set(mlp_encoder_select lpc audio_frame_queue) -+set(motionpixels_decoder_select bswapdsp) -+set(mp1_decoder_select mpegaudio) -+set(mp1float_decoder_select mpegaudio) -+set(mp2_decoder_select mpegaudio) -+set(mp2float_decoder_select mpegaudio) -+set(mp3_decoder_select mpegaudio) -+set(mp3adu_decoder_select mpegaudio) -+set(mp3adufloat_decoder_select mpegaudio) -+set(mp3float_decoder_select mpegaudio) -+set(mp3on4_decoder_select mpegaudio) -+set(mp3on4float_decoder_select mpegaudio) -+set(mpc7_decoder_select bswapdsp mpegaudiodsp) -+set(mpc8_decoder_select mpegaudiodsp) -+set(mpegvideo_decoder_select mpegvideo) -+set(mpeg1video_decoder_select mpegvideo) -+set(mpeg1video_encoder_select mpegvideoenc h263dsp) -+set(mpeg2video_decoder_select mpegvideo) -+set(mpeg2video_encoder_select mpegvideoenc h263dsp) -+set(mpeg4_decoder_select h263_decoder mpeg4video_parser) -+set(mpeg4_encoder_select h263_encoder) -+set(msa1_decoder_select mss34dsp) -+set(mscc_decoder_deps zlib) -+set(msmpeg4v1_decoder_select h263_decoder) -+set(msmpeg4v2_decoder_select h263_decoder) -+set(msmpeg4v2_encoder_select h263_encoder) -+set(msmpeg4v3_decoder_select h263_decoder) -+set(msmpeg4v3_encoder_select h263_encoder) -+set(mss2_decoder_select mpegvideo qpeldsp vc1_decoder) -+set(mts2_decoder_select mss34dsp) -+set(mv30_decoder_select aandcttables blockdsp) -+set(mvha_decoder_deps zlib) -+set(mvha_decoder_select llviddsp) -+set(mwsc_decoder_deps zlib) -+set(mxpeg_decoder_select mjpeg_decoder) -+set(nellymoser_decoder_select mdct sinewin) -+set(nellymoser_encoder_select audio_frame_queue mdct sinewin) -+set(notchlc_decoder_select lzf) -+set(nuv_decoder_select idctdsp lzo) -+set(on2avc_decoder_select mdct) -+set(opus_decoder_deps swresample) -+set(opus_decoder_select mdct15) -+set(opus_encoder_select audio_frame_queue mdct15) -+set(png_decoder_deps zlib) -+set(png_encoder_deps zlib) -+set(png_encoder_select llvidencdsp) -+set(prores_decoder_select blockdsp idctdsp) -+set(prores_encoder_select fdctdsp) -+set(qcelp_decoder_select lsp) -+set(qdm2_decoder_select mdct rdft mpegaudiodsp) -+set(ra_144_decoder_select audiodsp) -+set(ra_144_encoder_select audio_frame_queue lpc audiodsp) -+set(ralf_decoder_select golomb) -+set(rasc_decoder_deps zlib) -+set(rawvideo_decoder_select bswapdsp) -+set(rscc_decoder_deps zlib) -+set(rtjpeg_decoder_select me_cmp) -+set(rv10_decoder_select h263_decoder) -+set(rv10_encoder_select h263_encoder) -+set(rv20_decoder_select h263_decoder) -+set(rv20_encoder_select h263_encoder) -+set(rv30_decoder_select golomb h264pred h264qpel mpegvideo rv34dsp) -+set(rv40_decoder_select golomb h264pred h264qpel mpegvideo rv34dsp) -+set(screenpresso_decoder_deps zlib) -+set(shorten_decoder_select bswapdsp) -+set(sipr_decoder_select lsp) -+set(snow_decoder_select dwt h264qpel hpeldsp me_cmp rangecoder videodsp) -+set(snow_encoder_select dwt h264qpel hpeldsp me_cmp mpegvideoenc rangecoder) -+set(sonic_decoder_select golomb rangecoder) -+set(sonic_encoder_select golomb rangecoder) -+set(sonic_ls_encoder_select golomb rangecoder) -+set(sp5x_decoder_select mjpeg_decoder) -+set(speedhq_decoder_select mpegvideo) -+set(srgc_decoder_deps zlib) -+set(svq1_decoder_select hpeldsp) -+set(svq1_encoder_select hpeldsp me_cmp mpegvideoenc) -+set(svq3_decoder_select golomb h264dsp h264parse h264pred hpeldsp tpeldsp videodsp) -+set(svq3_decoder_suggest zlib) -+set(tak_decoder_select audiodsp) -+set(tdsc_decoder_deps zlib) -+set(tdsc_decoder_select mjpeg_decoder) -+set(theora_decoder_select vp3_decoder) -+set(thp_decoder_select mjpeg_decoder) -+set(tiff_decoder_select mjpeg_decoder) -+set(tiff_decoder_suggest zlib lzma) -+set(tiff_encoder_suggest zlib) -+set(truehd_decoder_select mlp_parser) -+set(truehd_encoder_select lpc audio_frame_queue) -+set(truemotion2_decoder_select bswapdsp) -+set(truespeech_decoder_select bswapdsp) -+set(tscc_decoder_deps zlib) -+set(twinvq_decoder_select mdct lsp sinewin) -+set(txd_decoder_select texturedsp) -+set(utvideo_decoder_select bswapdsp llviddsp) -+set(utvideo_encoder_select bswapdsp huffman llvidencdsp) -+set(vble_decoder_select llviddsp) -+set(vc1_decoder_select blockdsp h263_decoder h264qpel intrax8 mpegvideo vc1dsp) -+set(vc1image_decoder_select vc1_decoder) -+set(vorbis_decoder_select mdct) -+set(vorbis_encoder_select audio_frame_queue mdct) -+set(vp3_decoder_select hpeldsp vp3dsp videodsp) -+set(vp4_decoder_select vp3_decoder) -+set(vp5_decoder_select h264chroma hpeldsp videodsp vp3dsp vp56dsp) -+set(vp6_decoder_select h264chroma hpeldsp huffman videodsp vp3dsp vp56dsp) -+set(vp6a_decoder_select vp6_decoder) -+set(vp6f_decoder_select vp6_decoder) -+set(vp7_decoder_select h264pred videodsp vp8dsp) -+set(vp8_decoder_select h264pred videodsp vp8dsp) -+set(vp9_decoder_select videodsp vp9_parser vp9_superframe_split_bsf) -+set(wcmv_decoder_deps zlib) -+set(webp_decoder_select vp8_decoder exif) -+set(wmalossless_decoder_select llauddsp) -+set(wmapro_decoder_select mdct sinewin wma_freqs) -+set(wmav1_decoder_select mdct sinewin wma_freqs) -+set(wmav1_encoder_select mdct sinewin wma_freqs) -+set(wmav2_decoder_select mdct sinewin wma_freqs) -+set(wmav2_encoder_select mdct sinewin wma_freqs) -+set(wmavoice_decoder_select lsp rdft dct mdct sinewin) -+set(wmv1_decoder_select h263_decoder) -+set(wmv1_encoder_select h263_encoder) -+set(wmv2_decoder_select blockdsp error_resilience h263_decoder idctdsp intrax8 videodsp wmv2dsp) -+set(wmv2_encoder_select h263_encoder wmv2dsp) -+set(wmv3_decoder_select vc1_decoder) -+set(wmv3image_decoder_select wmv3_decoder) -+set(xma1_decoder_select wmapro_decoder) -+set(xma2_decoder_select wmapro_decoder) -+set(ylc_decoder_select bswapdsp) -+set(zerocodec_decoder_deps zlib) -+set(zlib_decoder_deps zlib) -+set(zlib_encoder_deps zlib) -+set(zmbv_decoder_deps zlib) -+set(zmbv_encoder_deps zlib) -+# hardware accelerators -+set(crystalhd_deps libcrystalhd_libcrystalhd_if_h) -+set(cuda_deps ffnvcodec) -+set(cuvid_deps ffnvcodec) -+set(d3d11va_deps dxva_h ID3D11VideoDecoder ID3D11VideoContext) -+set(dxva2_deps dxva2api_h DXVA2_ConfigPictureDecode ole32 user32) -+set(ffnvcodec_deps_any libdl LoadLibrary) -+set(nvdec_deps ffnvcodec) -+set(vaapi_x11_deps xlib) -+set(videotoolbox_hwaccel_deps videotoolbox pthreads) -+set(videotoolbox_hwaccel_extralibs -framework QuartzCore) -+set(xvmc_deps X11_extensions_XvMClib_h) -+### -+set(h263_vaapi_hwaccel_deps vaapi) -+set(h263_vaapi_hwaccel_select h263_decoder) -+set(h263_videotoolbox_hwaccel_deps videotoolbox) -+set(h263_videotoolbox_hwaccel_select h263_decoder) -+set(h264_d3d11va_hwaccel_deps d3d11va) -+set(h264_d3d11va_hwaccel_select h264_decoder) -+set(h264_d3d11va2_hwaccel_deps d3d11va) -+set(h264_d3d11va2_hwaccel_select h264_decoder) -+set(h264_dxva2_hwaccel_deps dxva2) -+set(h264_dxva2_hwaccel_select h264_decoder) -+set(h264_nvdec_hwaccel_deps nvdec) -+set(h264_nvdec_hwaccel_select h264_decoder) -+set(h264_vaapi_hwaccel_deps vaapi) -+set(h264_vaapi_hwaccel_select h264_decoder) -+set(h264_vdpau_hwaccel_deps vdpau) -+set(h264_vdpau_hwaccel_select h264_decoder) -+set(h264_videotoolbox_hwaccel_deps videotoolbox) -+set(h264_videotoolbox_hwaccel_select h264_decoder) -+set(hevc_d3d11va_hwaccel_deps d3d11va DXVA_PicParams_HEVC) -+set(hevc_d3d11va_hwaccel_select hevc_decoder) -+set(hevc_d3d11va2_hwaccel_deps d3d11va DXVA_PicParams_HEVC) -+set(hevc_d3d11va2_hwaccel_select hevc_decoder) -+set(hevc_dxva2_hwaccel_deps dxva2 DXVA_PicParams_HEVC) -+set(hevc_dxva2_hwaccel_select hevc_decoder) -+set(hevc_nvdec_hwaccel_deps nvdec) -+set(hevc_nvdec_hwaccel_select hevc_decoder) -+set(hevc_vaapi_hwaccel_deps vaapi VAPictureParameterBufferHEVC) -+set(hevc_vaapi_hwaccel_select hevc_decoder) -+set(hevc_vdpau_hwaccel_deps vdpau VdpPictureInfoHEVC) -+set(hevc_vdpau_hwaccel_select hevc_decoder) -+set(hevc_videotoolbox_hwaccel_deps videotoolbox) -+set(hevc_videotoolbox_hwaccel_select hevc_decoder) -+set(mjpeg_nvdec_hwaccel_deps nvdec) -+set(mjpeg_nvdec_hwaccel_select mjpeg_decoder) -+set(mjpeg_vaapi_hwaccel_deps vaapi) -+set(mjpeg_vaapi_hwaccel_select mjpeg_decoder) -+set(mpeg_xvmc_hwaccel_deps xvmc) -+set(mpeg_xvmc_hwaccel_select mpeg2video_decoder) -+set(mpeg1_nvdec_hwaccel_deps nvdec) -+set(mpeg1_nvdec_hwaccel_select mpeg1video_decoder) -+set(mpeg1_vdpau_hwaccel_deps vdpau) -+set(mpeg1_vdpau_hwaccel_select mpeg1video_decoder) -+set(mpeg1_videotoolbox_hwaccel_deps videotoolbox) -+set(mpeg1_videotoolbox_hwaccel_select mpeg1video_decoder) -+set(mpeg1_xvmc_hwaccel_deps xvmc) -+set(mpeg1_xvmc_hwaccel_select mpeg1video_decoder) -+set(mpeg2_d3d11va_hwaccel_deps d3d11va) -+set(mpeg2_d3d11va_hwaccel_select mpeg2video_decoder) -+set(mpeg2_d3d11va2_hwaccel_deps d3d11va) -+set(mpeg2_d3d11va2_hwaccel_select mpeg2video_decoder) -+set(mpeg2_dxva2_hwaccel_deps dxva2) -+set(mpeg2_dxva2_hwaccel_select mpeg2video_decoder) -+set(mpeg2_nvdec_hwaccel_deps nvdec) -+set(mpeg2_nvdec_hwaccel_select mpeg2video_decoder) -+set(mpeg2_vaapi_hwaccel_deps vaapi) -+set(mpeg2_vaapi_hwaccel_select mpeg2video_decoder) -+set(mpeg2_vdpau_hwaccel_deps vdpau) -+set(mpeg2_vdpau_hwaccel_select mpeg2video_decoder) -+set(mpeg2_videotoolbox_hwaccel_deps videotoolbox) -+set(mpeg2_videotoolbox_hwaccel_select mpeg2video_decoder) -+set(mpeg2_xvmc_hwaccel_deps xvmc) -+set(mpeg2_xvmc_hwaccel_select mpeg2video_decoder) -+set(mpeg4_nvdec_hwaccel_deps nvdec) -+set(mpeg4_nvdec_hwaccel_select mpeg4_decoder) -+set(mpeg4_vaapi_hwaccel_deps vaapi) -+set(mpeg4_vaapi_hwaccel_select mpeg4_decoder) -+set(mpeg4_vdpau_hwaccel_deps vdpau) -+set(mpeg4_vdpau_hwaccel_select mpeg4_decoder) -+set(mpeg4_videotoolbox_hwaccel_deps videotoolbox) -+set(mpeg4_videotoolbox_hwaccel_select mpeg4_decoder) -+set(vc1_d3d11va_hwaccel_deps d3d11va) -+set(vc1_d3d11va_hwaccel_select vc1_decoder) -+set(vc1_d3d11va2_hwaccel_deps d3d11va) -+set(vc1_d3d11va2_hwaccel_select vc1_decoder) -+set(vc1_dxva2_hwaccel_deps dxva2) -+set(vc1_dxva2_hwaccel_select vc1_decoder) -+set(vc1_nvdec_hwaccel_deps nvdec) -+set(vc1_nvdec_hwaccel_select vc1_decoder) -+set(vc1_vaapi_hwaccel_deps vaapi) -+set(vc1_vaapi_hwaccel_select vc1_decoder) -+set(vc1_vdpau_hwaccel_deps vdpau) -+set(vc1_vdpau_hwaccel_select vc1_decoder) -+set(vp8_nvdec_hwaccel_deps nvdec) -+set(vp8_nvdec_hwaccel_select vp8_decoder) -+set(vp8_vaapi_hwaccel_deps vaapi) -+set(vp8_vaapi_hwaccel_select vp8_decoder) -+set(vp9_d3d11va_hwaccel_deps d3d11va DXVA_PicParams_VP9) -+set(vp9_d3d11va_hwaccel_select vp9_decoder) -+set(vp9_d3d11va2_hwaccel_deps d3d11va DXVA_PicParams_VP9) -+set(vp9_d3d11va2_hwaccel_select vp9_decoder) -+set(vp9_dxva2_hwaccel_deps dxva2 DXVA_PicParams_VP9) -+set(vp9_dxva2_hwaccel_select vp9_decoder) -+set(vp9_nvdec_hwaccel_deps nvdec) -+set(vp9_nvdec_hwaccel_select vp9_decoder) -+set(vp9_vaapi_hwaccel_deps vaapi VADecPictureParameterBufferVP9_bit_depth) -+set(vp9_vaapi_hwaccel_select vp9_decoder) -+set(vp9_vdpau_hwaccel_deps vdpau VdpPictureInfoVP9) -+set(vp9_vdpau_hwaccel_select vp9_decoder) -+set(wmv3_d3d11va_hwaccel_select vc1_d3d11va_hwaccel) -+set(wmv3_d3d11va2_hwaccel_select vc1_d3d11va2_hwaccel) -+set(wmv3_dxva2_hwaccel_select vc1_dxva2_hwaccel) -+set(wmv3_nvdec_hwaccel_select vc1_nvdec_hwaccel) -+set(wmv3_vaapi_hwaccel_select vc1_vaapi_hwaccel) -+set(wmv3_vdpau_hwaccel_select vc1_vdpau_hwaccel) -+# hardware-accelerated codecs -+set(mediafoundation_deps mftransform_h MFCreateAlignedMemoryBuffer) -+set(mediafoundation_extralibs -lmfplat -lmfuuid -lole32 -lstrmiids) -+set(omx_deps libdl pthreads) -+set(omx_rpi_select omx) -+set(qsv_deps libmfx) -+set(qsvdec_select qsv) -+set(qsvenc_select qsv) -+set(qsvvpp_select qsv) -+set(vaapi_encode_deps vaapi) -+set(v4l2_m2m_deps linux_videodev2_h sem_timedwait) -+### -+set(hwupload_cuda_filter_deps ffnvcodec) -+set(scale_npp_filter_deps ffnvcodec libnpp) -+set(scale_cuda_filter_deps ffnvcodec) -+set(scale_cuda_filter_deps_any cuda_nvcc cuda_llvm) -+set(thumbnail_cuda_filter_deps ffnvcodec) -+set(thumbnail_cuda_filter_deps_any cuda_nvcc cuda_llvm) -+set(transpose_npp_filter_deps ffnvcodec libnpp) -+set(overlay_cuda_filter_deps ffnvcodec) -+set(overlay_cuda_filter_deps_any cuda_nvcc cuda_llvm) -+### -+set(amf_deps_any libdl LoadLibrary) -+set(nvenc_deps ffnvcodec) -+set(nvenc_deps_any libdl LoadLibrary) -+set(nvenc_encoder_deps nvenc) -+### -+set(aac_mf_encoder_deps mediafoundation) -+set(ac3_mf_encoder_deps mediafoundation) -+set(h263_v4l2m2m_decoder_deps v4l2_m2m h263_v4l2_m2m) -+set(h263_v4l2m2m_encoder_deps v4l2_m2m h263_v4l2_m2m) -+set(h264_amf_encoder_deps amf) -+set(h264_crystalhd_decoder_select crystalhd h264_mp4toannexb_bsf h264_parser) -+set(h264_cuvid_decoder_deps cuvid) -+set(h264_cuvid_decoder_select h264_mp4toannexb_bsf) -+set(h264_mediacodec_decoder_deps mediacodec) -+set(h264_mediacodec_decoder_select h264_mp4toannexb_bsf h264_parser) -+set(h264_mf_encoder_deps mediafoundation) -+set(h264_mmal_decoder_deps mmal) -+set(h264_nvenc_encoder_deps nvenc) -+set(h264_omx_encoder_deps omx) -+set(h264_qsv_decoder_select h264_mp4toannexb_bsf qsvdec) -+set(h264_qsv_encoder_select qsvenc) -+set(h264_rkmpp_decoder_deps rkmpp) -+set(h264_rkmpp_decoder_select h264_mp4toannexb_bsf) -+set(h264_vaapi_encoder_select cbs_h264 vaapi_encode) -+set(h264_v4l2m2m_decoder_deps v4l2_m2m h264_v4l2_m2m) -+set(h264_v4l2m2m_decoder_select h264_mp4toannexb_bsf) -+set(h264_v4l2m2m_encoder_deps v4l2_m2m h264_v4l2_m2m) -+set(hevc_amf_encoder_deps amf) -+set(hevc_cuvid_decoder_deps cuvid) -+set(hevc_cuvid_decoder_select hevc_mp4toannexb_bsf) -+set(hevc_mediacodec_decoder_deps mediacodec) -+set(hevc_mediacodec_decoder_select hevc_mp4toannexb_bsf hevc_parser) -+set(hevc_mf_encoder_deps mediafoundation) -+set(hevc_nvenc_encoder_deps nvenc) -+set(hevc_qsv_decoder_select hevc_mp4toannexb_bsf qsvdec) -+set(hevc_qsv_encoder_select hevcparse qsvenc) -+set(hevc_rkmpp_decoder_deps rkmpp) -+set(hevc_rkmpp_decoder_select hevc_mp4toannexb_bsf) -+set(hevc_vaapi_encoder_deps VAEncPictureParameterBufferHEVC) -+set(hevc_vaapi_encoder_select cbs_h265 vaapi_encode) -+set(hevc_v4l2m2m_decoder_deps v4l2_m2m hevc_v4l2_m2m) -+set(hevc_v4l2m2m_decoder_select hevc_mp4toannexb_bsf) -+set(hevc_v4l2m2m_encoder_deps v4l2_m2m hevc_v4l2_m2m) -+set(mjpeg_cuvid_decoder_deps cuvid) -+set(mjpeg_qsv_decoder_select qsvdec) -+set(mjpeg_qsv_encoder_deps libmfx) -+set(mjpeg_qsv_encoder_select qsvenc) -+set(mjpeg_vaapi_encoder_deps VAEncPictureParameterBufferJPEG) -+set(mjpeg_vaapi_encoder_select cbs_jpeg jpegtables vaapi_encode) -+set(mp3_mf_encoder_deps mediafoundation) -+set(mpeg1_cuvid_decoder_deps cuvid) -+set(mpeg1_v4l2m2m_decoder_deps v4l2_m2m mpeg1_v4l2_m2m) -+set(mpeg2_crystalhd_decoder_select crystalhd) -+set(mpeg2_cuvid_decoder_deps cuvid) -+set(mpeg2_mmal_decoder_deps mmal) -+set(mpeg2_mediacodec_decoder_deps mediacodec) -+set(mpeg2_qsv_decoder_select qsvdec) -+set(mpeg2_qsv_encoder_select qsvenc) -+set(mpeg2_vaapi_encoder_select cbs_mpeg2 vaapi_encode) -+set(mpeg2_v4l2m2m_decoder_deps v4l2_m2m mpeg2_v4l2_m2m) -+set(mpeg4_crystalhd_decoder_select crystalhd) -+set(mpeg4_cuvid_decoder_deps cuvid) -+set(mpeg4_mediacodec_decoder_deps mediacodec) -+set(mpeg4_mmal_decoder_deps mmal) -+set(mpeg4_omx_encoder_deps omx) -+set(mpeg4_v4l2m2m_decoder_deps v4l2_m2m mpeg4_v4l2_m2m) -+set(mpeg4_v4l2m2m_encoder_deps v4l2_m2m mpeg4_v4l2_m2m) -+set(msmpeg4_crystalhd_decoder_select crystalhd) -+set(nvenc_h264_encoder_select h264_nvenc_encoder) -+set(nvenc_hevc_encoder_select hevc_nvenc_encoder) -+set(vc1_crystalhd_decoder_select crystalhd) -+set(vc1_cuvid_decoder_deps cuvid) -+set(vc1_mmal_decoder_deps mmal) -+set(vc1_qsv_decoder_select qsvdec) -+set(vc1_v4l2m2m_decoder_deps v4l2_m2m vc1_v4l2_m2m) -+set(vp8_cuvid_decoder_deps cuvid) -+set(vp8_mediacodec_decoder_deps mediacodec) -+set(vp8_qsv_decoder_select qsvdec) -+set(vp8_rkmpp_decoder_deps rkmpp) -+set(vp8_vaapi_encoder_deps VAEncPictureParameterBufferVP8) -+set(vp8_vaapi_encoder_select vaapi_encode) -+set(vp8_v4l2m2m_decoder_deps v4l2_m2m vp8_v4l2_m2m) -+set(vp8_v4l2m2m_encoder_deps v4l2_m2m vp8_v4l2_m2m) -+set(vp9_cuvid_decoder_deps cuvid) -+set(vp9_mediacodec_decoder_deps mediacodec) -+set(vp9_qsv_decoder_select qsvdec) -+set(vp9_rkmpp_decoder_deps rkmpp) -+set(vp9_vaapi_encoder_deps VAEncPictureParameterBufferVP9) -+set(vp9_vaapi_encoder_select vaapi_encode) -+set(vp9_qsv_encoder_deps libmfx MFX_CODEC_VP9) -+set(vp9_qsv_encoder_select qsvenc) -+set(vp9_v4l2m2m_decoder_deps v4l2_m2m vp9_v4l2_m2m) -+set(wmv3_crystalhd_decoder_select crystalhd) -+# parsers -+set(aac_parser_select adts_header) -+set(av1_parser_select cbs_av1) -+set(h264_parser_select golomb h264dsp h264parse) -+set(hevc_parser_select hevcparse) -+set(mpegaudio_parser_select mpegaudioheader) -+set(mpegvideo_parser_select mpegvideo) -+set(mpeg4video_parser_select h263dsp mpegvideo qpeldsp) -+set(vc1_parser_select vc1dsp) -+# bitstream_filters -+set(aac_adtstoasc_bsf_select adts_header) -+set(av1_frame_merge_bsf_select cbs_av1) -+set(av1_frame_split_bsf_select cbs_av1) -+set(av1_metadata_bsf_select cbs_av1) -+set(eac3_core_bsf_select ac3_parser) -+set(filter_units_bsf_select cbs) -+set(h264_metadata_bsf_deps const_nan) -+set(h264_metadata_bsf_select cbs_h264) -+set(h264_redundant_pps_bsf_select cbs_h264) -+set(hevc_metadata_bsf_select cbs_h265) -+set(mjpeg2jpeg_bsf_select jpegtables) -+set(mpeg2_metadata_bsf_select cbs_mpeg2) -+set(trace_headers_bsf_select cbs) -+set(vp9_metadata_bsf_select cbs_vp9) -+# external libraries -+set(aac_at_decoder_deps audiotoolbox) -+set(aac_at_decoder_select aac_adtstoasc_bsf) -+set(ac3_at_decoder_deps audiotoolbox) -+set(ac3_at_decoder_select ac3_parser) -+set(adpcm_ima_qt_at_decoder_deps audiotoolbox) -+set(alac_at_decoder_deps audiotoolbox) -+set(amr_nb_at_decoder_deps audiotoolbox) -+set(avisynth_deps_any libdl LoadLibrary) -+set(avisynth_demuxer_deps avisynth) -+set(avisynth_demuxer_select riffdec) -+set(eac3_at_decoder_deps audiotoolbox) -+set(eac3_at_decoder_select ac3_parser) -+set(gsm_ms_at_decoder_deps audiotoolbox) -+set(ilbc_at_decoder_deps audiotoolbox) -+set(mp1_at_decoder_deps audiotoolbox) -+set(mp2_at_decoder_deps audiotoolbox) -+set(mp3_at_decoder_deps audiotoolbox) -+set(mp1_at_decoder_select mpegaudioheader) -+set(mp2_at_decoder_select mpegaudioheader) -+set(mp3_at_decoder_select mpegaudioheader) -+set(pcm_alaw_at_decoder_deps audiotoolbox) -+set(pcm_mulaw_at_decoder_deps audiotoolbox) -+set(qdmc_decoder_select fft) -+set(qdmc_at_decoder_deps audiotoolbox) -+set(qdm2_at_decoder_deps audiotoolbox) -+set(aac_at_encoder_deps audiotoolbox) -+set(aac_at_encoder_select audio_frame_queue) -+set(alac_at_encoder_deps audiotoolbox) -+set(alac_at_encoder_select audio_frame_queue) -+set(ilbc_at_encoder_deps audiotoolbox) -+set(ilbc_at_encoder_select audio_frame_queue) -+set(pcm_alaw_at_encoder_deps audiotoolbox) -+set(pcm_alaw_at_encoder_select audio_frame_queue) -+set(pcm_mulaw_at_encoder_deps audiotoolbox) -+set(pcm_mulaw_at_encoder_select audio_frame_queue) -+set(chromaprint_muxer_deps chromaprint) -+set(h264_videotoolbox_encoder_deps pthreads) -+set(h264_videotoolbox_encoder_select videotoolbox_encoder) -+set(hevc_videotoolbox_encoder_deps pthreads) -+set(hevc_videotoolbox_encoder_select videotoolbox_encoder) -+set(libaom_av1_decoder_deps libaom) -+set(libaom_av1_encoder_deps libaom) -+set(libaom_av1_encoder_select extract_extradata_bsf) -+set(libaribb24_decoder_deps libaribb24) -+set(libcelt_decoder_deps libcelt) -+set(libcodec2_decoder_deps libcodec2) -+set(libcodec2_encoder_deps libcodec2) -+set(libdav1d_decoder_deps libdav1d) -+set(libdavs2_decoder_deps libdavs2) -+set(libfdk_aac_decoder_deps libfdk_aac) -+set(libfdk_aac_encoder_deps libfdk_aac) -+set(libfdk_aac_encoder_select audio_frame_queue) -+set(libgme_demuxer_deps libgme) -+set(libgsm_decoder_deps libgsm) -+set(libgsm_encoder_deps libgsm) -+set(libgsm_ms_decoder_deps libgsm) -+set(libgsm_ms_encoder_deps libgsm) -+set(libilbc_decoder_deps libilbc) -+set(libilbc_encoder_deps libilbc) -+set(libkvazaar_encoder_deps libkvazaar) -+set(libmodplug_demuxer_deps libmodplug) -+set(libmp3lame_encoder_deps libmp3lame) -+set(libmp3lame_encoder_select audio_frame_queue mpegaudioheader) -+set(libopencore_amrnb_decoder_deps libopencore_amrnb) -+set(libopencore_amrnb_encoder_deps libopencore_amrnb) -+set(libopencore_amrnb_encoder_select audio_frame_queue) -+set(libopencore_amrwb_decoder_deps libopencore_amrwb) -+set(libopenh264_decoder_deps libopenh264) -+set(libopenh264_decoder_select h264_mp4toannexb_bsf) -+set(libopenh264_encoder_deps libopenh264) -+set(libopenjpeg_decoder_deps libopenjpeg) -+set(libopenjpeg_encoder_deps libopenjpeg) -+set(libopenmpt_demuxer_deps libopenmpt) -+set(libopus_decoder_deps libopus) -+set(libopus_encoder_deps libopus) -+set(libopus_encoder_select audio_frame_queue) -+set(librav1e_encoder_deps librav1e) -+set(librav1e_encoder_select extract_extradata_bsf) -+set(librsvg_decoder_deps librsvg) -+set(libshine_encoder_deps libshine) -+set(libshine_encoder_select audio_frame_queue) -+set(libspeex_decoder_deps libspeex) -+set(libspeex_encoder_deps libspeex) -+set(libspeex_encoder_select audio_frame_queue) -+set(libtheora_encoder_deps libtheora) -+set(libtwolame_encoder_deps libtwolame) -+set(libvo_amrwbenc_encoder_deps libvo_amrwbenc) -+set(libvorbis_decoder_deps libvorbis) -+set(libvorbis_encoder_deps libvorbis libvorbisenc) -+set(libvorbis_encoder_select audio_frame_queue) -+set(libvpx_vp8_decoder_deps libvpx) -+set(libvpx_vp8_encoder_deps libvpx) -+set(libvpx_vp9_decoder_deps libvpx) -+set(libvpx_vp9_encoder_deps libvpx) -+set(libwavpack_encoder_deps libwavpack) -+set(libwavpack_encoder_select audio_frame_queue) -+set(libwebp_encoder_deps libwebp) -+set(libwebp_anim_encoder_deps libwebp) -+set(libx262_encoder_deps libx262) -+set(libx264_encoder_deps libx264) -+set(libx264rgb_encoder_deps libx264 x264_csp_bgr) -+set(libx264rgb_encoder_select libx264_encoder) -+set(libx265_encoder_deps libx265) -+set(libxavs_encoder_deps libxavs) -+set(libxavs2_encoder_deps libxavs2) -+set(libxvid_encoder_deps libxvid) -+set(libzvbi_teletext_decoder_deps libzvbi) -+set(vapoursynth_demuxer_deps vapoursynth) -+set(videotoolbox_suggest coreservices) -+set(videotoolbox_deps corefoundation coremedia corevideo) -+set(videotoolbox_encoder_deps videotoolbox VTCompressionSessionPrepareToEncodeFrames) -+# demuxers / muxers -+set(ac3_demuxer_select ac3_parser) -+set(act_demuxer_select riffdec) -+set(aiff_muxer_select iso_media) -+set(asf_demuxer_select riffdec) -+set(asf_o_demuxer_select riffdec) -+set(asf_muxer_select riffenc) -+set(asf_stream_muxer_select asf_muxer) -+set(av1_demuxer_select av1_frame_merge_bsf av1_parser) -+set(avi_demuxer_select iso_media riffdec exif) -+set(avi_muxer_select riffenc) -+set(caf_demuxer_select iso_media riffdec) -+set(caf_muxer_select iso_media) -+set(dash_muxer_select mp4_muxer) -+set(dash_demuxer_deps libxml2) -+set(dirac_demuxer_select dirac_parser) -+set(dts_demuxer_select dca_parser) -+set(dtshd_demuxer_select dca_parser) -+set(dv_demuxer_select dvprofile) -+set(dv_muxer_select dvprofile) -+set(dxa_demuxer_select riffdec) -+set(eac3_demuxer_select ac3_parser) -+set(f4v_muxer_select mov_muxer) -+set(fifo_muxer_deps threads) -+set(flac_demuxer_select flac_parser) -+set(flv_muxer_select aac_adtstoasc_bsf) -+set(gxf_muxer_select pcm_rechunk_bsf) -+set(hds_muxer_select flv_muxer) -+set(hls_muxer_select mpegts_muxer) -+set(hls_muxer_suggest gcrypt openssl) -+set(image2_alias_pix_demuxer_select image2_demuxer) -+set(image2_brender_pix_demuxer_select image2_demuxer) -+set(ipod_muxer_select mov_muxer) -+set(ismv_muxer_select mov_muxer) -+set(ivf_muxer_select av1_metadata_bsf vp9_superframe_bsf) -+set(latm_muxer_select aac_adtstoasc_bsf) -+set(matroska_audio_muxer_select matroska_muxer) -+set(matroska_demuxer_select iso_media riffdec) -+set(matroska_demuxer_suggest bzlib lzo zlib) -+set(matroska_muxer_select iso_media riffenc vp9_superframe_bsf aac_adtstoasc_bsf) -+set(mlp_demuxer_select mlp_parser) -+set(mmf_muxer_select riffenc) -+set(mov_demuxer_select iso_media riffdec) -+set(mov_demuxer_suggest zlib) -+set(mov_muxer_select iso_media riffenc rtpenc_chain vp9_superframe_bsf aac_adtstoasc_bsf) -+set(mp3_demuxer_select mpegaudio_parser) -+set(mp3_muxer_select mpegaudioheader) -+set(mp4_muxer_select mov_muxer) -+set(mpegts_demuxer_select iso_media) -+set(mpegts_muxer_select adts_muxer latm_muxer h264_mp4toannexb_bsf hevc_mp4toannexb_bsf) -+set(mpegtsraw_demuxer_select mpegts_demuxer) -+set(mxf_muxer_select golomb pcm_rechunk_bsf) -+set(mxf_d10_muxer_select mxf_muxer) -+set(mxf_opatom_muxer_select mxf_muxer) -+set(nut_muxer_select riffenc) -+set(nuv_demuxer_select riffdec) -+set(oga_muxer_select ogg_muxer) -+set(ogg_demuxer_select dirac_parse) -+set(ogv_muxer_select ogg_muxer) -+set(opus_muxer_select ogg_muxer) -+set(psp_muxer_select mov_muxer) -+set(rtp_demuxer_select sdp_demuxer) -+set(rtp_muxer_select golomb jpegtables) -+set(rtpdec_select asf_demuxer jpegtables mov_demuxer mpegts_demuxer rm_demuxer rtp_protocol srtp) -+set(rtsp_demuxer_select http_protocol rtpdec) -+set(rtsp_muxer_select rtp_muxer http_protocol rtp_protocol rtpenc_chain) -+set(sap_demuxer_select sdp_demuxer) -+set(sap_muxer_select rtp_muxer rtp_protocol rtpenc_chain) -+set(sdp_demuxer_select rtpdec) -+set(smoothstreaming_muxer_select ismv_muxer) -+set(spdif_demuxer_select adts_header) -+set(spdif_muxer_select adts_header) -+set(spx_muxer_select ogg_muxer) -+set(swf_demuxer_suggest zlib) -+set(tak_demuxer_select tak_parser) -+set(truehd_demuxer_select mlp_parser) -+set(tg2_muxer_select mov_muxer) -+set(tgp_muxer_select mov_muxer) -+set(vobsub_demuxer_select mpegps_demuxer) -+set(w64_demuxer_select wav_demuxer) -+set(w64_muxer_select wav_muxer) -+set(wav_demuxer_select riffdec) -+set(wav_muxer_select riffenc) -+set(webm_chunk_muxer_select webm_muxer) -+set(webm_muxer_select iso_media riffenc) -+set(webm_dash_manifest_demuxer_select matroska_demuxer) -+set(wtv_demuxer_select mpegts_demuxer riffdec) -+set(wtv_muxer_select mpegts_muxer riffenc) -+set(xmv_demuxer_select riffdec) -+set(xwma_demuxer_select riffdec) -+# indevs / outdevs -+set(android_camera_indev_deps android camera2ndk mediandk pthreads) -+set(android_camera_indev_extralibs -landroid -lcamera2ndk -lmediandk) -+set(alsa_indev_deps alsa) -+set(alsa_outdev_deps alsa) -+set(avfoundation_indev_deps avfoundation corevideo coremedia pthreads) -+set(avfoundation_indev_suggest coregraphics applicationservices) -+set(avfoundation_indev_extralibs -framework Foundation) -+set(bktr_indev_deps_any dev_bktr_ioctl_bt848_h machine_ioctl_bt848_h dev_video_bktr_ioctl_bt848_h dev_ic_bt8xx_h) -+set(caca_outdev_deps libcaca) -+set(decklink_deps_any libdl LoadLibrary) -+set(decklink_indev_deps decklink threads) -+set(decklink_indev_extralibs -lstdc++) -+set(decklink_outdev_deps decklink threads) -+set(decklink_outdev_suggest libklvanc) -+set(decklink_outdev_extralibs -lstdc++) -+set(dshow_indev_deps IBaseFilter) -+set(dshow_indev_extralibs -lpsapi -lole32 -lstrmiids -luuid -loleaut32 -lshlwapi) -+set(fbdev_indev_deps linux_fb_h) -+set(fbdev_outdev_deps linux_fb_h) -+set(gdigrab_indev_deps CreateDIBSection) -+set(gdigrab_indev_extralibs -lgdi32) -+set(gdigrab_indev_select bmp_decoder) -+set(iec61883_indev_deps libiec61883) -+set(jack_indev_deps libjack) -+set(jack_indev_deps_any sem_timedwait dispatch_dispatch_h) -+set(kmsgrab_indev_deps libdrm) -+set(lavfi_indev_deps avfilter) -+set(libcdio_indev_deps libcdio) -+set(libdc1394_indev_deps libdc1394) -+set(openal_indev_deps openal) -+set(opengl_outdev_deps opengl) -+set(opengl_outdev_suggest sdl2) -+set(oss_indev_deps_any sys_soundcard_h) -+set(oss_outdev_deps_any sys_soundcard_h) -+set(pulse_indev_deps libpulse) -+set(pulse_outdev_deps libpulse) -+set(sdl2_outdev_deps sdl2) -+set(sndio_indev_deps sndio) -+set(sndio_outdev_deps sndio) -+set(v4l2_indev_deps_any linux_videodev2_h sys_videoio_h) -+set(v4l2_indev_suggest libv4l2) -+set(v4l2_outdev_deps_any linux_videodev2_h sys_videoio_h) -+set(v4l2_outdev_suggest libv4l2) -+set(vfwcap_indev_deps vfw32 vfwcap_defines) -+set(xcbgrab_indev_deps libxcb) -+set(xcbgrab_indev_suggest libxcb_shm libxcb_shape libxcb_xfixes) -+set(xv_outdev_deps xlib) -+# protocols -+set(async_protocol_deps threads) -+set(bluray_protocol_deps libbluray) -+set(ffrtmpcrypt_protocol_conflict librtmp_protocol) -+set(ffrtmpcrypt_protocol_deps_any gcrypt gmp openssl mbedtls) -+set(ffrtmpcrypt_protocol_select tcp_protocol) -+set(ffrtmphttp_protocol_conflict librtmp_protocol) -+set(ffrtmphttp_protocol_select http_protocol) -+set(ftp_protocol_select tcp_protocol) -+set(gopher_protocol_select network) -+set(http_protocol_select tcp_protocol) -+set(http_protocol_suggest zlib) -+set(httpproxy_protocol_select tcp_protocol) -+set(httpproxy_protocol_suggest zlib) -+set(https_protocol_select tls_protocol) -+set(https_protocol_suggest zlib) -+set(icecast_protocol_select http_protocol) -+set(mmsh_protocol_select http_protocol) -+set(mmst_protocol_select network) -+set(rtmp_protocol_conflict librtmp_protocol) -+set(rtmp_protocol_select tcp_protocol) -+set(rtmp_protocol_suggest zlib) -+set(rtmpe_protocol_select ffrtmpcrypt_protocol) -+set(rtmpe_protocol_suggest zlib) -+set(rtmps_protocol_conflict librtmp_protocol) -+set(rtmps_protocol_select tls_protocol) -+set(rtmps_protocol_suggest zlib) -+set(rtmpt_protocol_select ffrtmphttp_protocol) -+set(rtmpt_protocol_suggest zlib) -+set(rtmpte_protocol_select ffrtmpcrypt_protocol ffrtmphttp_protocol) -+set(rtmpte_protocol_suggest zlib) -+set(rtmpts_protocol_select ffrtmphttp_protocol https_protocol) -+set(rtmpts_protocol_suggest zlib) -+set(rtp_protocol_select udp_protocol) -+set(schannel_conflict openssl gnutls libtls mbedtls) -+set(sctp_protocol_deps struct_sctp_event_subscribe struct_msghdr_msg_flags) -+set(sctp_protocol_select network) -+set(securetransport_conflict openssl gnutls libtls mbedtls) -+set(srtp_protocol_select rtp_protocol srtp) -+set(tcp_protocol_select network) -+set(tls_protocol_deps_any gnutls openssl schannel securetransport libtls mbedtls) -+set(tls_protocol_select tcp_protocol) -+set(udp_protocol_select network) -+set(udplite_protocol_select network) -+set(unix_protocol_deps sys_un_h) -+set(unix_protocol_select network) -+# external library protocols -+set(libamqp_protocol_deps librabbitmq) -+set(libamqp_protocol_select network) -+set(librtmp_protocol_deps librtmp) -+set(librtmpe_protocol_deps librtmp) -+set(librtmps_protocol_deps librtmp) -+set(librtmpt_protocol_deps librtmp) -+set(librtmpte_protocol_deps librtmp) -+set(libsmbclient_protocol_deps libsmbclient gplv3) -+set(libsrt_protocol_deps libsrt) -+set(libsrt_protocol_select network) -+set(libssh_protocol_deps libssh) -+set(libtls_conflict openssl gnutls mbedtls) -+set(libzmq_protocol_deps libzmq) -+set(libzmq_protocol_select network) -+# filters -+set(afftdn_filter_deps avcodec) -+set(afftdn_filter_select fft) -+set(afftfilt_filter_deps avcodec) -+set(afftfilt_filter_select fft) -+set(afir_filter_deps avcodec) -+set(afir_filter_select rdft) -+set(amovie_filter_deps avcodec avformat) -+set(aresample_filter_deps swresample) -+set(asr_filter_deps pocketsphinx) -+set(ass_filter_deps libass) -+set(atempo_filter_deps avcodec) -+set(atempo_filter_select rdft) -+set(avgblur_opencl_filter_deps opencl) -+set(avgblur_vulkan_filter_deps vulkan libglslang) -+set(azmq_filter_deps libzmq) -+set(blackframe_filter_deps gpl) -+set(bm3d_filter_deps avcodec) -+set(bm3d_filter_select dct) -+set(boxblur_filter_deps gpl) -+set(boxblur_opencl_filter_deps opencl gpl) -+set(bs2b_filter_deps libbs2b) -+set(chromaber_vulkan_filter_deps vulkan libglslang) -+set(colorkey_opencl_filter_deps opencl) -+set(colormatrix_filter_deps gpl) -+set(convolution_opencl_filter_deps opencl) -+set(convolve_filter_deps avcodec) -+set(convolve_filter_select fft) -+set(coreimage_filter_deps coreimage appkit) -+set(coreimage_filter_extralibs -framework OpenGL) -+set(coreimagesrc_filter_deps coreimage appkit) -+set(coreimagesrc_filter_extralibs -framework OpenGL) -+set(cover_rect_filter_deps avcodec avformat gpl) -+set(cropdetect_filter_deps gpl) -+set(deconvolve_filter_deps avcodec) -+set(deconvolve_filter_select fft) -+set(deinterlace_qsv_filter_deps libmfx) -+set(deinterlace_vaapi_filter_deps vaapi) -+set(delogo_filter_deps gpl) -+set(denoise_vaapi_filter_deps vaapi) -+set(derain_filter_select dnn) -+set(deshake_filter_select pixelutils) -+set(deshake_opencl_filter_deps opencl) -+set(dilation_opencl_filter_deps opencl) -+set(dnn_processing_filter_deps swscale) -+set(dnn_processing_filter_select dnn) -+set(drawtext_filter_deps libfreetype) -+set(drawtext_filter_suggest libfontconfig libfribidi) -+set(elbg_filter_deps avcodec) -+set(eq_filter_deps gpl) -+set(erosion_opencl_filter_deps opencl) -+set(fftfilt_filter_deps avcodec) -+set(fftfilt_filter_select rdft) -+set(fftdnoiz_filter_deps avcodec) -+set(fftdnoiz_filter_select fft) -+set(find_rect_filter_deps avcodec avformat gpl) -+set(firequalizer_filter_deps avcodec) -+set(firequalizer_filter_select rdft) -+set(flite_filter_deps libflite) -+set(framerate_filter_select scene_sad) -+set(freezedetect_filter_select scene_sad) -+set(frei0r_filter_deps frei0r libdl) -+set(frei0r_src_filter_deps frei0r libdl) -+set(fspp_filter_deps gpl) -+set(headphone_filter_select fft) -+set(histeq_filter_deps gpl) -+set(hqdn3d_filter_deps gpl) -+set(interlace_filter_deps gpl) -+set(kerndeint_filter_deps gpl) -+set(ladspa_filter_deps ladspa libdl) -+set(lensfun_filter_deps liblensfun version3) -+set(lv2_filter_deps lv2) -+set(mcdeint_filter_deps avcodec gpl) -+set(movie_filter_deps avcodec avformat) -+set(mpdecimate_filter_deps gpl) -+set(mpdecimate_filter_select pixelutils) -+set(minterpolate_filter_select scene_sad) -+set(mptestsrc_filter_deps gpl) -+set(negate_filter_deps lut_filter) -+set(nlmeans_opencl_filter_deps opencl) -+set(nnedi_filter_deps gpl) -+set(ocr_filter_deps libtesseract) -+set(ocv_filter_deps libopencv) -+set(openclsrc_filter_deps opencl) -+set(overlay_opencl_filter_deps opencl) -+set(overlay_qsv_filter_deps libmfx) -+set(overlay_qsv_filter_select qsvvpp) -+set(overlay_vulkan_filter_deps vulkan libglslang) -+set(owdenoise_filter_deps gpl) -+set(pad_opencl_filter_deps opencl) -+set(pan_filter_deps swresample) -+set(perspective_filter_deps gpl) -+set(phase_filter_deps gpl) -+set(pp7_filter_deps gpl) -+set(pp_filter_deps gpl postproc) -+set(prewitt_opencl_filter_deps opencl) -+set(procamp_vaapi_filter_deps vaapi) -+set(program_opencl_filter_deps opencl) -+set(pullup_filter_deps gpl) -+set(removelogo_filter_deps avcodec avformat swscale) -+set(repeatfields_filter_deps gpl) -+set(resample_filter_deps avresample) -+set(roberts_opencl_filter_deps opencl) -+set(rubberband_filter_deps librubberband) -+set(sab_filter_deps gpl swscale) -+set(scale2ref_filter_deps swscale) -+set(scale_filter_deps swscale) -+set(scale_qsv_filter_deps libmfx) -+set(scdet_filter_select scene_sad) -+set(select_filter_select scene_sad) -+set(sharpness_vaapi_filter_deps vaapi) -+set(showcqt_filter_deps avcodec avformat swscale) -+set(showcqt_filter_suggest libfontconfig libfreetype) -+set(showcqt_filter_select fft) -+set(showfreqs_filter_deps avcodec) -+set(showfreqs_filter_select fft) -+set(showspatial_filter_select fft) -+set(showspectrum_filter_deps avcodec) -+set(showspectrum_filter_select fft) -+set(showspectrumpic_filter_deps avcodec) -+set(showspectrumpic_filter_select fft) -+set(signature_filter_deps gpl avcodec avformat) -+set(sinc_filter_select rdft) -+set(smartblur_filter_deps gpl swscale) -+set(sobel_opencl_filter_deps opencl) -+set(sofalizer_filter_deps libmysofa avcodec) -+set(sofalizer_filter_select fft) -+set(spectrumsynth_filter_deps avcodec) -+set(spectrumsynth_filter_select fft) -+set(spp_filter_deps gpl avcodec) -+set(spp_filter_select fft idctdsp fdctdsp me_cmp pixblockdsp) -+set(sr_filter_deps avformat swscale) -+set(sr_filter_select dnn) -+set(stereo3d_filter_deps gpl) -+set(subtitles_filter_deps avformat avcodec libass) -+set(super2xsai_filter_deps gpl) -+set(pixfmts_super2xsai_test_deps super2xsai_filter) -+set(superequalizer_filter_select rdft) -+set(surround_filter_select rdft) -+set(tinterlace_filter_deps gpl) -+set(tinterlace_merge_test_deps tinterlace_filter) -+set(tinterlace_pad_test_deps tinterlace_filter) -+set(tonemap_filter_deps const_nan) -+set(tonemap_vaapi_filter_deps vaapi VAProcFilterParameterBufferHDRToneMapping) -+set(tonemap_opencl_filter_deps opencl const_nan) -+set(transpose_opencl_filter_deps opencl) -+set(transpose_vaapi_filter_deps vaapi VAProcPipelineCaps_rotation_flags) -+set(unsharp_opencl_filter_deps opencl) -+set(uspp_filter_deps gpl avcodec) -+set(vaguedenoiser_filter_deps gpl) -+set(vidstabdetect_filter_deps libvidstab) -+set(vidstabtransform_filter_deps libvidstab) -+set(libvmaf_filter_deps libvmaf pthreads) -+set(zmq_filter_deps libzmq) -+set(zoompan_filter_deps swscale) -+set(zscale_filter_deps libzimg const_nan) -+set(scale_vaapi_filter_deps vaapi) -+set(scale_vulkan_filter_deps vulkan libglslang) -+set(vpp_qsv_filter_deps libmfx) -+set(vpp_qsv_filter_select qsvvpp) -+set(xfade_opencl_filter_deps opencl) -+set(yadif_cuda_filter_deps ffnvcodec) -+set(yadif_cuda_filter_deps_any cuda_nvcc cuda_llvm) -+# examples -+set(avio_list_dir_deps avformat avutil) -+set(avio_reading_deps avformat avcodec avutil) -+set(decode_audio_example_deps avcodec avutil) -+set(decode_video_example_deps avcodec avutil) -+set(demuxing_decoding_example_deps avcodec avformat avutil) -+set(encode_audio_example_deps avcodec avutil) -+set(encode_video_example_deps avcodec avutil) -+set(extract_mvs_example_deps avcodec avformat avutil) -+set(filter_audio_example_deps avfilter avutil) -+set(filtering_audio_example_deps avfilter avcodec avformat avutil) -+set(filtering_video_example_deps avfilter avcodec avformat avutil) -+set(http_multiclient_example_deps avformat avutil fork) -+set(hw_decode_example_deps avcodec avformat avutil) -+set(metadata_example_deps avformat avutil) -+set(muxing_example_deps avcodec avformat avutil swscale) -+set(qsvdec_example_deps avcodec avutil libmfx h264_qsv_decoder) -+set(remuxing_example_deps avcodec avformat avutil) -+set(resampling_audio_example_deps avutil swresample) -+set(scaling_video_example_deps avutil swscale) -+set(transcode_aac_example_deps avcodec avformat swresample) -+set(transcoding_example_deps avfilter avcodec avformat avutil) -+set(vaapi_encode_example_deps avcodec avutil h264_vaapi_encoder) -+set(vaapi_transcode_example_deps avcodec avformat avutil h264_vaapi_encoder) -+# EXTRALIBS_LIST -+set(cpu_init_extralibs pthreads_extralibs) -+set(cws2fws_extralibs zlib_extralibs) -+# libraries, in any order -+set(avcodec_deps avutil) -+set(avcodec_suggest libm) -+set(avcodec_select null_bsf) -+set(avdevice_deps avformat avcodec avutil) -+set(avdevice_suggest libm) -+set(avfilter_deps avutil) -+set(avfilter_suggest libm) -+set(avformat_deps avcodec avutil) -+set(avformat_suggest libm network zlib) -+set(avresample_deps avutil) -+set(avresample_suggest libm) -+set(avutil_suggest clock_gettime ffnvcodec libm libdrm libmfx opencl user32 vaapi vulkan videotoolbox corefoundation corevideo coremedia bcrypt) -+set(postproc_deps avutil gpl) -+set(postproc_suggest libm) -+set(swresample_deps avutil) -+set(swresample_suggest libm libsoxr) -+set(swscale_deps avutil) -+set(swscale_suggest libm) -+### -+set(avcodec_extralibs pthreads_extralibs iconv_extralibs dxva2_extralibs) -+set(avfilter_extralibs pthreads_extralibs) -+set(avutil_extralibs d3d11va_extralibs nanosleep_extralibs pthreads_extralibs vaapi_drm_extralibs vaapi_x11_extralibs vdpau_x11_extralibs) -+# programs -+set(ffmpeg_deps avcodec avfilter avformat) -+set(ffmpeg_select aformat_filter anull_filter atrim_filter format_filter -+ hflip_filter null_filter -+ transpose_filter trim_filter vflip_filter) -+set(ffmpeg_suggest ole32 psapi shell32) -+set(ffplay_deps avcodec avformat swscale swresample sdl2) -+set(ffplay_select rdft crop_filter transpose_filter hflip_filter vflip_filter rotate_filter) -+set(ffplay_suggest shell32) -+set(ffprobe_deps avcodec avformat) -+set(ffprobe_suggest shell32) -+# documentation -+set(podpages_deps perl) -+set(manpages_deps perl pod2man) -+set(htmlpages_deps perl) -+set(htmlpages_deps_any makeinfo_html texi2html) -+set(txtpages_deps perl makeinfo) -+set(doc_deps_any manpages htmlpages podpages txtpages) -+# default parameters -+#logfile="ffbuild/config.log" -+# installation paths -+set(prefix_default /usr/local) -+set(bindir_default ${prefix}/bin) -+set(datadir_default ${prefix}/share/ffmpeg) -+set(docdir_default ${prefix}/share/doc/ffmpeg) -+set(incdir_default ${prefix}/include) -+set(libdir_default ${prefix}/lib) -+set(mandir_default ${prefix}/share/man) -+# toolchain -+set(ar_default ar) -+set(cc_default gcc) -+set(cxx_default g++) -+set(host_cc_default gcc) -+set(doxygen_default doxygen) -+set(install install) -+set(ln_s_default ln -s -f) -+set(nm_default nm -g) -+set(pkg_config_default pkg-config) -+set(ranlib_default ranlib) -+set(strip_default strip) -+set(version_script '--version-script') -+set(objformat elf32) -+set(x86asmexe_default nasm) -+set(windres_default windres) -+set(striptype direct) -+# OS -+#target_os_default=$(tolower $(uname -s)) -+#host_os=$target_os_default -+# machine -+#if test "$target_os_default" = aix; then -+# arch_default=$(uname -p) -+# strip_default="strip -X32_64" -+# nm_default="nm -g -X32_64" -+#else -+# arch_default=$(uname -m) -+#fi -+#cpu="generic" -+#intrinsics="none" -+ -+# configurable options -+enable(${PROGRAM_LIST}) -+enable(${DOCUMENT_LIST}) -+enable(${EXAMPLE_LIST}) -+enable(${LIBRARY_LIST}) -+enable(stripping) -+enable(asm) -+enable(debug) -+enable(doc) -+enable(faan faandct faanidct) -+enable(large_tests) -+enable(optimizations) -+enable(runtime_cpudetect) -+enable(safe_bitstream_reader) -+enable(static) -+enable(swscale_alpha) -+enable(valgrind_backtrace) -+set(sws_max_filter_size_default 256) -+# internal components are enabled by default -+enable(${EXTRALIBS_LIST}) -+# Avoid external, non-system, libraries getting enabled by dependency resolution -+disable(${EXTERNAL_LIBRARY_LIST} ${HWACCEL_LIBRARY_LIST}) -+# find_things_extern -+function(find_things_extern thing pattern) -+ if(DEFINED ARGV3) -+ string(TOUPPER ${ARGV3} OUT) -+ else() -+ string(TOUPPER ${thing} OUT) -+ endif() -+ set(regexp "^[^#]*extern.*${pattern} *ff_\([^ ]*\)_${thing};") -+ file(STRINGS ${CMAKE_SOURCE_DIR}/${ARGV2} lines REGEX "${regexp}") -+ list(TRANSFORM lines REPLACE "${regexp}" "\\1_${OUT}") -+ set(${OUT}_LIST ${lines} PARENT_SCOPE) -+endfunction() -+# find_filters_extern -+function(find_filters_extern) -+ set(regexp "^extern AVFilter ff_[^_]*_\([^ ]*\);") -+ file(STRINGS ${CMAKE_SOURCE_DIR}/${ARGV0} lines REGEX "${regexp}") -+ list(TRANSFORM lines REPLACE "${regexp}" "\\1_filter") -+ set(FILTER_LIST ${lines} PARENT_SCOPE) -+endfunction() -+find_filters_extern(libavfilter/allfilters.c) # FILTER_LIST -+find_things_extern(muxer AVOutputFormat libavdevice/alldevices.c outdev) # OUTDEV_LIST -+find_things_extern(demuxer AVInputFormat libavdevice/alldevices.c indev) # INDEV_LIST -+find_things_extern(muxer AVOutputFormat libavformat/allformats.c) # MUXER_LIST -+find_things_extern(demuxer AVInputFormat libavformat/allformats.c) # DEMUXER_LIST -+find_things_extern(encoder AVCodec libavcodec/allcodecs.c) # ENCODER_LIST -+find_things_extern(decoder AVCodec libavcodec/allcodecs.c) # DECODER_LIST -+set(CODEC_LIST -+ ${ENCODER_LIST} -+ ${DECODER_LIST} -+ ) -+find_things_extern(parser AVCodecParser libavcodec/parsers.c) # PARSER_LIST -+find_things_extern(bsf AVBitStreamFilter libavcodec/bitstream_filters.c) # BSF_LIST -+find_things_extern(hwaccel AVHWAccel libavcodec/hwaccels.h) # HWACCEL_LIST -+find_things_extern(protocol URLProtocol libavformat/protocols.c) # PROTOCOL_LIST -+set(AVCODEC_COMPONENTS_LIST -+ ${BSF_LIST} -+ ${DECODER_LIST} -+ ${ENCODER_LIST} -+ ${HWACCEL_LIST} -+ ${PARSER_LIST} -+ ) -+set(AVDEVICE_COMPONENTS_LIST -+ ${INDEV_LIST} -+ ${OUTDEV_LIST} -+ ) -+set(AVFILTER_COMPONENTS_LIST -+ ${FILTER_LIST} -+ ) -+set(AVFORMAT_COMPONENTS_LIST -+ ${DEMUXER_LIST} -+ ${MUXER_LIST} -+ ${PROTOCOL_LIST} -+ ) -+set(ALL_COMPONENTS -+ ${AVCODEC_COMPONENTS_LIST} -+ ${AVDEVICE_COMPONENTS_LIST} -+ ${AVFILTER_COMPONENTS_LIST} -+ ${AVFORMAT_COMPONENTS_LIST} -+ ) -+enable(${ARCH_EXT_LIST}) -+######################################## -+check_func(access) -+check_func(fcntl) -+check_func(fork) -+check_func(gethrtime) -+check_func(getopt) -+check_func(getrusage) -+check_func(gettimeofday) -+check_func(isatty) -+check_func(mkstemp) -+check_func(mmap) -+check_func(mprotect) -+check_func(sched_getaffinity) -+check_func(setrlimit) -+check_func(strerror_r) -+check_func(sysconf) -+check_func(sysctl) -+check_func(usleep) -+check_func_headers(glob.h glob) -+check_headers(direct.h) -+check_headers(dirent.h) -+check_headers(dxgidebug.h) -+check_headers(dxva.h) -+#check_headers(dxva2api.h -D_WIN32_WINNT=0x0600) -+check_headers(io.h) -+check_headers(linux/perf_event.h) -+check_headers(libcrystalhd/libcrystalhd_if.h) -+check_headers(malloc.h) -+check_headers(mftransform.h) -+check_headers(net/udplite.h) -+check_headers(poll.h) -+check_headers(sys/param.h) -+check_headers(sys/resource.h) -+check_headers(sys/select.h) -+check_headers(sys/time.h) -+check_headers(sys/un.h) -+check_headers(termios.h) -+check_headers(unistd.h) -+check_headers(valgrind/valgrind.h) -+#check_func_headers(VideoToolbox/VTCompressionSession.h VTCompressionSessionPrepareToEncodeFrames -framework VideoToolbox) -+check_headers(windows.h) -+check_headers(X11/extensions/XvMClib.h) -+check_headers(asm/types.h) -+set(atan2f_args 2) -+set(copysign_args 2) -+set(hypot_args 2) -+set(ldexpf_args 2) -+set(powf_args 2) -+foreach(func ${MATH_FUNCS}) -+ check_mathfunc(${func} ${${func}_args}) -+endforeach() -+######################################## -+function(head_config) -+ file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/config.h -+"/* Automatically generated by configure.cmake - do not modify! */ -+#ifndef FFMPEG_CONFIG_H -+#define FFMPEG_CONFIG_H" -+ ) -+endfunction() -+function(print_config pfx files) -+ separate_arguments(files) -+ foreach(c ${ARGN}) -+ string(TOUPPER ${c} C) -+ foreach(f ${files}) -+ if(f MATCHES ".h$") -+ unset(val) -+ if(DEFINED ${c}) -+ if(${${c}} STREQUAL "ON") -+ set(val 1) -+ elseif(${${c}} STREQUAL "OFF") -+ set(val 0) -+ endif() -+ endif() -+ set(${f}_x "${${f}_x}\n#define ${pfx}${C} ${val}") -+ else() -+ set(${f}_x "${${f}_x}\nsomething ${pfx}${C}") -+ endif() -+ endforeach() -+ endforeach() -+ foreach(f ${files}) -+ file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/${f} ${${f}_x}) -+ endforeach() -+endfunction() -+head_config() -+print_config(ARCH_ "config.h" ${ARCH_LIST}) -+print_config(HAVE_ "config.h" ${HAVE_LIST}) -+print_config(CONFIG_ "config.h" ${CONFIG_LIST} ${CONFIG_EXTRA} ${ALL_COMPONENTS}) -+file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/config.h "\n#endif /* FFMPEG_CONFIG_H */") -diff --git a/libavdevice/CMakeLists.txt b/libavdevice/CMakeLists.txt -new file mode 100644 -index 0000000000..c29960a8fa ---- /dev/null -+++ b/libavdevice/CMakeLists.txt -@@ -0,0 +1,77 @@ -+set(lib_name libavdevice) -+set(lib_srcs -+ alldevices.c -+ alsa.c -+ alsa_dec.c -+ alsa_enc.c -+ alsa.h -+ android_camera.c -+ avdevice.c -+ avdevice.h -+ avdeviceres.rc -+ avfoundation.m -+ bktr.c -+ caca.c -+ decklink_common_c.h -+ decklink_common.cpp -+ decklink_common.h -+ decklink_dec_c.c -+ decklink_dec.cpp -+ decklink_dec.h -+ decklink_enc_c.c -+ decklink_enc.cpp -+ decklink_enc.h -+ dshow.c -+ dshow_capture.h -+ dshow_common.c -+ dshow_crossbar.c -+ dshow_enummediatypes.c -+ dshow_enumpins.c -+ dshow_filter.c -+ dshow_pin.c -+ fbdev_common.c -+ fbdev_common.h -+ fbdev_dec.c -+ fbdev_enc.c -+ file_open.c -+ gdigrab.c -+ iec61883.c -+ internal.h -+ jack.c -+ kmsgrab.c -+ lavfi.c -+ libavdevice.v -+ libcdio.c -+ libdc1394.c -+ Makefile -+ openal-dec.c -+ opengl_enc.c -+ opengl_enc_shaders.h -+ oss.c -+ oss_dec.c -+ oss_enc.c -+ oss.h -+ pulse_audio_common.c -+ pulse_audio_common.h -+ pulse_audio_dec.c -+ pulse_audio_enc.c -+ reverse.c -+ sdl2.c -+ sndio.c -+ sndio_dec.c -+ sndio_enc.c -+ sndio.h -+ tests -+ timefilter.c -+ timefilter.h -+ utils.c -+ v4l2.c -+ v4l2-common.c -+ v4l2-common.h -+ v4l2enc.c -+ version.h -+ vfwcap.c -+ xcbgrab.c -+ xv.c -+ ) -+add_library(${lib_name} STATIC ${lib_srcs}) -diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c -index c6fd3e1cef..d894508cb1 100644 ---- a/libavformat/mpegts.c -+++ b/libavformat/mpegts.c -@@ -1286,12 +1286,12 @@ skip: - p += sl_header_bytes; - buf_size -= sl_header_bytes; - } -- if (pes->stream_type == 0x15 && buf_size >= 5) { -- /* skip metadata access unit header */ -- pes->pes_header_size += 5; -- p += 5; -- buf_size -= 5; -- } -+ //if (pes->stream_type == 0x15 && buf_size >= 5) { -+ // /* skip metadata access unit header */ -+ // pes->pes_header_size += 5; -+ // p += 5; -+ // buf_size -= 5; -+ //} - if ( pes->ts->fix_teletext_pts - && ( pes->st->codecpar->codec_id == AV_CODEC_ID_DVB_TELETEXT - || pes->st->codecpar->codec_id == AV_CODEC_ID_DVB_SUBTITLE) -@@ -2193,6 +2193,12 @@ int ff_parse_mpeg2_descriptor(AVFormatContext *fc, AVStream *st, int stream_type - default: - break; - } -+ if (st->codecpar->codec_id == AV_CODEC_ID_SMPTE_KLV) -+ if(stream_type == STREAM_TYPE_PRIVATE_DATA) -+ st->codecpar->profile = FF_PROFILE_KLVA_ASYNC; -+ else if(stream_type == STREAM_TYPE_METADATA) -+ st->codecpar->profile = FF_PROFILE_KLVA_SYNC; -+ - *pp = desc_end; - return 0; - } -diff --git a/libavformat/mpegtsenc.c b/libavformat/mpegtsenc.c -index b5ee48d015..7a79982ad9 100644 ---- a/libavformat/mpegtsenc.c -+++ b/libavformat/mpegtsenc.c -@@ -697,7 +697,39 @@ static int mpegts_write_pmt(AVFormatContext *s, MpegTSService *service) - break; - case AVMEDIA_TYPE_DATA: - if (st->codecpar->codec_id == AV_CODEC_ID_SMPTE_KLV) { -- put_registration_descriptor(&q, MKTAG('K', 'L', 'V', 'A')); -+ if(st->codecpar->profile == FF_PROFILE_KLVA_ASYNC) -+ put_registration_descriptor(&q, MKTAG('K', 'L', 'V', 'A')); -+ else { -+ //Begin metadata_descriptor -+ *q++ = 0x26; -+ *q++ = 0x09; -+ //begin metadata_application_format -+ *q++ = 0x01; -+ *q++ = 0x00; -+ //beging metadata_format -+ *q++ = 0xFF; -+ *q++ = 'K'; -+ *q++ = 'L'; -+ *q++ = 'V'; -+ *q++ = 'A'; -+ *q++ = 0x00; -+ *q++ = 0x0f; -+ } -+ //begin metadata_std_descriptor -+ *q++ = 0x27; -+ *q++ = 0x09; -+ //2 reserved bits and metadata_input_leak_rate -+ *q++ = 0xC0; -+ *q++ = 0x02;//0x00; -+ *q++ = 0x71;//0x00;//0x04; -+ //2 reserved bits followed by metadata_buffer_size -+ *q++ = 0xC0; -+ *q++ = 0x00; -+ *q++ = 0x02;//0x00 -+ //2 reserved bits followed be metadata_output_leak_Rate -+ *q++ = 0xC0; -+ *q++ = 0x00; -+ *q++ = 0x00; - } else if (st->codecpar->codec_id == AV_CODEC_ID_TIMED_ID3) { - const char *tag = "ID3 "; - *q++ = 0x26; /* metadata descriptor */ -@@ -1399,8 +1431,7 @@ static void mpegts_write_pes(AVFormatContext *s, AVStream *st, - *q++ = 0xbd; - } else if (st->codecpar->codec_type == AVMEDIA_TYPE_DATA) { - *q++ = stream_id != -1 ? stream_id : 0xfc; -- -- if (stream_id == 0xbd) /* asynchronous KLV */ -+ if (st->codecpar->profile == FF_PROFILE_KLVA_ASYNC) /* asynchronous KLV */ - pts = dts = AV_NOPTS_VALUE; - } else { - *q++ = 0xbd; diff --git a/patches/geotiff.patch b/patches/geotiff.patch deleted file mode 100644 index 7a478a2..0000000 --- a/patches/geotiff.patch +++ /dev/null @@ -1,114 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -new file mode 100644 -index 0000000..2df6fa2 ---- /dev/null -+++ b/CMakeLists.txt -@@ -0,0 +1,78 @@ -+cmake_minimum_required(VERSION 3.31) -+project(geotiff) -+include(GNUInstallDirs) -+include(xpflags) -+set(lib_name ${PROJECT_NAME}) -+####################################### -+set(${lib_name}_libsrcs -+ defs.h -+ geo_config.h -+ geo_keyp.h -+ geokeys.h -+ geonames.h -+ geotiff.h -+ geotiffio.h -+ geovalues.h -+ cpl_csv.c -+ cpl_serv.c -+ cpl_serv.h -+ geo_extra.c -+ geo_free.c -+ geo_get.c -+ geo_names.c -+ geo_new.c -+ geo_normalize.c -+ geo_normalize.h -+ geo_print.c -+ geo_set.c -+ geo_tiffp.c -+ geo_tiffp.h -+ geo_trans.c -+ geo_write.c -+ geotiff_proj4.c -+ libxtiff/xtiff.c -+ libxtiff/xtiffio.h -+ ) -+####################################### -+foreach(TYPE MAJOR MINOR POINT) -+ set(verString "^VERSION_${TYPE}=+([0-9]+)?") -+ set(verFile configure.in) -+ file(STRINGS ${verFile} verNum REGEX "${verString}") -+ string(REGEX REPLACE "${verString}" "\\1" ver${TYPE} ${verNum}) -+endforeach() -+set(GTIF_VER ${verMAJOR}.${verMINOR}.${verPOINT}) -+####################################### -+add_library(${lib_name} STATIC ${${lib_name}_libsrcs}) -+if(MSVC) -+ target_compile_definitions(${lib_name} PRIVATE -+ -D_CRT_NONSTDC_NO_DEPRECATE -+ -D_CRT_SECURE_NO_WARNINGS -+ ) -+endif() -+target_include_directories(${lib_name} PUBLIC $ -+ $ -+ PRIVATE -+ ${CMAKE_CURRENT_SOURCE_DIR} -+ ${CMAKE_CURRENT_SOURCE_DIR}/libxtiff -+ # TRICKY: currently relies on tiff headers from wxWidgets... -+ ${CMAKE_INSTALL_PREFIX}/${WX_INCLUDE}/wx/tiff # pass in with -DWX_INCLUDE -+ ) -+####################################### -+set(targetsFile ${PROJECT_NAME}-targets) -+install(TARGETS ${lib_name} EXPORT ${targetsFile} -+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} -+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} -+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} -+ ) -+file(GLOB hdrs ${CMAKE_SOURCE_DIR}/*.h) -+file(GLOB incs ${CMAKE_SOURCE_DIR}/*.inc) -+install(FILES ${hdrs} ${incs} ${CMAKE_SOURCE_DIR}/libxtiff/xtiffio.h -+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME} -+ ) -+if(DEFINED XP_NAMESPACE) -+ set(nameSpace NAMESPACE ${XP_NAMESPACE}::) -+endif() -+if(NOT DEFINED XP_INSTALL_CMAKEDIR) -+ set(XP_INSTALL_CMAKEDIR ${CMAKE_INSTALL_DATADIR}/cmake) -+endif() -+install(EXPORT ${targetsFile} DESTINATION ${XP_INSTALL_CMAKEDIR} ${nameSpace}) -diff --git a/geo_config.h b/geo_config.h -new file mode 100644 -index 0000000..6f095a6 ---- /dev/null -+++ b/geo_config.h -@@ -0,0 +1,24 @@ -+/* geo_config.h. Generated automatically by configure. */ -+#ifndef GEO_CONFIG_H -+#define GEO_CONFIG_H -+ -+/* Define if you have the ANSI C header files. */ -+#define STDC_HEADERS 1 -+ -+/* Define if your processor stores words with the most significant -+ byte first (like Motorola and SPARC, unlike Intel and VAX). */ -+/* #undef WORDS_BIGENDIAN */ -+ -+/* Define if you have the header file. */ -+#define HAVE_STDLIB_H 1 -+ -+/* Define if you have the header file. */ -+#define HAVE_STRING_H 1 -+ -+/* Define if you have the header file. */ -+#define HAVE_STRINGS_H 1 -+ -+/* Build as DLL */ -+#define BUILD_AS_DLL 1 -+ -+#endif /* ndef GEO_CONFIG_H */ diff --git a/patches/geotrans.patch b/patches/geotrans.patch deleted file mode 100644 index 6837a9c..0000000 --- a/patches/geotrans.patch +++ /dev/null @@ -1,224 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -new file mode 100644 -index 0000000..71cbdbb ---- /dev/null -+++ b/CMakeLists.txt -@@ -0,0 +1,180 @@ -+cmake_minimum_required(VERSION 3.31) -+project(geotrans) -+include(GNUInstallDirs) -+include(xpflags) -+set(lib_name ${PROJECT_NAME}) -+####################################### -+# preprocessor -+include(TestBigEndian) -+test_big_endian(IS_BIG_ENDIAN) -+if(NOT ${IS_BIG_ENDIAN}) -+ add_definitions(-DLITTLE_ENDIAN) -+endif() -+if(MSVC) -+ add_definitions( -+ -D_CRT_SECURE_NO_WARNINGS -+ ) -+endif() -+####################################### -+# include directories -+include_directories( -+ ${CMAKE_CURRENT_SOURCE_DIR}/dt_cc/albers -+ ${CMAKE_CURRENT_SOURCE_DIR}/dt_cc/azeq -+ ${CMAKE_CURRENT_SOURCE_DIR}/dt_cc/bng -+ ${CMAKE_CURRENT_SOURCE_DIR}/dt_cc/bonne -+ ${CMAKE_CURRENT_SOURCE_DIR}/dt_cc/cassini -+ ${CMAKE_CURRENT_SOURCE_DIR}/dt_cc/cyleqa -+ ${CMAKE_CURRENT_SOURCE_DIR}/dt_cc/datum -+ ${CMAKE_CURRENT_SOURCE_DIR}/dt_cc/eckert4 -+ ${CMAKE_CURRENT_SOURCE_DIR}/dt_cc/eckert6 -+ ${CMAKE_CURRENT_SOURCE_DIR}/dt_cc/ellipse -+ ${CMAKE_CURRENT_SOURCE_DIR}/dt_cc/eqdcyl -+ ${CMAKE_CURRENT_SOURCE_DIR}/dt_cc/gars -+ ${CMAKE_CURRENT_SOURCE_DIR}/dt_cc/geocent -+ ${CMAKE_CURRENT_SOURCE_DIR}/dt_cc/geoid -+ ${CMAKE_CURRENT_SOURCE_DIR}/dt_cc/georef -+ ${CMAKE_CURRENT_SOURCE_DIR}/dt_cc/gnomonic -+ ${CMAKE_CURRENT_SOURCE_DIR}/dt_cc/grinten -+ ${CMAKE_CURRENT_SOURCE_DIR}/dt_cc/lambert_1 -+ ${CMAKE_CURRENT_SOURCE_DIR}/dt_cc/lambert_2 -+ ${CMAKE_CURRENT_SOURCE_DIR}/dt_cc/loccart -+ ${CMAKE_CURRENT_SOURCE_DIR}/dt_cc/mercator -+ ${CMAKE_CURRENT_SOURCE_DIR}/dt_cc/mgrs -+ ${CMAKE_CURRENT_SOURCE_DIR}/dt_cc/miller -+ ${CMAKE_CURRENT_SOURCE_DIR}/dt_cc/mollweid -+ ${CMAKE_CURRENT_SOURCE_DIR}/dt_cc/neys -+ ${CMAKE_CURRENT_SOURCE_DIR}/dt_cc/nzmg -+ ${CMAKE_CURRENT_SOURCE_DIR}/dt_cc/omerc -+ ${CMAKE_CURRENT_SOURCE_DIR}/dt_cc/orthogr -+ ${CMAKE_CURRENT_SOURCE_DIR}/dt_cc/polarst -+ ${CMAKE_CURRENT_SOURCE_DIR}/dt_cc/polycon -+ ${CMAKE_CURRENT_SOURCE_DIR}/dt_cc/sinusoid -+ ${CMAKE_CURRENT_SOURCE_DIR}/dt_cc/stereogr -+ ${CMAKE_CURRENT_SOURCE_DIR}/dt_cc/threads -+ ${CMAKE_CURRENT_SOURCE_DIR}/dt_cc/tranmerc -+ ${CMAKE_CURRENT_SOURCE_DIR}/dt_cc/trcyleqa -+ ${CMAKE_CURRENT_SOURCE_DIR}/dt_cc/ups -+ ${CMAKE_CURRENT_SOURCE_DIR}/dt_cc/usng -+ ${CMAKE_CURRENT_SOURCE_DIR}/dt_cc/utm -+ ${CMAKE_CURRENT_SOURCE_DIR}/engine/src -+ ) -+####################################### -+# library sources -+set(${lib_name}_libsrcs -+ dt_cc/albers/albers.c -+ dt_cc/azeq/azeq.c -+ dt_cc/bng/bng.c -+ dt_cc/bonne/bonne.c -+ dt_cc/cassini/cassini.c -+ dt_cc/cyleqa/cyleqa.c -+ dt_cc/datum/datum.c -+ dt_cc/eckert4/eckert4.c -+ dt_cc/eckert6/eckert6.c -+ dt_cc/ellipse/ellipse.c -+ dt_cc/eqdcyl/eqdcyl.c -+ dt_cc/gars/gars.c -+ dt_cc/geocent/geocent.c -+ dt_cc/geoid/geoid.c -+ dt_cc/georef/georef.c -+ dt_cc/gnomonic/gnomonic.c -+ dt_cc/grinten/grinten.c -+ dt_cc/lambert_1/lambert_1.c -+ dt_cc/lambert_2/lambert_2.c -+ dt_cc/loccart/loccart.c -+ dt_cc/mercator/mercator.c -+ dt_cc/mgrs/mgrs.c -+ dt_cc/miller/miller.c -+ dt_cc/mollweid/mollweid.c -+ dt_cc/neys/neys.c -+ dt_cc/nzmg/nzmg.c -+ dt_cc/omerc/omerc.c -+ dt_cc/orthogr/orthogr.c -+ dt_cc/polarst/polarst.c -+ dt_cc/polycon/polycon.c -+ dt_cc/sinusoid/sinusoid.c -+ dt_cc/stereogr/stereogr.c -+ dt_cc/threads/threads.c -+ dt_cc/tranmerc/tranmerc.c -+ dt_cc/trcyleqa/trcyleqa.c -+ dt_cc/ups/ups.c -+ dt_cc/usng/usng.c -+ dt_cc/utm/utm.c -+ engine/src/engine.c -+ geotrans2/src/strndup.c -+ geotrans2/src/strtoval.c -+ ) -+set(${lib_name}_libhdrs -+ dt_cc/albers/albers.h -+ dt_cc/azeq/azeq.h -+ dt_cc/bng/bng.h -+ dt_cc/bonne/bonne.h -+ dt_cc/cassini/cassini.h -+ dt_cc/cyleqa/cyleqa.h -+ dt_cc/datum/datum.h -+ dt_cc/eckert4/eckert4.h -+ dt_cc/eckert6/eckert6.h -+ dt_cc/ellipse/ellipse.h -+ dt_cc/eqdcyl/eqdcyl.h -+ dt_cc/gars/gars.h -+ dt_cc/geocent/geocent.h -+ dt_cc/geoid/geoid.h -+ dt_cc/georef/georef.h -+ dt_cc/gnomonic/gnomonic.h -+ dt_cc/grinten/grinten.h -+ dt_cc/lambert_1/lambert_1.h -+ dt_cc/lambert_2/lambert_2.h -+ dt_cc/loccart/loccart.h -+ dt_cc/mercator/mercator.h -+ dt_cc/mgrs/mgrs.h -+ dt_cc/miller/miller.h -+ dt_cc/mollweid/mollweid.h -+ dt_cc/neys/neys.h -+ dt_cc/nzmg/nzmg.h -+ dt_cc/omerc/omerc.h -+ dt_cc/orthogr/orthogr.h -+ dt_cc/polarst/polarst.h -+ dt_cc/polycon/polycon.h -+ dt_cc/sinusoid/sinusoid.h -+ dt_cc/stereogr/stereogr.h -+ dt_cc/threads/threads.h -+ dt_cc/tranmerc/tranmerc.h -+ dt_cc/trcyleqa/trcyleqa.h -+ dt_cc/ups/ups.h -+ dt_cc/usng/usng.h -+ dt_cc/utm/utm.h -+ engine/src/engine.h -+ geotrans2/src/comphack.h -+ geotrans2/src/strndup.h -+ geotrans2/src/strtoval.h -+ ) -+set(${lib_name}_data -+ geotrans2/data/3_param.dat -+ geotrans2/data/7_param.dat -+ geotrans2/data/egm84.grd -+ geotrans2/data/egm96.grd -+ geotrans2/data/ellips.dat -+ ) -+####################################### -+# library -+add_library(${lib_name} STATIC ${${lib_name}_libsrcs}) -+target_include_directories(${lib_name} PUBLIC $) -+####################################### -+# install -+set(targetsFile ${PROJECT_NAME}-targets) -+install(TARGETS ${lib_name} EXPORT ${targetsFile} -+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} -+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} -+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} -+ ) -+install(FILES ${${lib_name}_libhdrs} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME}) -+if(DEFINED CSV_DIR) -+ file(GLOB csvFiles ${CSV_DIR}/*.csv ${CSV_DIR}/README) -+endif() -+install(FILES ${${lib_name}_data} ${csvFiles} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME}/data) -+if(DEFINED XP_NAMESPACE) -+ set(nameSpace NAMESPACE ${XP_NAMESPACE}::) -+endif() -+if(NOT DEFINED XP_INSTALL_CMAKEDIR) -+ set(XP_INSTALL_CMAKEDIR ${CMAKE_INSTALL_DATADIR}/cmake) -+endif() -+install(EXPORT ${targetsFile} DESTINATION ${XP_INSTALL_CMAKEDIR} ${nameSpace}) -diff --git a/geotrans2/src/strtoval.c b/geotrans2/src/strtoval.c -index 79cecf1..e88418f 100755 ---- a/geotrans2/src/strtoval.c -+++ b/geotrans2/src/strtoval.c -@@ -770,12 +770,14 @@ SVC_Status String_to_Longitude(const char *str, double *val) - { - *val = 0; - } -- -- free(reference_Pointer); - } - else - error_Code = SVC_Error; -+ -+ free(reference_Pointer); - } -+ else -+ error_Code = SVC_Error; - return error_Code; - }/* String_to_Longitude */ - -@@ -1175,12 +1177,14 @@ SVC_Status String_to_Latitude(const char *str, double *val) - { - *val = 0; - } -- -- free(reference_Pointer); - } - else - error_Code = SVC_Error; -+ -+ free(reference_Pointer); - } -+ else -+ error_Code = SVC_Error; - return error_Code; - } - diff --git a/patches/jasper.patch b/patches/jasper.patch deleted file mode 100644 index a15810e..0000000 --- a/patches/jasper.patch +++ /dev/null @@ -1,2610 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -new file mode 100644 -index 0000000..e456579 ---- /dev/null -+++ b/CMakeLists.txt -@@ -0,0 +1,7 @@ -+cmake_minimum_required(VERSION 3.31) -+project(jasper) -+include(GNUInstallDirs) -+include(xpflags) -+include(configure.cmake) -+add_subdirectory(src/libjasper) -+add_subdirectory(src/appl) -diff --git a/configure.cmake b/configure.cmake -new file mode 100644 -index 0000000..170dbd9 ---- /dev/null -+++ b/configure.cmake -@@ -0,0 +1,289 @@ -+include(CheckCSourceCompiles) -+include(CheckFunctionExists) -+include(CheckIncludeFile) -+include(CheckLibraryExists) -+include(CheckSymbolExists) -+include(CheckTypeSize) -+######################################## -+function(set_define var) -+ if(${ARGC} GREATER 1 AND ${var}) -+ set(DEFINE_${var} cmakedefine01 PARENT_SCOPE) -+ else() -+ set(DEFINE_${var} cmakedefine PARENT_SCOPE) -+ endif() -+ if(${var}) -+ set(JAS_TEST_DEFINES "${JAS_TEST_DEFINES} -D${var}" PARENT_SCOPE) -+ set(CMAKE_REQUIRED_DEFINITIONS ${JAS_TEST_DEFINES} PARENT_SCOPE) -+ endif(${var}) -+endfunction() -+########## -+macro(check_include_file_concat incfile var) -+ check_include_file("${incfile}" ${var}) -+ set_define(${var} 1) -+ if(${var}) -+ set(JAS_INCLUDES ${JAS_INCLUDES} ${incfile}) -+ endif(${var}) -+endmacro() -+########## -+macro(check_exists_define01 func var) -+ if(UNIX) -+ check_function_exists("${func}" ${var}) -+ else() -+ check_symbol_exists("${func}" "${JAS_INCLUDES}" ${var}) -+ endif() -+ set_define(${var} 1) -+endmacro() -+########## -+macro(check_library_exists_concat lib symbol var) -+ check_library_exists("${lib};${JAS_SYSTEM_LIBS}" ${symbol} "${CMAKE_LIBRARY_PATH}" ${var}) -+ set_define(${var} 1) -+ if(${var}) -+ set(JAS_SYSTEM_LIBS ${lib} ${JAS_SYSTEM_LIBS}) -+ set(CMAKE_REQUIRED_LIBRARIES ${JAS_SYSTEM_LIBS}) -+ endif(${var}) -+endmacro() -+######################################## -+check_include_file_concat(windows.h HAVE_WINDOWS_H) -+check_include_file_concat(dlfcn.h HAVE_DLFCN_H) -+check_include_file_concat(fcntl.h HAVE_FCNTL_H) -+check_include_file_concat(inttypes.h HAVE_INTTYPES_H) -+check_include_file_concat(io.h HAVE_IO_H) -+check_include_file_concat(limits.h HAVE_LIMITS_H) -+check_include_file_concat(memory.h HAVE_MEMORY_H) -+check_include_file_concat(stdbool.h HAVE_STDBOOL_H) -+check_include_file_concat(stddef.h HAVE_STDDEF_H) -+check_include_file_concat(stdint.h HAVE_STDINT_H) -+check_include_file_concat(stdlib.h HAVE_STDLIB_H) -+check_include_file_concat(strings.h HAVE_STRINGS_H) -+check_include_file_concat(string.h HAVE_STRING_H) -+check_include_file_concat(sys/stat.h HAVE_SYS_STAT_H) -+check_include_file_concat(sys/time.h HAVE_SYS_TIME_H) -+check_include_file_concat(sys/types.h HAVE_SYS_TYPES_H) -+check_include_file_concat(unistd.h HAVE_UNISTD_H) -+########## -+check_library_exists_concat(m log HAVE_LIBM) -+########## -+check_exists_define01(getrusage HAVE_GETRUSAGE) -+check_exists_define01(gettimeofday HAVE_GETTIMEOFDAY) -+check_exists_define01(vprintf HAVE_VPRINTF) #TODO: not used in code? -+######################################## -+set(CMAKE_EXTRA_INCLUDE_FILES sys/types.h) -+check_type_size(longlong SIZEOF_LONGLONG) # sets HAVE_SIZEOF_LONGLONG -+check_type_size(size_t SIZEOF_SIZE_T) # sets HAVE_SIZEOF_SIZE_T -+check_type_size(ssize_t SIZEOF_SSIZE_T) # sets HAVE_SIZEOF_SSIZE_T -+check_type_size(uchar SIZEOF_UCHAR) # sets HAVE_SIZEOF_UCHAR -+check_type_size(uint SIZEOF_UINT) # sets HAVE_SIZEOF_UINT -+check_type_size(ulong SIZEOF_ULONG) # sets HAVE_SIZEOF_ULONG -+check_type_size(ulonglong SIZEOF_ULONGLONG) # sets HAVE_SIZEOF_ULONGLONG -+check_type_size(ushort SIZEOF_USHORT) # sets HAVE_SIZEOF_USHORT -+set(CMAKE_EXTRA_INCLUDE_FILES) -+########## -+if(NOT HAVE_SIZEOF_LONGLONG) -+ set(longlong "long long") # Define to `long long' if does not define. -+endif() -+if(NOT HAVE_SIZEOF_SIZE_T) -+ set(size_t "unsigned") # Define to `unsigned' if does not define. -+endif() -+if(NOT HAVE_SIZEOF_SSIZE_T AND NOT WIN32) # TRICKY: don't define on Windows, see jas_config2.h -+ set(ssize_t "int") # Define to `int' if does not define. -+endif() -+if(NOT HAVE_SIZEOF_UCHAR) -+ set(uchar "unsigned char") # Define to `unsigned char' if does not define. -+endif() -+if(NOT HAVE_SIZEOF_UINT) -+ set(uint "unsigned int") # Define to `unsigned int' if does not define. -+endif() -+if(NOT HAVE_SIZEOF_ULONG) -+ set(ulong "unsigned long") # Define to `unsigned long' if does not define. -+endif() -+if(NOT HAVE_SIZEOF_ULONGLONG) -+ set(ulonglong "unsigned long long") # Define to `unsigned long long' if does not define. -+endif() -+if(NOT HAVE_SIZEOF_USHORT) -+ set(ushort "unsigned short") # Define to `unsigned short' if does not define. -+endif() -+######################################## -+# Name of package -+file(STRINGS jasper.spec PACKAGE REGEX "^%define[\t ]+package_name[ \t]+.") -+string(REGEX REPLACE "^%define[\t ]+package_name([ \t]+)" "" PACKAGE ${PACKAGE}) -+# Version number of package -+file(STRINGS jasper.spec VERSION REGEX "^%define[\t ]+ver[ \t]+([0-9]+)\\.([0-9]+)\\.([0-9]+)?") -+string(REGEX REPLACE "^%define[\t ]+ver([ \t]+)" "" VERSION ${VERSION}) -+set(JAS_VERSION ${VERSION}) -+# Define to the address where bug reports for this package should be sent. -+set(PACKAGE_BUGREPORT "http://groups.yahoo.com/group/jasper-discussion") -+# Define to the full name of this package. -+set(PACKAGE_NAME ${PACKAGE}) -+# Define to the version of this package. -+set(PACKAGE_VERSION ${VERSION}) -+# Define to the full name and version of this package. -+set(PACKAGE_STRING "${PACKAGE} ${PACKAGE_VERSION}") -+# Define to the one symbol short name of this package. -+set(PACKAGE_TARNAME ${PACKAGE}) -+######################################## -+option(DEBUG "Extra debugging support" FALSE) -+option(DEBUG_MEMALLOC "Debugging memory allocator" FALSE) -+option(DEBUG_OVERFLOW "Debugging overflow detection" FALSE) -+list(APPEND cmakedefine -+ DEBUG -+ DEBUG_MEMALLOC -+ DEBUG_OVERFLOW -+ ) -+######################################## -+# Define to 1 if you don't have `vprintf' but do have `_doprnt'. -+if(NOT HAVE_VPRINTF) -+check_c_source_compiles(" -+/* Define _doprnt to an innocuous variant, in case declares _doprnt. -+ For example, HP-UX 11i declares gettimeofday. */ -+#define _doprnt innocuous__doprnt -+ -+/* System header to define __stub macros and hopefully few prototypes, -+ which can conflict with char _doprnt (); below. -+ Prefer to if __STDC__ is defined, since -+ exists even on freestanding compilers. */ -+ -+#ifdef __STDC__ -+# include -+#else -+# include -+#endif -+ -+#undef _doprnt -+ -+/* Override any gcc2 internal prototype to avoid an error. */ -+#ifdef __cplusplus -+extern \"C\" -+{ -+#endif -+/* We use char because int might match the return type of a gcc2 -+ builtin and then its argument prototype would still apply. */ -+char _doprnt (); -+/* The GNU C library defines this for functions which it implements -+ to always fail with ENOSYS. Some functions are actually named -+ something starting with __ and the normal name is an alias. */ -+#if defined (__stub__doprnt) || defined (__stub____doprnt) -+choke me -+#else -+char (*f) () = _doprnt; -+#endif -+#ifdef __cplusplus -+} -+#endif -+ -+int -+main () -+{ -+return f != _doprnt; -+ ; -+ return 0; -+} -+" HAVE_DOPRNT # TODO: not used in code? -+ ) -+endif() -+list(APPEND cmakedefine01 HAVE_DOPRNT) -+######################################## -+# Have variable length arrays -+check_c_source_compiles(" -+int main() -+{ -+ int n; -+ int foo[n]; -+ ; -+ return 0; -+} -+" HAVE_VLA -+ ) -+list(APPEND cmakedefine01 HAVE_VLA) -+######################################## -+set(JAS_CONFIGURE TRUE) -+list(APPEND cmakedefine01 JAS_CONFIGURE) -+######################################## -+# Define to 1 if you have the ANSI C header files. -+set(STDC_HEADERS TRUE) #TODO: determine if true - only used in configure? -+list(APPEND cmakedefine01 STDC_HEADERS) -+######################################## -+# Define to 1 if the X Window System is missing or not being used. -+set(X_DISPLAY_MISSING FALSE) #TODO: determine if false, not used in code? -+list(APPEND cmakedefine01 X_DISPLAY_MISSING) -+######################################## -+# Define to empty if `const' does not conform to ANSI C. -+check_c_source_compiles(" -+int main() -+{ -+#ifndef __cplusplus -+ /* Ultrix mips cc rejects this sort of thing. */ -+ typedef int charset[2]; -+ const charset cs = { 0, 0 }; -+ /* SunOS 4.1.1 cc rejects this. */ -+ char const *const *pcpcc; -+ char **ppc; -+ /* NEC SVR4.0.2 mips cc rejects this. */ -+ struct point {int x, y;}; -+ static struct point const zero = {0,0}; -+ /* AIX XL C 1.02.0.0 rejects this. -+ It does not let you subtract one const X* pointer from another in -+ an arm of an if-expression whose if-part is not a constant -+ expression */ -+ const char *g = \"string\"; -+ pcpcc = &g + (g ? g-g : 0); -+ /* HPUX 7.0 cc rejects these. */ -+ ++pcpcc; -+ ppc = (char**) pcpcc; -+ pcpcc = (char const *const *) ppc; -+ { /* SCO 3.2v4 cc rejects this sort of thing. */ -+ char tx; -+ char *t = &tx; -+ char const *s = 0 ? (char *) 0 : (char const *) 0; -+ -+ *t++ = 0; -+ if (s) return 0; -+ } -+ { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ -+ int x[] = {25, 17}; -+ const int *foo = &x[0]; -+ ++foo; -+ } -+ { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ -+ typedef const int *iptr; -+ iptr p = 0; -+ ++p; -+ } -+ { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying -+ \"k.c\", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ -+ struct s { int j; const int *ap[3]; } bx; -+ struct s *b = &bx; b->j = 5; -+ } -+ { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ -+ const int foo = 10; -+ if (!foo) return 0; -+ } -+ return !cs[0] && !zero.x; -+#endif -+ ; -+ return 0; -+} -+" ANSI_CONST -+ ) -+if(NOT ANSI_CONST) -+ set(const empty) -+endif() -+list(APPEND cmakedefine const) -+######################################## -+unset(inline) -+######################################## -+foreach(var ${cmakedefine01}) -+ set_define(${var} 1) -+endforeach() -+foreach(var ${cmakedefine}) -+ set_define(${var}) -+endforeach() -+######################################## -+configure_file(${CMAKE_SOURCE_DIR}/src/libjasper/include/jasper/jas_config.h.in .) -+configure_file(${CMAKE_BINARY_DIR}/jas_config.h.in ${PROJECT_BINARY_DIR}/jasper/jas_config.h) -+include_directories(${PROJECT_BINARY_DIR}) -+if(EXISTS ${CMAKE_SOURCE_DIR}/src/libjasper/include/jasper/jas_config.h) -+ file(REMOVE ${CMAKE_SOURCE_DIR}/src/libjasper/include/jasper/jas_config.h) -+endif() -+################################################################################ -+set(CMAKE_REQUIRED_LIBRARIES) -+set(CMAKE_REQUIRED_DEFINITIONS) -diff --git a/src/appl/CMakeLists.txt b/src/appl/CMakeLists.txt -new file mode 100644 -index 0000000..ac6fa93 ---- /dev/null -+++ b/src/appl/CMakeLists.txt -@@ -0,0 +1,5 @@ -+set(exes imgcmp jasper) -+foreach(exe ${exes}) -+ add_executable(${exe} ${exe}.c) -+ target_link_libraries(${exe} libjasper ${JAS_SYSTEM_LIBS}) -+endforeach() -diff --git a/src/appl/imgcmp.c b/src/appl/imgcmp.c -index 255b581..83fec87 100644 ---- a/src/appl/imgcmp.c -+++ b/src/appl/imgcmp.c -@@ -507,6 +507,7 @@ jas_image_t *makediffimage(jas_matrix_t *origdata, jas_matrix_t *recondata) - - for (i = 0; i < 3; ++i) { - if (!(diffdata[i] = jas_matrix_create(height, width))) { -+ jas_image_destroy(diffimage); - fprintf(stderr, "internal error\n"); - return 0; - } -@@ -534,6 +535,7 @@ jas_image_t *makediffimage(jas_matrix_t *origdata, jas_matrix_t *recondata) - - for (i = 0; i < 3; ++i) { - if (jas_image_writecmpt(diffimage, i, 0, 0, width, height, diffdata[i])) { -+ jas_image_destroy(diffimage); - return 0; - } - } -diff --git a/src/libjasper/CMakeLists.txt b/src/libjasper/CMakeLists.txt -new file mode 100644 -index 0000000..8c69a5b ---- /dev/null -+++ b/src/libjasper/CMakeLists.txt -@@ -0,0 +1,180 @@ -+set(lib_name libjasper) -+####################################### -+set(base_srcs -+ base/jas_cm.c -+ base/jas_debug.c -+ base/jas_getopt.c -+ base/jas_icc.c -+ base/jas_iccdata.c -+ base/jas_image.c -+ base/jas_init.c -+ base/jas_malloc.c -+ base/jas_seq.c -+ base/jas_stream.c -+ base/jas_string.c -+ base/jas_tmr.c -+ base/jas_tvp.c -+ base/jas_version.c -+ ) -+source_group(base FILES ${base_srcs}) -+list(APPEND ${lib_name}_libsrcs ${base_srcs}) -+################### -+set(bmp_srcs -+ bmp/bmp_cod.c -+ bmp/bmp_cod.h -+ bmp/bmp_dec.c -+ bmp/bmp_enc.c -+ bmp/bmp_enc.h -+ ) -+source_group(bmp FILES ${bmp_srcs}) -+list(APPEND ${lib_name}_libsrcs ${bmp_srcs}) -+################### -+set(include_srcs -+ include/jasper/jas_cm.h -+ include/jasper/jas_config2.h -+ include/jasper/jas_debug.h -+ include/jasper/jas_fix.h -+ include/jasper/jas_getopt.h -+ include/jasper/jas_icc.h -+ include/jasper/jas_image.h -+ include/jasper/jas_init.h -+ include/jasper/jas_malloc.h -+ include/jasper/jas_math.h -+ include/jasper/jasper.h -+ include/jasper/jas_seq.h -+ include/jasper/jas_stream.h -+ include/jasper/jas_string.h -+ include/jasper/jas_tmr.h -+ include/jasper/jas_tvp.h -+ include/jasper/jas_types.h -+ include/jasper/jas_version.h -+ ${PROJECT_BINARY_DIR}/jasper/jas_config.h -+ ) -+source_group(include FILES ${include_srcs}) -+list(APPEND ${lib_name}_libsrcs ${include_srcs}) -+################### -+set(jp2_srcs -+ jp2/jp2_cod.c -+ jp2/jp2_cod.h -+ jp2/jp2_dec.c -+ jp2/jp2_dec.h -+ jp2/jp2_enc.c -+ ) -+source_group(jp2 FILES ${jp2_srcs}) -+list(APPEND ${lib_name}_libsrcs ${jp2_srcs}) -+################### -+set(jpc_srcs -+ jpc/jpc_bs.c -+ jpc/jpc_bs.h -+ jpc/jpc_cod.h -+ jpc/jpc_cs.c -+ jpc/jpc_cs.h -+ jpc/jpc_dec.c -+ jpc/jpc_dec.h -+ jpc/jpc_enc.c -+ jpc/jpc_enc.h -+ jpc/jpc_fix.h -+ jpc/jpc_flt.h -+ jpc/jpc_math.c -+ jpc/jpc_math.h -+ jpc/jpc_mct.c -+ jpc/jpc_mct.h -+ jpc/jpc_mqcod.c -+ jpc/jpc_mqcod.h -+ jpc/jpc_mqdec.c -+ jpc/jpc_mqdec.h -+ jpc/jpc_mqenc.c -+ jpc/jpc_mqenc.h -+ jpc/jpc_qmfb.c -+ jpc/jpc_qmfb.h -+ jpc/jpc_t1cod.c -+ jpc/jpc_t1cod.h -+ jpc/jpc_t1dec.c -+ jpc/jpc_t1dec.h -+ jpc/jpc_t1enc.c -+ jpc/jpc_t1enc.h -+ jpc/jpc_t2cod.c -+ jpc/jpc_t2cod.h -+ jpc/jpc_t2dec.c -+ jpc/jpc_t2dec.h -+ jpc/jpc_t2enc.c -+ jpc/jpc_t2enc.h -+ jpc/jpc_tagtree.c -+ jpc/jpc_tagtree.h -+ jpc/jpc_tsfb.c -+ jpc/jpc_tsfb.h -+ jpc/jpc_util.c -+ jpc/jpc_util.h -+ ) -+source_group(jpc FILES ${jpc_srcs}) -+list(APPEND ${lib_name}_libsrcs ${jpc_srcs}) -+################### -+set(jpg_srcs -+ jpg/jpg_cod.h -+ jpg/jpg_dummy.c -+ jpg/jpg_val.c -+ ) -+source_group(jpg FILES ${jpg_srcs}) -+list(APPEND ${lib_name}_libsrcs ${jpg_srcs}) -+################### -+set(mif_srcs -+ mif/mif_cod.c -+ mif/mif_cod.h -+ ) -+source_group(mif FILES ${mif_srcs}) -+list(APPEND ${lib_name}_libsrcs ${mif_srcs}) -+################### -+set(pgx_srcs -+ pgx/pgx_cod.c -+ pgx/pgx_cod.h -+ pgx/pgx_dec.c -+ pgx/pgx_enc.c -+ pgx/pgx_enc.h -+ ) -+source_group(pgx FILES ${pgx_srcs}) -+list(APPEND ${lib_name}_libsrcs ${pgx_srcs}) -+################### -+set(pnm_srcs -+ pnm/pnm_cod.c -+ pnm/pnm_cod.h -+ pnm/pnm_dec.c -+ pnm/pnm_enc.c -+ pnm/pnm_enc.h -+ ) -+source_group(pnm FILES ${pnm_srcs}) -+list(APPEND ${lib_name}_libsrcs ${pnm_srcs}) -+################### -+set(ras_srcs -+ ras/ras_cod.c -+ ras/ras_cod.h -+ ras/ras_dec.c -+ ras/ras_enc.c -+ ras/ras_enc.h -+ ) -+source_group(ras FILES ${ras_srcs}) -+list(APPEND ${lib_name}_libsrcs ${ras_srcs}) -+####################################### -+add_library(${lib_name} STATIC ${${lib_name}_libsrcs}) -+target_include_directories(${lib_name} PUBLIC $ -+ $ -+ ) -+if(MSVC) -+ target_compile_definitions(${lib_name} PRIVATE -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS) -+endif() -+# strip off the "lib" prefix, since it's already libjasper -+set_target_properties(${lib_name} PROPERTIES PREFIX "") -+####################################### -+set(targetsFile ${PROJECT_NAME}-targets) -+install(TARGETS ${lib_name} EXPORT ${targetsFile} -+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} -+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} -+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} -+ ) -+install(FILES ${include_srcs} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME}) -+if(DEFINED XP_NAMESPACE) -+ set(nameSpace NAMESPACE ${XP_NAMESPACE}::) -+endif() -+if(NOT DEFINED XP_INSTALL_CMAKEDIR) -+ set(XP_INSTALL_CMAKEDIR ${CMAKE_INSTALL_DATADIR}/cmake) -+endif() -+install(EXPORT ${targetsFile} DESTINATION ${XP_INSTALL_CMAKEDIR} ${nameSpace}) -diff --git a/src/libjasper/base/jas_cm.c b/src/libjasper/base/jas_cm.c -index 77514dd..c30f339 100644 ---- a/src/libjasper/base/jas_cm.c -+++ b/src/libjasper/base/jas_cm.c -@@ -355,6 +355,8 @@ jas_cmprof_t *jas_cmprof_copy(jas_cmprof_t *prof) - } - return newprof; - error: -+ if (newprof) -+ jas_cmprof_destroy(newprof); - return 0; - } - -@@ -458,6 +460,8 @@ jas_cmxform_t *jas_cmxform_create(jas_cmprof_t *inprof, jas_cmprof_t *outprof, - } - return xform; - error: -+ if (xform) -+ jas_cmxform_destroy(xform); - return 0; - } - -@@ -614,6 +618,8 @@ static jas_cmpxformseq_t *jas_cmpxformseq_copy(jas_cmpxformseq_t *pxformseq) - goto error; - return newpxformseq; - error: -+ if (newpxformseq) -+ jas_cmpxformseq_destroy(newpxformseq); - return 0; - } - -@@ -704,8 +710,7 @@ static int jas_cmpxformseq_resize(jas_cmpxformseq_t *pxformseq, int n) - { - jas_cmpxform_t **p; - assert(n >= pxformseq->numpxforms); -- p = (!pxformseq->pxforms) ? jas_malloc(n * sizeof(jas_cmpxform_t *)) : -- jas_realloc(pxformseq->pxforms, n * sizeof(jas_cmpxform_t *)); -+ p = jas_realloc2(pxformseq->pxforms, n, sizeof(jas_cmpxform_t *)); - if (!p) { - return -1; - } -@@ -889,13 +894,13 @@ static int jas_cmshapmatlut_set(jas_cmshapmatlut_t *lut, jas_icccurv_t *curv) - jas_cmshapmatlut_cleanup(lut); - if (curv->numents == 0) { - lut->size = 2; -- if (!(lut->data = jas_malloc(lut->size * sizeof(jas_cmreal_t)))) -+ if (!(lut->data = jas_alloc2(lut->size, sizeof(jas_cmreal_t)))) - goto error; - lut->data[0] = 0.0; - lut->data[1] = 1.0; - } else if (curv->numents == 1) { - lut->size = 256; -- if (!(lut->data = jas_malloc(lut->size * sizeof(jas_cmreal_t)))) -+ if (!(lut->data = jas_alloc2(lut->size, sizeof(jas_cmreal_t)))) - goto error; - gamma = curv->ents[0] / 256.0; - for (i = 0; i < lut->size; ++i) { -@@ -903,7 +908,7 @@ static int jas_cmshapmatlut_set(jas_cmshapmatlut_t *lut, jas_icccurv_t *curv) - } - } else { - lut->size = curv->numents; -- if (!(lut->data = jas_malloc(lut->size * sizeof(jas_cmreal_t)))) -+ if (!(lut->data = jas_alloc2(lut->size, sizeof(jas_cmreal_t)))) - goto error; - for (i = 0; i < lut->size; ++i) { - lut->data[i] = curv->ents[i] / 65535.0; -@@ -953,7 +958,7 @@ static int jas_cmshapmatlut_invert(jas_cmshapmatlut_t *invlut, - return -1; - } - } -- if (!(invlut->data = jas_malloc(n * sizeof(jas_cmreal_t)))) -+ if (!(invlut->data = jas_alloc2(n, sizeof(jas_cmreal_t)))) - return -1; - invlut->size = n; - for (i = 0; i < invlut->size; ++i) { -diff --git a/src/libjasper/base/jas_icc.c b/src/libjasper/base/jas_icc.c -index e5a0a2e..c13d7ac 100644 ---- a/src/libjasper/base/jas_icc.c -+++ b/src/libjasper/base/jas_icc.c -@@ -266,7 +266,6 @@ jas_iccprof_t *jas_iccprof_load(jas_stream_t *in) - jas_iccattrval_t *attrval; - jas_iccattrval_t *prevattrval; - jas_icctagtabent_t *tagtabent; -- jas_iccattrvalinfo_t *attrvalinfo; - int i; - int len; - -@@ -300,6 +299,7 @@ jas_iccprof_t *jas_iccprof_load(jas_stream_t *in) - if (jas_iccprof_setattr(prof, tagtabent->tag, attrval)) - goto error; - jas_iccattrval_destroy(attrval); -+ attrval = 0; - } else { - #if 0 - jas_eprintf("warning: skipping unknown tag type\n"); -@@ -325,7 +325,7 @@ jas_iccprof_t *jas_iccprof_load(jas_stream_t *in) - goto error; - } - curoff += 8; -- if (!(attrvalinfo = jas_iccattrvalinfo_lookup(type))) { -+ if (!jas_iccattrvalinfo_lookup(type)) { - #if 0 - jas_eprintf("warning: skipping unknown tag type\n"); - #endif -@@ -373,7 +373,7 @@ int jas_iccprof_save(jas_iccprof_t *prof, jas_stream_t *out) - jas_icctagtab_t *tagtab; - - tagtab = &prof->tagtab; -- if (!(tagtab->ents = jas_malloc(prof->attrtab->numattrs * -+ if (!(tagtab->ents = jas_alloc2(prof->attrtab->numattrs, - sizeof(jas_icctagtabent_t)))) - goto error; - tagtab->numents = prof->attrtab->numattrs; -@@ -522,7 +522,7 @@ static int jas_iccprof_gettagtab(jas_stream_t *in, jas_icctagtab_t *tagtab) - } - if (jas_iccgetuint32(in, &tagtab->numents)) - goto error; -- if (!(tagtab->ents = jas_malloc(tagtab->numents * -+ if (!(tagtab->ents = jas_alloc2(tagtab->numents, - sizeof(jas_icctagtabent_t)))) - goto error; - tagtabent = tagtab->ents; -@@ -743,8 +743,7 @@ static int jas_iccattrtab_resize(jas_iccattrtab_t *tab, int maxents) - { - jas_iccattr_t *newattrs; - assert(maxents >= tab->numattrs); -- newattrs = tab->attrs ? jas_realloc(tab->attrs, maxents * -- sizeof(jas_iccattr_t)) : jas_malloc(maxents * sizeof(jas_iccattr_t)); -+ newattrs = jas_realloc2(tab->attrs, maxents, sizeof(jas_iccattr_t)); - if (!newattrs) - return -1; - tab->attrs = newattrs; -@@ -999,7 +998,7 @@ static int jas_icccurv_input(jas_iccattrval_t *attrval, jas_stream_t *in, - - if (jas_iccgetuint32(in, &curv->numents)) - goto error; -- if (!(curv->ents = jas_malloc(curv->numents * sizeof(jas_iccuint16_t)))) -+ if (!(curv->ents = jas_alloc2(curv->numents, sizeof(jas_iccuint16_t)))) - goto error; - for (i = 0; i < curv->numents; ++i) { - if (jas_iccgetuint16(in, &curv->ents[i])) -@@ -1011,7 +1010,6 @@ static int jas_icccurv_input(jas_iccattrval_t *attrval, jas_stream_t *in, - return 0; - - error: -- jas_icccurv_destroy(attrval); - return -1; - } - -@@ -1100,7 +1098,7 @@ static int jas_icctxtdesc_input(jas_iccattrval_t *attrval, jas_stream_t *in, - if (jas_iccgetuint32(in, &txtdesc->uclangcode) || - jas_iccgetuint32(in, &txtdesc->uclen)) - goto error; -- if (!(txtdesc->ucdata = jas_malloc(txtdesc->uclen * 2))) -+ if (!(txtdesc->ucdata = jas_alloc2(txtdesc->uclen, 2))) - goto error; - if (jas_stream_read(in, txtdesc->ucdata, txtdesc->uclen * 2) != - JAS_CAST(int, txtdesc->uclen * 2)) -@@ -1129,7 +1127,6 @@ static int jas_icctxtdesc_input(jas_iccattrval_t *attrval, jas_stream_t *in, - #endif - return 0; - error: -- jas_icctxtdesc_destroy(attrval); - return -1; - } - -@@ -1208,8 +1205,6 @@ static int jas_icctxt_input(jas_iccattrval_t *attrval, jas_stream_t *in, - goto error; - return 0; - error: -- if (txt->string) -- jas_free(txt->string); - return -1; - } - -@@ -1292,17 +1287,17 @@ static int jas_icclut8_input(jas_iccattrval_t *attrval, jas_stream_t *in, - jas_iccgetuint16(in, &lut8->numouttabents)) - goto error; - clutsize = jas_iccpowi(lut8->clutlen, lut8->numinchans) * lut8->numoutchans; -- if (!(lut8->clut = jas_malloc(clutsize * sizeof(jas_iccuint8_t))) || -- !(lut8->intabsbuf = jas_malloc(lut8->numinchans * -- lut8->numintabents * sizeof(jas_iccuint8_t))) || -- !(lut8->intabs = jas_malloc(lut8->numinchans * -+ if (!(lut8->clut = jas_alloc2(clutsize, sizeof(jas_iccuint8_t))) || -+ !(lut8->intabsbuf = jas_alloc3(lut8->numinchans, -+ lut8->numintabents, sizeof(jas_iccuint8_t))) || -+ !(lut8->intabs = jas_alloc2(lut8->numinchans, - sizeof(jas_iccuint8_t *)))) - goto error; - for (i = 0; i < lut8->numinchans; ++i) - lut8->intabs[i] = &lut8->intabsbuf[i * lut8->numintabents]; -- if (!(lut8->outtabsbuf = jas_malloc(lut8->numoutchans * -- lut8->numouttabents * sizeof(jas_iccuint8_t))) || -- !(lut8->outtabs = jas_malloc(lut8->numoutchans * -+ if (!(lut8->outtabsbuf = jas_alloc3(lut8->numoutchans, -+ lut8->numouttabents, sizeof(jas_iccuint8_t))) || -+ !(lut8->outtabs = jas_alloc2(lut8->numoutchans, - sizeof(jas_iccuint8_t *)))) - goto error; - for (i = 0; i < lut8->numoutchans; ++i) -@@ -1330,7 +1325,6 @@ static int jas_icclut8_input(jas_iccattrval_t *attrval, jas_stream_t *in, - goto error; - return 0; - error: -- jas_icclut8_destroy(attrval); - return -1; - } - -@@ -1461,17 +1455,17 @@ static int jas_icclut16_input(jas_iccattrval_t *attrval, jas_stream_t *in, - jas_iccgetuint16(in, &lut16->numouttabents)) - goto error; - clutsize = jas_iccpowi(lut16->clutlen, lut16->numinchans) * lut16->numoutchans; -- if (!(lut16->clut = jas_malloc(clutsize * sizeof(jas_iccuint16_t))) || -- !(lut16->intabsbuf = jas_malloc(lut16->numinchans * -- lut16->numintabents * sizeof(jas_iccuint16_t))) || -- !(lut16->intabs = jas_malloc(lut16->numinchans * -+ if (!(lut16->clut = jas_alloc2(clutsize, sizeof(jas_iccuint16_t))) || -+ !(lut16->intabsbuf = jas_alloc3(lut16->numinchans, -+ lut16->numintabents, sizeof(jas_iccuint16_t))) || -+ !(lut16->intabs = jas_alloc2(lut16->numinchans, - sizeof(jas_iccuint16_t *)))) - goto error; - for (i = 0; i < lut16->numinchans; ++i) - lut16->intabs[i] = &lut16->intabsbuf[i * lut16->numintabents]; -- if (!(lut16->outtabsbuf = jas_malloc(lut16->numoutchans * -- lut16->numouttabents * sizeof(jas_iccuint16_t))) || -- !(lut16->outtabs = jas_malloc(lut16->numoutchans * -+ if (!(lut16->outtabsbuf = jas_alloc3(lut16->numoutchans, -+ lut16->numouttabents, sizeof(jas_iccuint16_t))) || -+ !(lut16->outtabs = jas_alloc2(lut16->numoutchans, - sizeof(jas_iccuint16_t *)))) - goto error; - for (i = 0; i < lut16->numoutchans; ++i) -@@ -1499,7 +1493,6 @@ static int jas_icclut16_input(jas_iccattrval_t *attrval, jas_stream_t *in, - goto error; - return 0; - error: -- jas_icclut16_destroy(attrval); - return -1; - } - -@@ -1699,6 +1692,8 @@ jas_iccprof_t *jas_iccprof_createfrombuf(uchar *buf, int len) - jas_stream_close(in); - return prof; - error: -+ if (in) -+ jas_stream_close(in); - return 0; - } - -diff --git a/src/libjasper/base/jas_image.c b/src/libjasper/base/jas_image.c -index 876debb..64883aa 100644 ---- a/src/libjasper/base/jas_image.c -+++ b/src/libjasper/base/jas_image.c -@@ -142,7 +142,7 @@ jas_image_t *jas_image_create(int numcmpts, jas_image_cmptparm_t *cmptparms, - image->inmem_ = true; - - /* Allocate memory for the per-component information. */ -- if (!(image->cmpts_ = jas_malloc(image->maxcmpts_ * -+ if (!(image->cmpts_ = jas_alloc2(image->maxcmpts_, - sizeof(jas_image_cmpt_t *)))) { - jas_image_destroy(image); - return 0; -@@ -210,7 +210,10 @@ jas_image_t *jas_image_copy(jas_image_t *image) - jas_image_t *newimage; - int cmptno; - -- newimage = jas_image_create0(); -+ if (!(newimage = jas_image_create0())) { -+ goto error; -+ } -+ - if (jas_image_growcmpts(newimage, image->numcmpts_)) { - goto error; - } -@@ -265,15 +268,19 @@ static jas_image_cmpt_t *jas_image_cmpt_copy(jas_image_cmpt_t *cmpt) - newcmpt->cps_ = cmpt->cps_; - newcmpt->type_ = cmpt->type_; - if (!(newcmpt->stream_ = jas_stream_memopen(0, 0))) { -+ jas_image_cmpt_destroy(newcmpt); - return 0; - } - if (jas_stream_seek(cmpt->stream_, 0, SEEK_SET)) { -+ jas_image_cmpt_destroy(newcmpt); - return 0; - } - if (jas_stream_copy(newcmpt->stream_, cmpt->stream_, -1)) { -+ jas_image_cmpt_destroy(newcmpt); - return 0; - } - if (jas_stream_seek(newcmpt->stream_, 0, SEEK_SET)) { -+ jas_image_cmpt_destroy(newcmpt); - return 0; - } - return newcmpt; -@@ -426,7 +433,7 @@ int jas_image_readcmpt(jas_image_t *image, int cmptno, jas_image_coord_t x, - return -1; - } - -- if (jas_matrix_numrows(data) != height || jas_matrix_numcols(data) != width) { -+ if (!height || !width || jas_matrix_numrows(data) != height || jas_matrix_numcols(data) != width) { - if (jas_matrix_resize(data, height, width)) { - return -1; - } -@@ -479,7 +486,7 @@ int jas_image_writecmpt(jas_image_t *image, int cmptno, jas_image_coord_t x, jas - return -1; - } - -- if (jas_matrix_numrows(data) != height || jas_matrix_numcols(data) != width) { -+ if (!height || !width || jas_matrix_numrows(data) != height || jas_matrix_numcols(data) != width) { - return -1; - } - -@@ -774,8 +781,7 @@ static int jas_image_growcmpts(jas_image_t *image, int maxcmpts) - jas_image_cmpt_t **newcmpts; - int cmptno; - -- newcmpts = (!image->cmpts_) ? jas_malloc(maxcmpts * sizeof(jas_image_cmpt_t *)) : -- jas_realloc(image->cmpts_, maxcmpts * sizeof(jas_image_cmpt_t *)); -+ newcmpts = jas_realloc2(image->cmpts_, maxcmpts, sizeof(jas_image_cmpt_t *)); - if (!newcmpts) { - return -1; - } -@@ -1441,5 +1447,11 @@ jas_image_dump(outimage, stderr); - #endif - return outimage; - error: -+ if (xform) -+ jas_cmxform_destroy(xform); -+ if (inimage) -+ jas_image_destroy(inimage); -+ if (outimage) -+ jas_image_destroy(outimage); - return 0; - } -diff --git a/src/libjasper/base/jas_malloc.c b/src/libjasper/base/jas_malloc.c -index 13f7bc8..90658e8 100644 ---- a/src/libjasper/base/jas_malloc.c -+++ b/src/libjasper/base/jas_malloc.c -@@ -76,6 +76,9 @@ - - /* We need the prototype for memset. */ - #include -+#include -+#include -+#include - - #include "jasper/jas_malloc.h" - -@@ -113,18 +116,50 @@ void jas_free(void *ptr) - - void *jas_realloc(void *ptr, size_t size) - { -- return realloc(ptr, size); -+ return ptr ? realloc(ptr, size) : malloc(size); - } - --void *jas_calloc(size_t nmemb, size_t size) -+void *jas_realloc2(void *ptr, size_t nmemb, size_t size) -+{ -+ if (!ptr) -+ return jas_alloc2(nmemb, size); -+ if (nmemb && SIZE_MAX / nmemb < size) { -+ errno = ENOMEM; -+ return NULL; -+ } -+ return jas_realloc(ptr, nmemb * size); -+ -+} -+ -+void *jas_alloc2(size_t nmemb, size_t size) -+{ -+ if (nmemb && SIZE_MAX / nmemb < size) { -+ errno = ENOMEM; -+ return NULL; -+ } -+ -+ return jas_malloc(nmemb * size); -+} -+ -+void *jas_alloc3(size_t a, size_t b, size_t c) - { -- void *ptr; - size_t n; -- n = nmemb * size; -- if (!(ptr = jas_malloc(n * sizeof(char)))) { -- return 0; -+ -+ if (a && SIZE_MAX / a < b) { -+ errno = ENOMEM; -+ return NULL; - } -- memset(ptr, 0, n); -+ -+ return jas_alloc2(a*b, c); -+} -+ -+void *jas_calloc(size_t nmemb, size_t size) -+{ -+ void *ptr; -+ -+ ptr = jas_alloc2(nmemb, size); -+ if (ptr) -+ memset(ptr, 0, nmemb*size); - return ptr; - } - -diff --git a/src/libjasper/base/jas_seq.c b/src/libjasper/base/jas_seq.c -index 16e1778..ed0c7cf 100644 ---- a/src/libjasper/base/jas_seq.c -+++ b/src/libjasper/base/jas_seq.c -@@ -114,7 +114,7 @@ jas_matrix_t *jas_matrix_create(int numrows, int numcols) - matrix->datasize_ = numrows * numcols; - - if (matrix->maxrows_ > 0) { -- if (!(matrix->rows_ = jas_malloc(matrix->maxrows_ * -+ if (!(matrix->rows_ = jas_alloc2(matrix->maxrows_, - sizeof(jas_seqent_t *)))) { - jas_matrix_destroy(matrix); - return 0; -@@ -122,7 +122,7 @@ jas_matrix_t *jas_matrix_create(int numrows, int numcols) - } - - if (matrix->datasize_ > 0) { -- if (!(matrix->data_ = jas_malloc(matrix->datasize_ * -+ if (!(matrix->data_ = jas_alloc2(matrix->datasize_, - sizeof(jas_seqent_t)))) { - jas_matrix_destroy(matrix); - return 0; -@@ -220,7 +220,11 @@ void jas_matrix_bindsub(jas_matrix_t *mat0, jas_matrix_t *mat1, int r0, int c0, - mat0->numrows_ = r1 - r0 + 1; - mat0->numcols_ = c1 - c0 + 1; - mat0->maxrows_ = mat0->numrows_; -- mat0->rows_ = jas_malloc(mat0->maxrows_ * sizeof(jas_seqent_t *)); -+ if (!(mat0->rows_ = jas_alloc2(mat0->maxrows_, sizeof(jas_seqent_t *)))) { -+ jas_matrix_destroy(mat0); -+ return; -+ } -+ - for (i = 0; i < mat0->numrows_; ++i) { - mat0->rows_[i] = mat1->rows_[r0 + i] + c0; - } -@@ -262,6 +266,8 @@ void jas_matrix_divpow2(jas_matrix_t *matrix, int n) - int rowstep; - jas_seqent_t *data; - -+ if (!matrix || !matrix->numrows_ || !matrix->rows_) -+ return; - rowstep = jas_matrix_rowstep(matrix); - for (i = matrix->numrows_, rowstart = matrix->rows_[0]; i > 0; --i, - rowstart += rowstep) { -@@ -282,6 +288,8 @@ void jas_matrix_clip(jas_matrix_t *matrix, jas_seqent_t minval, jas_seqent_t max - jas_seqent_t *data; - int rowstep; - -+ if (!matrix || !matrix->numrows_ || !matrix->rows_) -+ return; - rowstep = jas_matrix_rowstep(matrix); - for (i = matrix->numrows_, rowstart = matrix->rows_[0]; i > 0; --i, - rowstart += rowstep) { -@@ -307,6 +315,8 @@ void jas_matrix_asr(jas_matrix_t *matrix, int n) - jas_seqent_t *data; - - assert(n >= 0); -+ if (!matrix || !matrix->numrows_ || !matrix->rows_) -+ return; - rowstep = jas_matrix_rowstep(matrix); - for (i = matrix->numrows_, rowstart = matrix->rows_[0]; i > 0; --i, - rowstart += rowstep) { -@@ -325,6 +335,8 @@ void jas_matrix_asl(jas_matrix_t *matrix, int n) - int rowstep; - jas_seqent_t *data; - -+ if (!matrix || !matrix->numrows_ || !matrix->rows_) -+ return; - rowstep = jas_matrix_rowstep(matrix); - for (i = matrix->numrows_, rowstart = matrix->rows_[0]; i > 0; --i, - rowstart += rowstep) { -@@ -367,6 +379,8 @@ void jas_matrix_setall(jas_matrix_t *matrix, jas_seqent_t val) - int rowstep; - jas_seqent_t *data; - -+ if (!matrix || !matrix->numrows_ || !matrix->rows_) -+ return; - rowstep = jas_matrix_rowstep(matrix); - for (i = matrix->numrows_, rowstart = matrix->rows_[0]; i > 0; --i, - rowstart += rowstep) { -@@ -395,7 +409,7 @@ jas_matrix_t *jas_seq2d_input(FILE *in) - if (!(matrix = jas_seq2d_create(xoff, yoff, xoff + numcols, yoff + numrows))) - return 0; - -- if (jas_matrix_numrows(matrix) != numrows || jas_matrix_numcols(matrix) != numcols) { -+ if (!matrix || jas_matrix_numrows(matrix) != numrows || jas_matrix_numcols(matrix) != numcols) { - abort(); - } - -diff --git a/src/libjasper/base/jas_stream.c b/src/libjasper/base/jas_stream.c -index 9a88556..d7151c7 100644 ---- a/src/libjasper/base/jas_stream.c -+++ b/src/libjasper/base/jas_stream.c -@@ -212,7 +212,7 @@ jas_stream_t *jas_stream_memopen(char *buf, int bufsize) - if (buf) { - obj->buf_ = (unsigned char *) buf; - } else { -- obj->buf_ = jas_malloc(obj->bufsize_ * sizeof(char)); -+ obj->buf_ = jas_malloc(obj->bufsize_); - obj->myalloc_ = 1; - } - if (!obj->buf_) { -@@ -364,8 +364,11 @@ jas_stream_t *jas_stream_tmpfile() - obj->pathname[0] = '\0'; - stream->obj_ = obj; - -+#ifdef _MSC_VER - /* Choose a file name. */ -- tmpnam(obj->pathname); -+ char *temppathname = tempnam(NULL, "jas"); -+ strcpy(obj->pathname, temppathname); -+ free(temppathname); - - /* Open the underlying file. */ - if ((obj->fd = open(obj->pathname, O_CREAT | O_EXCL | O_RDWR | O_TRUNC | O_BINARY, -@@ -373,6 +376,16 @@ jas_stream_t *jas_stream_tmpfile() - jas_stream_destroy(stream); - return 0; - } -+#else -+ /* Choose a file name. */ -+ snprintf(obj->pathname, L_tmpnam, "%s/tmp.XXXXXXXXXX", P_tmpdir); -+ -+ /* Open the underlying file. */ -+ if ((obj->fd = mkstemp(obj->pathname)) < 0) { -+ jas_stream_destroy(stream); -+ return 0; -+ } -+#endif - - /* Unlink the file so that it will disappear if the program - terminates abnormally. */ -@@ -381,8 +394,13 @@ jas_stream_t *jas_stream_tmpfile() - For example, under Microsoft Windows the unlink operation will fail, - since the file is open. */ - if (unlink(obj->pathname)) { -+#ifdef _MSC_VER - /* We will try unlinking the file again after it is closed. */ - obj->flags |= JAS_STREAM_FILEOBJ_DELONCLOSE; -+#else -+ jas_stream_destroy(stream); -+ return 0; -+#endif - } - - /* Use full buffering. */ -@@ -553,7 +571,7 @@ int jas_stream_printf(jas_stream_t *stream, const char *fmt, ...) - int ret; - - va_start(ap, fmt); -- ret = vsprintf(buf, fmt, ap); -+ ret = vsnprintf(buf, sizeof buf, fmt, ap); - jas_stream_puts(stream, buf); - va_end(ap); - return ret; -@@ -992,7 +1010,7 @@ static int mem_resize(jas_stream_memobj_t *m, int bufsize) - unsigned char *buf; - - assert(m->buf_); -- if (!(buf = jas_realloc(m->buf_, bufsize * sizeof(unsigned char)))) { -+ if (!(buf = jas_realloc(m->buf_, bufsize))) { - return -1; - } - m->buf_ = buf; -diff --git a/src/libjasper/bmp/bmp_dec.c b/src/libjasper/bmp/bmp_dec.c -index 4cb0df3..7a6dcb1 100644 ---- a/src/libjasper/bmp/bmp_dec.c -+++ b/src/libjasper/bmp/bmp_dec.c -@@ -283,7 +283,7 @@ static bmp_info_t *bmp_getinfo(jas_stream_t *in) - } - - if (info->numcolors > 0) { -- if (!(info->palents = jas_malloc(info->numcolors * -+ if (!(info->palents = jas_alloc2(info->numcolors, - sizeof(bmp_palent_t)))) { - bmp_info_destroy(info); - return 0; -diff --git a/src/libjasper/bmp/bmp_enc.c b/src/libjasper/bmp/bmp_enc.c -index 26c658c..4cb2294 100644 ---- a/src/libjasper/bmp/bmp_enc.c -+++ b/src/libjasper/bmp/bmp_enc.c -@@ -205,16 +205,19 @@ int bmp_encode(jas_image_t *image, jas_stream_t *out, char *optstr) - - /* Write the bitmap header. */ - if (bmp_puthdr(out, &hdr)) { -+ bmp_info_destroy(info); - return -1; - } - - /* Write the bitmap information. */ - if (bmp_putinfo(out, info)) { -+ bmp_info_destroy(info); - return -1; - } - - /* Write the bitmap data. */ - if (bmp_putdata(out, info, image, enc->cmpts)) { -+ bmp_info_destroy(info); - return -1; - } - -diff --git a/src/libjasper/include/jasper/jas_config.h.in b/src/libjasper/include/jasper/jas_config.h.in -index a7375de..4a979bb 100644 ---- a/src/libjasper/include/jasper/jas_config.h.in -+++ b/src/libjasper/include/jasper/jas_config.h.in -@@ -1,4 +1,6 @@ --/* src/libjasper/include/jasper/jas_config.h.in. Generated from configure.ac by autoheader. */ -+/* jasper/jas_config.h. Generated by configure.cmake. */ -+/* From src/libjasper/include/jasper/jas_config.h.cmake.in. */ -+/* Which was Copied, then modified from src/libjasper/include/jasper/jas_config.h.in. */ - - - /* Avoid problems due to multiple inclusion. */ -@@ -6,167 +8,155 @@ - #define JAS_CONFIG_H - - /* This preprocessor symbol identifies the version of JasPer. */ --#undef JAS_VERSION -+#cmakedefine JAS_VERSION "@JAS_VERSION@" - /* If configure is being used, this symbol will be defined automatically - at this point in the configuration header file. */ - --/* The preprocessor symbol JAS_WIN_MSVC_BUILD should not be defined -- unless the JasPer software is being built under Microsoft Windows -- using Microsoft Visual C. */ --#if !defined(JAS_WIN_MSVC_BUILD) --/* A configure-based build is being used. */ -- -- - - /* Extra debugging support */ --#undef DEBUG -+#@DEFINE_DEBUG@ DEBUG - - /* Debugging memory allocator */ --#undef DEBUG_MEMALLOC -+#@DEFINE_DEBUG_MEMALLOC@ DEBUG_MEMALLOC - - /* Debugging overflow detection */ --#undef DEBUG_OVERFLOW -+#@DEFINE_DEBUG_OVERFLOW@ DEBUG_OVERFLOW - - /* Define to 1 if you have the header file. */ --#undef HAVE_DLFCN_H -+#@DEFINE_HAVE_DLFCN_H@ HAVE_DLFCN_H - - /* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */ --#undef HAVE_DOPRNT -+#@DEFINE_HAVE_DOPRNT@ HAVE_DOPRNT - - /* Define to 1 if you have the header file. */ --#undef HAVE_FCNTL_H -+#@DEFINE_HAVE_FCNTL_H@ HAVE_FCNTL_H - - /* Define to 1 if you have the `getrusage' function. */ --#undef HAVE_GETRUSAGE -+#@DEFINE_HAVE_GETRUSAGE@ HAVE_GETRUSAGE - - /* Define to 1 if you have the `gettimeofday' function. */ --#undef HAVE_GETTIMEOFDAY -+#@DEFINE_HAVE_GETTIMEOFDAY@ HAVE_GETTIMEOFDAY - - /* Define to 1 if you have the header file. */ --#undef HAVE_INTTYPES_H -+#@DEFINE_HAVE_INTTYPES_H@ HAVE_INTTYPES_H - - /* Define to 1 if you have the header file. */ --#undef HAVE_IO_H -+#@DEFINE_HAVE_IO_H@ HAVE_IO_H - - /* Define to 1 if you have the `m' library (-lm). */ --#undef HAVE_LIBM -+#@DEFINE_HAVE_LIBM@ HAVE_LIBM - - /* Define to 1 if you have the header file. */ --#undef HAVE_LIMITS_H -+#@DEFINE_HAVE_LIMITS_H@ HAVE_LIMITS_H - - /* Define to 1 if you have the header file. */ --#undef HAVE_MEMORY_H -+#@DEFINE_HAVE_MEMORY_H@ HAVE_MEMORY_H - - /* Define to 1 if you have the header file. */ --#undef HAVE_STDBOOL_H -+#@DEFINE_HAVE_STDBOOL_H@ HAVE_STDBOOL_H - - /* Define to 1 if you have the header file. */ --#undef HAVE_STDDEF_H -+#@DEFINE_HAVE_STDDEF_H@ HAVE_STDDEF_H - - /* Define to 1 if you have the header file. */ --#undef HAVE_STDINT_H -+#@DEFINE_HAVE_STDINT_H@ HAVE_STDINT_H - - /* Define to 1 if you have the header file. */ --#undef HAVE_STDLIB_H -+#@DEFINE_HAVE_STDLIB_H@ HAVE_STDLIB_H - - /* Define to 1 if you have the header file. */ --#undef HAVE_STRINGS_H -+#@DEFINE_HAVE_STRINGS_H@ HAVE_STRINGS_H - - /* Define to 1 if you have the header file. */ --#undef HAVE_STRING_H -+#@DEFINE_HAVE_STRING_H@ HAVE_STRING_H - - /* Define to 1 if you have the header file. */ --#undef HAVE_SYS_STAT_H -+#@DEFINE_HAVE_SYS_STAT_H@ HAVE_SYS_STAT_H - - /* Define to 1 if you have the header file. */ --#undef HAVE_SYS_TIME_H -+#@DEFINE_HAVE_SYS_TIME_H@ HAVE_SYS_TIME_H - - /* Define to 1 if you have the header file. */ --#undef HAVE_SYS_TYPES_H -+#@DEFINE_HAVE_SYS_TYPES_H@ HAVE_SYS_TYPES_H - - /* Define to 1 if you have the header file. */ --#undef HAVE_UNISTD_H -+#@DEFINE_HAVE_UNISTD_H@ HAVE_UNISTD_H - - /* Have variable length arrays */ --#undef HAVE_VLA -+#@DEFINE_HAVE_VLA@ HAVE_VLA - - /* Define to 1 if you have the `vprintf' function. */ --#undef HAVE_VPRINTF -+#@DEFINE_HAVE_VPRINTF@ HAVE_VPRINTF - - /* Define to 1 if you have the header file. */ --#undef HAVE_WINDOWS_H -+#@DEFINE_HAVE_WINDOWS_H@ HAVE_WINDOWS_H - - /* JasPer configure */ --#undef JAS_CONFIGURE -+#@DEFINE_JAS_CONFIGURE@ JAS_CONFIGURE - - /* JasPer version */ --#undef JAS_VERSION -+#cmakedefine JAS_VERSION "@JAS_VERSION@" - - /* Name of package */ --#undef PACKAGE -+#cmakedefine PACKAGE "@PACKAGE@" - - /* Define to the address where bug reports for this package should be sent. */ --#undef PACKAGE_BUGREPORT -+#cmakedefine PACKAGE_BUGREPORT "@PACKAGE_BUGREPORT@" - - /* Define to the full name of this package. */ --#undef PACKAGE_NAME -+#cmakedefine PACKAGE_NAME "@PACKAGE_NAME@" - - /* Define to the full name and version of this package. */ --#undef PACKAGE_STRING -+#cmakedefine PACKAGE_STRING "@PACKAGE_STRING@" - - /* Define to the one symbol short name of this package. */ --#undef PACKAGE_TARNAME -+#cmakedefine PACKAGE_TARNAME "@PACKAGE_TARNAME@" - - /* Define to the version of this package. */ --#undef PACKAGE_VERSION -+#cmakedefine PACKAGE_VERSION "@PACKAGE_VERSION@" - - /* Define to 1 if you have the ANSI C header files. */ --#undef STDC_HEADERS -+#@DEFINE_STDC_HEADERS@ STDC_HEADERS - - /* Version number of package */ --#undef VERSION -+#cmakedefine VERSION "@VERSION@" - - /* Define to 1 if the X Window System is missing or not being used. */ --#undef X_DISPLAY_MISSING -+#@DEFINE_X_DISPLAY_MISSING@ X_DISPLAY_MISSING - - /* Define to empty if `const' does not conform to ANSI C. */ --#undef const -+#@DEFINE_const@ const - - /* Define to `__inline__' or `__inline' if that's what the C compiler - calls it, or to nothing if 'inline' is not supported under any name. */ - #ifndef __cplusplus --#undef inline -+#cmakedefine inline @inline@ - #endif - - /* Define to `long long' if does not define. */ --#undef longlong -+#cmakedefine longlong @longlong@ - - /* Define to `unsigned' if does not define. */ --#undef size_t -+#cmakedefine size_t @size_t@ - - /* Define to `int' if does not define. */ --#undef ssize_t -+#cmakedefine ssize_t @ssize_t@ - - /* Define to `unsigned char' if does not define. */ --#undef uchar -+#cmakedefine uchar @uchar@ - - /* Define to `unsigned int' if does not define. */ --#undef uint -+#cmakedefine uint @uint@ - - /* Define to `unsigned long' if does not define. */ --#undef ulong -+#cmakedefine ulong @ulong@ - - /* Define to `unsigned long long' if does not define. */ --#undef ulonglong -+#cmakedefine ulonglong @ulonglong@ - - /* Define to `unsigned short' if does not define. */ --#undef ushort -+#cmakedefine ushort @ushort@ - - --#else --/* A configure-based build is not being used. */ --#include --#endif -- - #endif - -diff --git a/src/libjasper/include/jasper/jas_malloc.h b/src/libjasper/include/jasper/jas_malloc.h -index f2a8f8b..258e4c7 100644 ---- a/src/libjasper/include/jasper/jas_malloc.h -+++ b/src/libjasper/include/jasper/jas_malloc.h -@@ -95,6 +95,9 @@ extern "C" { - #define jas_free MEMFREE - #define jas_realloc MEMREALLOC - #define jas_calloc MEMCALLOC -+#define jas_alloc2(a, b) MEMALLOC((a)*(b)) -+#define jas_alloc3(a, b, c) MEMALLOC((a)*(b)*(c)) -+#define jas_realloc2(p, a, b) MEMREALLOC((p), (a)*(b)) - #endif - - /******************************************************************************\ -@@ -115,6 +118,12 @@ void *jas_realloc(void *ptr, size_t size); - /* Allocate a block of memory and initialize the contents to zero. */ - void *jas_calloc(size_t nmemb, size_t size); - -+/* size-checked double allocation .*/ -+void *jas_alloc2(size_t, size_t); -+ -+void *jas_alloc3(size_t, size_t, size_t); -+ -+void *jas_realloc2(void *, size_t, size_t); - #endif - - #ifdef __cplusplus -diff --git a/src/libjasper/include/jasper/jas_stream.h b/src/libjasper/include/jasper/jas_stream.h -index 651bea9..28e719d 100644 ---- a/src/libjasper/include/jasper/jas_stream.h -+++ b/src/libjasper/include/jasper/jas_stream.h -@@ -77,6 +77,9 @@ - #include - - #include -+#if defined(HAVE_LIMITS_H) -+#include -+#endif - #if defined(HAVE_FCNTL_H) - #include - #endif -@@ -99,6 +102,12 @@ extern "C" { - #define O_BINARY 0 - #endif - -+#ifdef PATH_MAX -+#define JAS_PATH_MAX PATH_MAX -+#else -+#define JAS_PATH_MAX 4096 -+#endif -+ - /* - * Stream open flags. - */ -@@ -251,7 +260,7 @@ typedef struct { - typedef struct { - int fd; - int flags; -- char pathname[L_tmpnam + 1]; -+ char pathname[JAS_PATH_MAX + 1]; - } jas_stream_fileobj_t; - - #define JAS_STREAM_FILEOBJ_DELONCLOSE 0x01 -diff --git a/src/libjasper/jp2/jp2_cod.c b/src/libjasper/jp2/jp2_cod.c -index 83cecb1..d2ea907 100644 ---- a/src/libjasper/jp2/jp2_cod.c -+++ b/src/libjasper/jp2/jp2_cod.c -@@ -247,7 +247,7 @@ jp2_box_t *jp2_box_get(jas_stream_t *in) - box = 0; - tmpstream = 0; - -- if (!(box = jas_malloc(sizeof(jp2_box_t)))) { -+ if (!(box = jas_calloc(1, sizeof(jp2_box_t)))) { - goto error; - } - box->ops = &jp2_boxinfo_unk.ops; -@@ -301,7 +301,6 @@ jp2_box_t *jp2_box_get(jas_stream_t *in) - } - - return box; -- abort(); - - error: - if (box) { -@@ -372,7 +371,7 @@ static int jp2_bpcc_getdata(jp2_box_t *box, jas_stream_t *in) - jp2_bpcc_t *bpcc = &box->data.bpcc; - unsigned int i; - bpcc->numcmpts = box->datalen; -- if (!(bpcc->bpcs = jas_malloc(bpcc->numcmpts * sizeof(uint_fast8_t)))) { -+ if (!(bpcc->bpcs = jas_alloc2(bpcc->numcmpts, sizeof(uint_fast8_t)))) { - return -1; - } - for (i = 0; i < bpcc->numcmpts; ++i) { -@@ -416,7 +415,7 @@ static int jp2_colr_getdata(jp2_box_t *box, jas_stream_t *in) - break; - case JP2_COLR_ICC: - colr->iccplen = box->datalen - 3; -- if (!(colr->iccp = jas_malloc(colr->iccplen * sizeof(uint_fast8_t)))) { -+ if (!(colr->iccp = jas_alloc2(colr->iccplen, sizeof(uint_fast8_t)))) { - return -1; - } - if (jas_stream_read(in, colr->iccp, colr->iccplen) != colr->iccplen) { -@@ -453,7 +452,7 @@ static int jp2_cdef_getdata(jp2_box_t *box, jas_stream_t *in) - if (jp2_getuint16(in, &cdef->numchans)) { - return -1; - } -- if (!(cdef->ents = jas_malloc(cdef->numchans * sizeof(jp2_cdefchan_t)))) { -+ if (!(cdef->ents = jas_alloc2(cdef->numchans, sizeof(jp2_cdefchan_t)))) { - return -1; - } - for (channo = 0; channo < cdef->numchans; ++channo) { -@@ -481,7 +480,9 @@ int jp2_box_put(jp2_box_t *box, jas_stream_t *out) - dataflag = !(box->info->flags & (JP2_BOX_SUPER | JP2_BOX_NODATA)); - - if (dataflag) { -- tmpstream = jas_stream_memopen(0, 0); -+ if (!(tmpstream = jas_stream_memopen(0, 0))) { -+ goto error; -+ } - if (box->ops->putdata) { - if ((*box->ops->putdata)(box, tmpstream)) { - goto error; -@@ -511,7 +512,6 @@ int jp2_box_put(jp2_box_t *box, jas_stream_t *out) - } - - return 0; -- abort(); - - error: - -@@ -766,7 +766,7 @@ static int jp2_cmap_getdata(jp2_box_t *box, jas_stream_t *in) - unsigned int i; - - cmap->numchans = (box->datalen) / 4; -- if (!(cmap->ents = jas_malloc(cmap->numchans * sizeof(jp2_cmapent_t)))) { -+ if (!(cmap->ents = jas_alloc2(cmap->numchans, sizeof(jp2_cmapent_t)))) { - return -1; - } - for (i = 0; i < cmap->numchans; ++i) { -@@ -828,10 +828,10 @@ static int jp2_pclr_getdata(jp2_box_t *box, jas_stream_t *in) - return -1; - } - lutsize = pclr->numlutents * pclr->numchans; -- if (!(pclr->lutdata = jas_malloc(lutsize * sizeof(int_fast32_t)))) { -+ if (!(pclr->lutdata = jas_alloc2(lutsize, sizeof(int_fast32_t)))) { - return -1; - } -- if (!(pclr->bpc = jas_malloc(pclr->numchans * sizeof(uint_fast8_t)))) { -+ if (!(pclr->bpc = jas_alloc2(pclr->numchans, sizeof(uint_fast8_t)))) { - return -1; - } - for (i = 0; i < pclr->numchans; ++i) { -diff --git a/src/libjasper/jp2/jp2_dec.c b/src/libjasper/jp2/jp2_dec.c -index 65772de..70a7cba 100644 ---- a/src/libjasper/jp2/jp2_dec.c -+++ b/src/libjasper/jp2/jp2_dec.c -@@ -291,7 +291,10 @@ jas_image_t *jp2_decode(jas_stream_t *in, char *optstr) - case JP2_COLR_ICC: - iccprof = jas_iccprof_createfrombuf(dec->colr->data.colr.iccp, - dec->colr->data.colr.iccplen); -- assert(iccprof); -+ if (!iccprof) { -+ jas_eprintf("error: failed to parse ICC profile\n"); -+ goto error; -+ } - jas_iccprof_gethdr(iccprof, &icchdr); - jas_eprintf("ICC Profile CS %08x\n", icchdr.colorspc); - jas_image_setclrspc(dec->image, fromiccpcs(icchdr.colorspc)); -@@ -336,7 +339,7 @@ jas_image_t *jp2_decode(jas_stream_t *in, char *optstr) - } - - /* Allocate space for the channel-number to component-number LUT. */ -- if (!(dec->chantocmptlut = jas_malloc(dec->numchans * sizeof(uint_fast16_t)))) { -+ if (!(dec->chantocmptlut = jas_alloc2(dec->numchans, sizeof(uint_fast16_t)))) { - jas_eprintf("error: no memory\n"); - goto error; - } -@@ -354,7 +357,7 @@ jas_image_t *jp2_decode(jas_stream_t *in, char *optstr) - if (cmapent->map == JP2_CMAP_DIRECT) { - dec->chantocmptlut[channo] = channo; - } else if (cmapent->map == JP2_CMAP_PALETTE) { -- lutents = jas_malloc(pclrd->numlutents * sizeof(int_fast32_t)); -+ lutents = jas_alloc2(pclrd->numlutents, sizeof(int_fast32_t)); - for (i = 0; i < pclrd->numlutents; ++i) { - lutents[i] = pclrd->lutdata[cmapent->pcol + i * pclrd->numchans]; - } -@@ -386,6 +389,11 @@ jas_image_t *jp2_decode(jas_stream_t *in, char *optstr) - /* Determine the type of each component. */ - if (dec->cdef) { - for (i = 0; i < dec->numchans; ++i) { -+ /* Is the channel number reasonable? */ -+ if (dec->cdef->data.cdef.ents[i].channo >= dec->numchans) { -+ jas_eprintf("error: invalid channel number in CDEF box\n"); -+ goto error; -+ } - jas_image_setcmpttype(dec->image, - dec->chantocmptlut[dec->cdef->data.cdef.ents[i].channo], - jp2_getct(jas_image_clrspc(dec->image), -diff --git a/src/libjasper/jp2/jp2_enc.c b/src/libjasper/jp2/jp2_enc.c -index 9e1e1fc..86ef640 100644 ---- a/src/libjasper/jp2/jp2_enc.c -+++ b/src/libjasper/jp2/jp2_enc.c -@@ -191,7 +191,7 @@ int sgnd; - } - bpcc = &box->data.bpcc; - bpcc->numcmpts = jas_image_numcmpts(image); -- if (!(bpcc->bpcs = jas_malloc(bpcc->numcmpts * -+ if (!(bpcc->bpcs = jas_alloc2(bpcc->numcmpts, - sizeof(uint_fast8_t)))) { - goto error; - } -@@ -285,7 +285,7 @@ int sgnd; - } - cdef = &box->data.cdef; - cdef->numchans = jas_image_numcmpts(image); -- cdef->ents = jas_malloc(cdef->numchans * sizeof(jp2_cdefchan_t)); -+ cdef->ents = jas_alloc2(cdef->numchans, sizeof(jp2_cdefchan_t)); - for (i = 0; i < jas_image_numcmpts(image); ++i) { - cdefchanent = &cdef->ents[i]; - cdefchanent->channo = i; -@@ -351,7 +351,6 @@ int sgnd; - } - - return 0; -- abort(); - - error: - -diff --git a/src/libjasper/jpc/jpc_cs.c b/src/libjasper/jpc/jpc_cs.c -index f076571..36acd2a 100644 ---- a/src/libjasper/jpc/jpc_cs.c -+++ b/src/libjasper/jpc/jpc_cs.c -@@ -502,7 +502,7 @@ static int jpc_siz_getparms(jpc_ms_t *ms, jpc_cstate_t *cstate, - !siz->tileheight || !siz->numcomps) { - return -1; - } -- if (!(siz->comps = jas_malloc(siz->numcomps * sizeof(jpc_sizcomp_t)))) { -+ if (!(siz->comps = jas_alloc2(siz->numcomps, sizeof(jpc_sizcomp_t)))) { - return -1; - } - for (i = 0; i < siz->numcomps; ++i) { -@@ -744,6 +744,10 @@ static int jpc_cox_getcompparms(jpc_ms_t *ms, jpc_cstate_t *cstate, - return -1; - } - compparms->numrlvls = compparms->numdlvls + 1; -+ if (compparms->numrlvls > JPC_MAXRLVLS) { -+ jpc_cox_destroycompparms(compparms); -+ return -1; -+ } - if (prtflag) { - for (i = 0; i < compparms->numrlvls; ++i) { - if (jpc_getuint8(in, &tmp)) { -@@ -898,11 +902,15 @@ static int jpc_qcc_getparms(jpc_ms_t *ms, jpc_cstate_t *cstate, jas_stream_t *in - int len; - len = ms->len; - if (cstate->numcomps <= 256) { -- jpc_getuint8(in, &tmp); -+ if (jpc_getuint8(in, &tmp)) { -+ return -1; -+ } - qcc->compno = tmp; - --len; - } else { -- jpc_getuint16(in, &qcc->compno); -+ if (jpc_getuint16(in, &qcc->compno)) { -+ return -1; -+ } - len -= 2; - } - if (jpc_qcx_getcompparms(&qcc->compparms, cstate, in, len)) { -@@ -919,9 +927,13 @@ static int jpc_qcc_putparms(jpc_ms_t *ms, jpc_cstate_t *cstate, jas_stream_t *ou - { - jpc_qcc_t *qcc = &ms->parms.qcc; - if (cstate->numcomps <= 256) { -- jpc_putuint8(out, qcc->compno); -+ if (jpc_putuint8(out, qcc->compno)) { -+ return -1; -+ } - } else { -- jpc_putuint16(out, qcc->compno); -+ if (jpc_putuint16(out, qcc->compno)) { -+ return -1; -+ } - } - if (jpc_qcx_putcompparms(&qcc->compparms, cstate, out)) { - return -1; -@@ -966,7 +978,9 @@ static int jpc_qcx_getcompparms(jpc_qcxcp_t *compparms, jpc_cstate_t *cstate, - cstate = 0; - - n = 0; -- jpc_getuint8(in, &tmp); -+ if (jpc_getuint8(in, &tmp)) { -+ return -1; -+ } - ++n; - compparms->qntsty = tmp & 0x1f; - compparms->numguard = (tmp >> 5) & 7; -@@ -982,16 +996,23 @@ static int jpc_qcx_getcompparms(jpc_qcxcp_t *compparms, jpc_cstate_t *cstate, - compparms->numstepsizes = (len - n) / 2; - break; - } -- if (compparms->numstepsizes > 0) { -- compparms->stepsizes = jas_malloc(compparms->numstepsizes * -+ if (compparms->numstepsizes > 3 * JPC_MAXRLVLS + 1) { -+ jpc_qcx_destroycompparms(compparms); -+ return -1; -+ } else if (compparms->numstepsizes > 0) { -+ compparms->stepsizes = jas_alloc2(compparms->numstepsizes, - sizeof(uint_fast16_t)); - assert(compparms->stepsizes); - for (i = 0; i < compparms->numstepsizes; ++i) { - if (compparms->qntsty == JPC_QCX_NOQNT) { -- jpc_getuint8(in, &tmp); -+ if (jpc_getuint8(in, &tmp)) { -+ return -1; -+ } - compparms->stepsizes[i] = JPC_QCX_EXPN(tmp >> 3); - } else { -- jpc_getuint16(in, &compparms->stepsizes[i]); -+ if (jpc_getuint16(in, &compparms->stepsizes[i])) { -+ return -1; -+ } - } - } - } else { -@@ -1015,10 +1036,14 @@ static int jpc_qcx_putcompparms(jpc_qcxcp_t *compparms, jpc_cstate_t *cstate, - jpc_putuint8(out, ((compparms->numguard & 7) << 5) | compparms->qntsty); - for (i = 0; i < compparms->numstepsizes; ++i) { - if (compparms->qntsty == JPC_QCX_NOQNT) { -- jpc_putuint8(out, JPC_QCX_GETEXPN( -- compparms->stepsizes[i]) << 3); -+ if (jpc_putuint8(out, JPC_QCX_GETEXPN( -+ compparms->stepsizes[i]) << 3)) { -+ return -1; -+ } - } else { -- jpc_putuint16(out, compparms->stepsizes[i]); -+ if (jpc_putuint16(out, compparms->stepsizes[i])) { -+ return -1; -+ } - } - } - return 0; -@@ -1091,7 +1116,7 @@ static int jpc_ppm_getparms(jpc_ms_t *ms, jpc_cstate_t *cstate, jas_stream_t *in - - ppm->len = ms->len - 1; - if (ppm->len > 0) { -- if (!(ppm->data = jas_malloc(ppm->len * sizeof(unsigned char)))) { -+ if (!(ppm->data = jas_malloc(ppm->len))) { - goto error; - } - if (JAS_CAST(uint, jas_stream_read(in, ppm->data, ppm->len)) != ppm->len) { -@@ -1160,7 +1185,7 @@ static int jpc_ppt_getparms(jpc_ms_t *ms, jpc_cstate_t *cstate, jas_stream_t *in - } - ppt->len = ms->len - 1; - if (ppt->len > 0) { -- if (!(ppt->data = jas_malloc(ppt->len * sizeof(unsigned char)))) { -+ if (!(ppt->data = jas_malloc(ppt->len))) { - goto error; - } - if (jas_stream_read(in, (char *) ppt->data, ppt->len) != JAS_CAST(int, ppt->len)) { -@@ -1223,7 +1248,7 @@ static int jpc_poc_getparms(jpc_ms_t *ms, jpc_cstate_t *cstate, jas_stream_t *in - uint_fast8_t tmp; - poc->numpchgs = (cstate->numcomps > 256) ? (ms->len / 9) : - (ms->len / 7); -- if (!(poc->pchgs = jas_malloc(poc->numpchgs * sizeof(jpc_pocpchg_t)))) { -+ if (!(poc->pchgs = jas_alloc2(poc->numpchgs, sizeof(jpc_pocpchg_t)))) { - goto error; - } - for (pchgno = 0, pchg = poc->pchgs; pchgno < poc->numpchgs; ++pchgno, -@@ -1328,7 +1353,7 @@ static int jpc_crg_getparms(jpc_ms_t *ms, jpc_cstate_t *cstate, jas_stream_t *in - jpc_crgcomp_t *comp; - uint_fast16_t compno; - crg->numcomps = cstate->numcomps; -- if (!(crg->comps = jas_malloc(cstate->numcomps * sizeof(uint_fast16_t)))) { -+ if (!(crg->comps = jas_alloc2(cstate->numcomps, sizeof(jpc_crgcomp_t)))) { - return -1; - } - for (compno = 0, comp = crg->comps; compno < cstate->numcomps; -@@ -1467,7 +1492,7 @@ static int jpc_unk_getparms(jpc_ms_t *ms, jpc_cstate_t *cstate, jas_stream_t *in - cstate = 0; - - if (ms->len > 0) { -- if (!(unk->data = jas_malloc(ms->len * sizeof(unsigned char)))) { -+ if (!(unk->data = jas_malloc(ms->len))) { - return -1; - } - if (jas_stream_read(in, (char *) unk->data, ms->len) != JAS_CAST(int, ms->len)) { -diff --git a/src/libjasper/jpc/jpc_dec.c b/src/libjasper/jpc/jpc_dec.c -index fa72a0e..1705951 100644 ---- a/src/libjasper/jpc/jpc_dec.c -+++ b/src/libjasper/jpc/jpc_dec.c -@@ -449,7 +449,7 @@ static int jpc_dec_process_sot(jpc_dec_t *dec, jpc_ms_t *ms) - - if (dec->state == JPC_MH) { - -- compinfos = jas_malloc(dec->numcomps * sizeof(jas_image_cmptparm_t)); -+ compinfos = jas_alloc2(dec->numcomps, sizeof(jas_image_cmptparm_t)); - assert(compinfos); - for (cmptno = 0, cmpt = dec->cmpts, compinfo = compinfos; - cmptno < dec->numcomps; ++cmptno, ++cmpt, ++compinfo) { -@@ -465,6 +465,7 @@ static int jpc_dec_process_sot(jpc_dec_t *dec, jpc_ms_t *ms) - - if (!(dec->image = jas_image_create(dec->numcomps, compinfos, - JAS_CLRSPC_UNKNOWN))) { -+ jas_free(compinfos); - return -1; - } - jas_free(compinfos); -@@ -489,7 +490,7 @@ static int jpc_dec_process_sot(jpc_dec_t *dec, jpc_ms_t *ms) - dec->curtileendoff = 0; - } - -- if (JAS_CAST(int, sot->tileno) > dec->numtiles) { -+ if (JAS_CAST(int, sot->tileno) >= dec->numtiles) { - jas_eprintf("invalid tile number in SOT marker segment\n"); - return -1; - } -@@ -692,7 +693,7 @@ static int jpc_dec_tileinit(jpc_dec_t *dec, jpc_dec_tile_t *tile) - tile->realmode = 1; - } - tcomp->numrlvls = ccp->numrlvls; -- if (!(tcomp->rlvls = jas_malloc(tcomp->numrlvls * -+ if (!(tcomp->rlvls = jas_alloc2(tcomp->numrlvls, - sizeof(jpc_dec_rlvl_t)))) { - return -1; - } -@@ -764,7 +765,7 @@ rlvl->bands = 0; - rlvl->cbgheightexpn); - - rlvl->numbands = (!rlvlno) ? 1 : 3; -- if (!(rlvl->bands = jas_malloc(rlvl->numbands * -+ if (!(rlvl->bands = jas_alloc2(rlvl->numbands, - sizeof(jpc_dec_band_t)))) { - return -1; - } -@@ -797,7 +798,7 @@ rlvl->bands = 0; - - assert(rlvl->numprcs); - -- if (!(band->prcs = jas_malloc(rlvl->numprcs * sizeof(jpc_dec_prc_t)))) { -+ if (!(band->prcs = jas_alloc2(rlvl->numprcs, sizeof(jpc_dec_prc_t)))) { - return -1; - } - -@@ -834,7 +835,7 @@ rlvl->bands = 0; - if (!(prc->numimsbstagtree = jpc_tagtree_create(prc->numhcblks, prc->numvcblks))) { - return -1; - } -- if (!(prc->cblks = jas_malloc(prc->numcblks * sizeof(jpc_dec_cblk_t)))) { -+ if (!(prc->cblks = jas_alloc2(prc->numcblks, sizeof(jpc_dec_cblk_t)))) { - return -1; - } - -@@ -1069,12 +1070,12 @@ static int jpc_dec_tiledecode(jpc_dec_t *dec, jpc_dec_tile_t *tile) - /* Apply an inverse intercomponent transform if necessary. */ - switch (tile->cp->mctid) { - case JPC_MCT_RCT: -- assert(dec->numcomps == 3); -+ assert(dec->numcomps >= 3); - jpc_irct(tile->tcomps[0].data, tile->tcomps[1].data, - tile->tcomps[2].data); - break; - case JPC_MCT_ICT: -- assert(dec->numcomps == 3); -+ assert(dec->numcomps >= 3); - jpc_iict(tile->tcomps[0].data, tile->tcomps[1].data, - tile->tcomps[2].data); - break; -@@ -1181,7 +1182,7 @@ static int jpc_dec_process_siz(jpc_dec_t *dec, jpc_ms_t *ms) - return -1; - } - -- if (!(dec->cmpts = jas_malloc(dec->numcomps * sizeof(jpc_dec_cmpt_t)))) { -+ if (!(dec->cmpts = jas_alloc2(dec->numcomps, sizeof(jpc_dec_cmpt_t)))) { - return -1; - } - -@@ -1204,7 +1205,7 @@ static int jpc_dec_process_siz(jpc_dec_t *dec, jpc_ms_t *ms) - dec->numhtiles = JPC_CEILDIV(dec->xend - dec->tilexoff, dec->tilewidth); - dec->numvtiles = JPC_CEILDIV(dec->yend - dec->tileyoff, dec->tileheight); - dec->numtiles = dec->numhtiles * dec->numvtiles; -- if (!(dec->tiles = jas_malloc(dec->numtiles * sizeof(jpc_dec_tile_t)))) { -+ if (!(dec->tiles = jas_calloc(dec->numtiles, sizeof(jpc_dec_tile_t)))) { - return -1; - } - -@@ -1228,7 +1229,7 @@ static int jpc_dec_process_siz(jpc_dec_t *dec, jpc_ms_t *ms) - tile->pkthdrstreampos = 0; - tile->pptstab = 0; - tile->cp = 0; -- if (!(tile->tcomps = jas_malloc(dec->numcomps * -+ if (!(tile->tcomps = jas_calloc(dec->numcomps, - sizeof(jpc_dec_tcomp_t)))) { - return -1; - } -@@ -1280,7 +1281,7 @@ static int jpc_dec_process_coc(jpc_dec_t *dec, jpc_ms_t *ms) - jpc_coc_t *coc = &ms->parms.coc; - jpc_dec_tile_t *tile; - -- if (JAS_CAST(int, coc->compno) > dec->numcomps) { -+ if (JAS_CAST(int, coc->compno) >= dec->numcomps) { - jas_eprintf("invalid component number in COC marker segment\n"); - return -1; - } -@@ -1306,7 +1307,7 @@ static int jpc_dec_process_rgn(jpc_dec_t *dec, jpc_ms_t *ms) - jpc_rgn_t *rgn = &ms->parms.rgn; - jpc_dec_tile_t *tile; - -- if (JAS_CAST(int, rgn->compno) > dec->numcomps) { -+ if (JAS_CAST(int, rgn->compno) >= dec->numcomps) { - jas_eprintf("invalid component number in RGN marker segment\n"); - return -1; - } -@@ -1355,7 +1356,7 @@ static int jpc_dec_process_qcc(jpc_dec_t *dec, jpc_ms_t *ms) - jpc_qcc_t *qcc = &ms->parms.qcc; - jpc_dec_tile_t *tile; - -- if (JAS_CAST(int, qcc->compno) > dec->numcomps) { -+ if (JAS_CAST(int, qcc->compno) >= dec->numcomps) { - jas_eprintf("invalid component number in QCC marker segment\n"); - return -1; - } -@@ -1489,11 +1490,12 @@ static jpc_dec_cp_t *jpc_dec_cp_create(uint_fast16_t numcomps) - cp->numlyrs = 0; - cp->mctid = 0; - cp->csty = 0; -- if (!(cp->ccps = jas_malloc(cp->numcomps * sizeof(jpc_dec_ccp_t)))) { -+ if (!(cp->ccps = jas_alloc2(cp->numcomps, sizeof(jpc_dec_ccp_t)))) { -+ jpc_dec_cp_destroy(cp); - return 0; - } - if (!(cp->pchglist = jpc_pchglist_create())) { -- jas_free(cp->ccps); -+ jpc_dec_cp_destroy(cp); - return 0; - } - for (compno = 0, ccp = cp->ccps; compno < cp->numcomps; -@@ -2048,7 +2050,7 @@ jpc_streamlist_t *jpc_streamlist_create() - } - streamlist->numstreams = 0; - streamlist->maxstreams = 100; -- if (!(streamlist->streams = jas_malloc(streamlist->maxstreams * -+ if (!(streamlist->streams = jas_alloc2(streamlist->maxstreams, - sizeof(jas_stream_t *)))) { - jas_free(streamlist); - return 0; -@@ -2068,8 +2070,8 @@ int jpc_streamlist_insert(jpc_streamlist_t *streamlist, int streamno, - /* Grow the array of streams if necessary. */ - if (streamlist->numstreams >= streamlist->maxstreams) { - newmaxstreams = streamlist->maxstreams + 1024; -- if (!(newstreams = jas_realloc(streamlist->streams, -- (newmaxstreams + 1024) * sizeof(jas_stream_t *)))) { -+ if (!(newstreams = jas_realloc2(streamlist->streams, -+ (newmaxstreams + 1024), sizeof(jas_stream_t *)))) { - return -1; - } - for (i = streamlist->numstreams; i < streamlist->maxstreams; ++i) { -@@ -2155,8 +2157,7 @@ int jpc_ppxstab_grow(jpc_ppxstab_t *tab, int maxents) - { - jpc_ppxstabent_t **newents; - if (tab->maxents < maxents) { -- newents = (tab->ents) ? jas_realloc(tab->ents, maxents * -- sizeof(jpc_ppxstabent_t *)) : jas_malloc(maxents * sizeof(jpc_ppxstabent_t *)); -+ newents = jas_realloc2(tab->ents, maxents, sizeof(jpc_ppxstabent_t *)); - if (!newents) { - return -1; - } -@@ -2267,7 +2268,9 @@ jpc_streamlist_t *jpc_ppmstabtostreams(jpc_ppxstab_t *tab) - return streams; - - error: -- jpc_streamlist_destroy(streams); -+ if (streams) { -+ jpc_streamlist_destroy(streams); -+ } - return 0; - } - -diff --git a/src/libjasper/jpc/jpc_enc.c b/src/libjasper/jpc/jpc_enc.c -index bbe1ef2..ca7cbb7 100644 ---- a/src/libjasper/jpc/jpc_enc.c -+++ b/src/libjasper/jpc/jpc_enc.c -@@ -403,7 +403,7 @@ static jpc_enc_cp_t *cp_create(char *optstr, jas_image_t *image) - vsteplcm *= jas_image_cmptvstep(image, cmptno); - } - -- if (!(cp->ccps = jas_malloc(cp->numcmpts * sizeof(jpc_enc_ccp_t)))) { -+ if (!(cp->ccps = jas_alloc2(cp->numcmpts, sizeof(jpc_enc_ccp_t)))) { - goto error; - } - for (cmptno = 0, ccp = cp->ccps; cmptno < JAS_CAST(int, cp->numcmpts); ++cmptno, -@@ -656,7 +656,7 @@ static jpc_enc_cp_t *cp_create(char *optstr, jas_image_t *image) - - if (ilyrrates && numilyrrates > 0) { - tcp->numlyrs = numilyrrates + 1; -- if (!(tcp->ilyrrates = jas_malloc((tcp->numlyrs - 1) * -+ if (!(tcp->ilyrrates = jas_alloc2((tcp->numlyrs - 1), - sizeof(jpc_fix_t)))) { - goto error; - } -@@ -781,11 +781,10 @@ void jpc_enc_cp_destroy(jpc_enc_cp_t *cp) - - int ratestrtosize(char *s, uint_fast32_t rawsize, uint_fast32_t *size) - { -- char *cp; - jpc_flt_t f; - - /* Note: This function must not modify output size on failure. */ -- if ((cp = strchr(s, 'B'))) { -+ if (strchr(s, 'B')) { - *size = atoi(s); - } else { - f = atof(s); -@@ -940,7 +939,7 @@ startoff = jas_stream_getrwcount(enc->out); - siz->tilewidth = cp->tilewidth; - siz->tileheight = cp->tileheight; - siz->numcomps = cp->numcmpts; -- siz->comps = jas_malloc(siz->numcomps * sizeof(jpc_sizcomp_t)); -+ siz->comps = jas_alloc2(siz->numcomps, sizeof(jpc_sizcomp_t)); - assert(siz->comps); - for (i = 0; i < JAS_CAST(int, cp->numcmpts); ++i) { - siz->comps[i].prec = cp->ccps[i].prec; -@@ -977,7 +976,7 @@ startoff = jas_stream_getrwcount(enc->out); - return -1; - } - crg = &enc->mrk->parms.crg; -- crg->comps = jas_malloc(crg->numcomps * sizeof(jpc_crgcomp_t)); -+ crg->comps = jas_alloc2(crg->numcomps, sizeof(jpc_crgcomp_t)); - if (jpc_putms(enc->out, enc->cstate, enc->mrk)) { - jas_eprintf("cannot write CRG marker\n"); - return -1; -@@ -1955,7 +1954,7 @@ jpc_enc_tile_t *jpc_enc_tile_create(jpc_enc_cp_t *cp, jas_image_t *image, int ti - tile->mctid = cp->tcp.mctid; - - tile->numlyrs = cp->tcp.numlyrs; -- if (!(tile->lyrsizes = jas_malloc(tile->numlyrs * -+ if (!(tile->lyrsizes = jas_alloc2(tile->numlyrs, - sizeof(uint_fast32_t)))) { - goto error; - } -@@ -1964,7 +1963,7 @@ jpc_enc_tile_t *jpc_enc_tile_create(jpc_enc_cp_t *cp, jas_image_t *image, int ti - } - - /* Allocate an array for the per-tile-component information. */ -- if (!(tile->tcmpts = jas_malloc(cp->numcmpts * sizeof(jpc_enc_tcmpt_t)))) { -+ if (!(tile->tcmpts = jas_alloc2(cp->numcmpts, sizeof(jpc_enc_tcmpt_t)))) { - goto error; - } - /* Initialize a few members critical for error recovery. */ -@@ -2102,15 +2101,14 @@ static jpc_enc_tcmpt_t *tcmpt_create(jpc_enc_tcmpt_t *tcmpt, jpc_enc_cp_t *cp, - - tcmpt->numstepsizes = tcmpt->numbands; - assert(tcmpt->numstepsizes <= JPC_MAXBANDS); -- memset(tcmpt->stepsizes, 0, sizeof(tcmpt->numstepsizes * -- sizeof(uint_fast16_t))); -+ memset(tcmpt->stepsizes, 0, tcmpt->numstepsizes * sizeof(uint_fast16_t)); - - /* Retrieve information about the various bands. */ - jpc_tsfb_getbands(tcmpt->tsfb, jas_seq2d_xstart(tcmpt->data), - jas_seq2d_ystart(tcmpt->data), jas_seq2d_xend(tcmpt->data), - jas_seq2d_yend(tcmpt->data), bandinfos); - -- if (!(tcmpt->rlvls = jas_malloc(tcmpt->numrlvls * sizeof(jpc_enc_rlvl_t)))) { -+ if (!(tcmpt->rlvls = jas_alloc2(tcmpt->numrlvls, sizeof(jpc_enc_rlvl_t)))) { - goto error; - } - for (rlvlno = 0, rlvl = tcmpt->rlvls; rlvlno < tcmpt->numrlvls; -@@ -2213,7 +2211,7 @@ static jpc_enc_rlvl_t *rlvl_create(jpc_enc_rlvl_t *rlvl, jpc_enc_cp_t *cp, - rlvl->numvprcs = JPC_FLOORDIVPOW2(brprcbry - tlprctly, rlvl->prcheightexpn); - rlvl->numprcs = rlvl->numhprcs * rlvl->numvprcs; - -- if (!(rlvl->bands = jas_malloc(rlvl->numbands * sizeof(jpc_enc_band_t)))) { -+ if (!(rlvl->bands = jas_alloc2(rlvl->numbands, sizeof(jpc_enc_band_t)))) { - goto error; - } - for (bandno = 0, band = rlvl->bands; bandno < rlvl->numbands; -@@ -2290,7 +2288,7 @@ if (bandinfo->xstart != bandinfo->xend && bandinfo->ystart != bandinfo->yend) { - band->synweight = bandinfo->synenergywt; - - if (band->data) { -- if (!(band->prcs = jas_malloc(rlvl->numprcs * sizeof(jpc_enc_prc_t)))) { -+ if (!(band->prcs = jas_alloc2(rlvl->numprcs, sizeof(jpc_enc_prc_t)))) { - goto error; - } - for (prcno = 0, prc = band->prcs; prcno < rlvl->numprcs; ++prcno, -@@ -2422,7 +2420,7 @@ if (!rlvlno) { - goto error; - } - -- if (!(prc->cblks = jas_malloc(prc->numcblks * sizeof(jpc_enc_cblk_t)))) { -+ if (!(prc->cblks = jas_alloc2(prc->numcblks, sizeof(jpc_enc_cblk_t)))) { - goto error; - } - for (cblkno = 0, cblk = prc->cblks; cblkno < prc->numcblks; -diff --git a/src/libjasper/jpc/jpc_mqdec.c b/src/libjasper/jpc/jpc_mqdec.c -index 4cc2f46..66a8581 100644 ---- a/src/libjasper/jpc/jpc_mqdec.c -+++ b/src/libjasper/jpc/jpc_mqdec.c -@@ -118,7 +118,7 @@ jpc_mqdec_t *jpc_mqdec_create(int maxctxs, jas_stream_t *in) - mqdec->in = in; - mqdec->maxctxs = maxctxs; - /* Allocate memory for the per-context state information. */ -- if (!(mqdec->ctxs = jas_malloc(mqdec->maxctxs * sizeof(jpc_mqstate_t *)))) { -+ if (!(mqdec->ctxs = jas_alloc2(mqdec->maxctxs, sizeof(jpc_mqstate_t *)))) { - goto error; - } - /* Set the current context to the first context. */ -diff --git a/src/libjasper/jpc/jpc_mqenc.c b/src/libjasper/jpc/jpc_mqenc.c -index 758b361..399581e 100644 ---- a/src/libjasper/jpc/jpc_mqenc.c -+++ b/src/libjasper/jpc/jpc_mqenc.c -@@ -197,7 +197,7 @@ jpc_mqenc_t *jpc_mqenc_create(int maxctxs, jas_stream_t *out) - mqenc->maxctxs = maxctxs; - - /* Allocate memory for the per-context state information. */ -- if (!(mqenc->ctxs = jas_malloc(mqenc->maxctxs * sizeof(jpc_mqstate_t *)))) { -+ if (!(mqenc->ctxs = jas_alloc2(mqenc->maxctxs, sizeof(jpc_mqstate_t *)))) { - goto error; - } - -diff --git a/src/libjasper/jpc/jpc_qmfb.c b/src/libjasper/jpc/jpc_qmfb.c -index 00d406d..4fad82d 100644 ---- a/src/libjasper/jpc/jpc_qmfb.c -+++ b/src/libjasper/jpc/jpc_qmfb.c -@@ -306,11 +306,7 @@ void jpc_qmfb_split_row(jpc_fix_t *a, int numcols, int parity) - { - - int bufsize = JPC_CEILDIVPOW2(numcols, 1); --#if !defined(HAVE_VLA) - jpc_fix_t splitbuf[QMFB_SPLITBUFSIZE]; --#else -- jpc_fix_t splitbuf[bufsize]; --#endif - jpc_fix_t *buf = splitbuf; - register jpc_fix_t *srcptr; - register jpc_fix_t *dstptr; -@@ -318,15 +314,13 @@ void jpc_qmfb_split_row(jpc_fix_t *a, int numcols, int parity) - register int m; - int hstartcol; - --#if !defined(HAVE_VLA) - /* Get a buffer. */ - if (bufsize > QMFB_SPLITBUFSIZE) { -- if (!(buf = jas_malloc(bufsize * sizeof(jpc_fix_t)))) { -+ if (!(buf = jas_alloc2(bufsize, sizeof(jpc_fix_t)))) { - /* We have no choice but to commit suicide in this case. */ - abort(); - } - } --#endif - - if (numcols >= 2) { - hstartcol = (numcols + 1 - parity) >> 1; -@@ -360,12 +354,10 @@ void jpc_qmfb_split_row(jpc_fix_t *a, int numcols, int parity) - } - } - --#if !defined(HAVE_VLA) - /* If the split buffer was allocated on the heap, free this memory. */ - if (buf != splitbuf) { - jas_free(buf); - } --#endif - - } - -@@ -374,11 +366,7 @@ void jpc_qmfb_split_col(jpc_fix_t *a, int numrows, int stride, - { - - int bufsize = JPC_CEILDIVPOW2(numrows, 1); --#if !defined(HAVE_VLA) - jpc_fix_t splitbuf[QMFB_SPLITBUFSIZE]; --#else -- jpc_fix_t splitbuf[bufsize]; --#endif - jpc_fix_t *buf = splitbuf; - register jpc_fix_t *srcptr; - register jpc_fix_t *dstptr; -@@ -386,15 +374,13 @@ void jpc_qmfb_split_col(jpc_fix_t *a, int numrows, int stride, - register int m; - int hstartcol; - --#if !defined(HAVE_VLA) - /* Get a buffer. */ - if (bufsize > QMFB_SPLITBUFSIZE) { -- if (!(buf = jas_malloc(bufsize * sizeof(jpc_fix_t)))) { -+ if (!(buf = jas_alloc2(bufsize, sizeof(jpc_fix_t)))) { - /* We have no choice but to commit suicide in this case. */ - abort(); - } - } --#endif - - if (numrows >= 2) { - hstartcol = (numrows + 1 - parity) >> 1; -@@ -428,12 +414,10 @@ void jpc_qmfb_split_col(jpc_fix_t *a, int numrows, int stride, - } - } - --#if !defined(HAVE_VLA) - /* If the split buffer was allocated on the heap, free this memory. */ - if (buf != splitbuf) { - jas_free(buf); - } --#endif - - } - -@@ -442,11 +426,7 @@ void jpc_qmfb_split_colgrp(jpc_fix_t *a, int numrows, int stride, - { - - int bufsize = JPC_CEILDIVPOW2(numrows, 1); --#if !defined(HAVE_VLA) - jpc_fix_t splitbuf[QMFB_SPLITBUFSIZE * JPC_QMFB_COLGRPSIZE]; --#else -- jpc_fix_t splitbuf[bufsize * JPC_QMFB_COLGRPSIZE]; --#endif - jpc_fix_t *buf = splitbuf; - jpc_fix_t *srcptr; - jpc_fix_t *dstptr; -@@ -457,15 +437,13 @@ void jpc_qmfb_split_colgrp(jpc_fix_t *a, int numrows, int stride, - int m; - int hstartcol; - --#if !defined(HAVE_VLA) - /* Get a buffer. */ - if (bufsize > QMFB_SPLITBUFSIZE) { -- if (!(buf = jas_malloc(bufsize * sizeof(jpc_fix_t)))) { -+ if (!(buf = jas_alloc2(bufsize, sizeof(jpc_fix_t)))) { - /* We have no choice but to commit suicide in this case. */ - abort(); - } - } --#endif - - if (numrows >= 2) { - hstartcol = (numrows + 1 - parity) >> 1; -@@ -517,12 +495,10 @@ void jpc_qmfb_split_colgrp(jpc_fix_t *a, int numrows, int stride, - } - } - --#if !defined(HAVE_VLA) - /* If the split buffer was allocated on the heap, free this memory. */ - if (buf != splitbuf) { - jas_free(buf); - } --#endif - - } - -@@ -531,11 +507,7 @@ void jpc_qmfb_split_colres(jpc_fix_t *a, int numrows, int numcols, - { - - int bufsize = JPC_CEILDIVPOW2(numrows, 1); --#if !defined(HAVE_VLA) - jpc_fix_t splitbuf[QMFB_SPLITBUFSIZE * JPC_QMFB_COLGRPSIZE]; --#else -- jpc_fix_t splitbuf[bufsize * numcols]; --#endif - jpc_fix_t *buf = splitbuf; - jpc_fix_t *srcptr; - jpc_fix_t *dstptr; -@@ -546,15 +518,13 @@ void jpc_qmfb_split_colres(jpc_fix_t *a, int numrows, int numcols, - int m; - int hstartcol; - --#if !defined(HAVE_VLA) - /* Get a buffer. */ - if (bufsize > QMFB_SPLITBUFSIZE) { -- if (!(buf = jas_malloc(bufsize * sizeof(jpc_fix_t)))) { -+ if (!(buf = jas_alloc2(bufsize, sizeof(jpc_fix_t)))) { - /* We have no choice but to commit suicide in this case. */ - abort(); - } - } --#endif - - if (numrows >= 2) { - hstartcol = (numrows + 1 - parity) >> 1; -@@ -606,12 +576,10 @@ void jpc_qmfb_split_colres(jpc_fix_t *a, int numrows, int numcols, - } - } - --#if !defined(HAVE_VLA) - /* If the split buffer was allocated on the heap, free this memory. */ - if (buf != splitbuf) { - jas_free(buf); - } --#endif - - } - -@@ -619,26 +587,20 @@ void jpc_qmfb_join_row(jpc_fix_t *a, int numcols, int parity) - { - - int bufsize = JPC_CEILDIVPOW2(numcols, 1); --#if !defined(HAVE_VLA) - jpc_fix_t joinbuf[QMFB_JOINBUFSIZE]; --#else -- jpc_fix_t joinbuf[bufsize]; --#endif - jpc_fix_t *buf = joinbuf; - register jpc_fix_t *srcptr; - register jpc_fix_t *dstptr; - register int n; - int hstartcol; - --#if !defined(HAVE_VLA) - /* Allocate memory for the join buffer from the heap. */ - if (bufsize > QMFB_JOINBUFSIZE) { -- if (!(buf = jas_malloc(bufsize * sizeof(jpc_fix_t)))) { -+ if (!(buf = jas_alloc2(bufsize, sizeof(jpc_fix_t)))) { - /* We have no choice but to commit suicide. */ - abort(); - } - } --#endif - - hstartcol = (numcols + 1 - parity) >> 1; - -@@ -670,12 +632,10 @@ void jpc_qmfb_join_row(jpc_fix_t *a, int numcols, int parity) - ++srcptr; - } - --#if !defined(HAVE_VLA) - /* If the join buffer was allocated on the heap, free this memory. */ - if (buf != joinbuf) { - jas_free(buf); - } --#endif - - } - -@@ -684,26 +644,20 @@ void jpc_qmfb_join_col(jpc_fix_t *a, int numrows, int stride, - { - - int bufsize = JPC_CEILDIVPOW2(numrows, 1); --#if !defined(HAVE_VLA) - jpc_fix_t joinbuf[QMFB_JOINBUFSIZE]; --#else -- jpc_fix_t joinbuf[bufsize]; --#endif - jpc_fix_t *buf = joinbuf; - register jpc_fix_t *srcptr; - register jpc_fix_t *dstptr; - register int n; - int hstartcol; - --#if !defined(HAVE_VLA) - /* Allocate memory for the join buffer from the heap. */ - if (bufsize > QMFB_JOINBUFSIZE) { -- if (!(buf = jas_malloc(bufsize * sizeof(jpc_fix_t)))) { -+ if (!(buf = jas_alloc2(bufsize, sizeof(jpc_fix_t)))) { - /* We have no choice but to commit suicide. */ - abort(); - } - } --#endif - - hstartcol = (numrows + 1 - parity) >> 1; - -@@ -735,12 +689,10 @@ void jpc_qmfb_join_col(jpc_fix_t *a, int numrows, int stride, - ++srcptr; - } - --#if !defined(HAVE_VLA) - /* If the join buffer was allocated on the heap, free this memory. */ - if (buf != joinbuf) { - jas_free(buf); - } --#endif - - } - -@@ -749,11 +701,7 @@ void jpc_qmfb_join_colgrp(jpc_fix_t *a, int numrows, int stride, - { - - int bufsize = JPC_CEILDIVPOW2(numrows, 1); --#if !defined(HAVE_VLA) - jpc_fix_t joinbuf[QMFB_JOINBUFSIZE * JPC_QMFB_COLGRPSIZE]; --#else -- jpc_fix_t joinbuf[bufsize * JPC_QMFB_COLGRPSIZE]; --#endif - jpc_fix_t *buf = joinbuf; - jpc_fix_t *srcptr; - jpc_fix_t *dstptr; -@@ -763,15 +711,13 @@ void jpc_qmfb_join_colgrp(jpc_fix_t *a, int numrows, int stride, - register int i; - int hstartcol; - --#if !defined(HAVE_VLA) - /* Allocate memory for the join buffer from the heap. */ - if (bufsize > QMFB_JOINBUFSIZE) { -- if (!(buf = jas_malloc(bufsize * JPC_QMFB_COLGRPSIZE * sizeof(jpc_fix_t)))) { -+ if (!(buf = jas_alloc2(bufsize, JPC_QMFB_COLGRPSIZE * sizeof(jpc_fix_t)))) { - /* We have no choice but to commit suicide. */ - abort(); - } - } --#endif - - hstartcol = (numrows + 1 - parity) >> 1; - -@@ -821,12 +767,10 @@ void jpc_qmfb_join_colgrp(jpc_fix_t *a, int numrows, int stride, - srcptr += JPC_QMFB_COLGRPSIZE; - } - --#if !defined(HAVE_VLA) - /* If the join buffer was allocated on the heap, free this memory. */ - if (buf != joinbuf) { - jas_free(buf); - } --#endif - - } - -@@ -835,11 +779,7 @@ void jpc_qmfb_join_colres(jpc_fix_t *a, int numrows, int numcols, - { - - int bufsize = JPC_CEILDIVPOW2(numrows, 1); --#if !defined(HAVE_VLA) - jpc_fix_t joinbuf[QMFB_JOINBUFSIZE * JPC_QMFB_COLGRPSIZE]; --#else -- jpc_fix_t joinbuf[bufsize * numcols]; --#endif - jpc_fix_t *buf = joinbuf; - jpc_fix_t *srcptr; - jpc_fix_t *dstptr; -@@ -849,15 +789,13 @@ void jpc_qmfb_join_colres(jpc_fix_t *a, int numrows, int numcols, - register int i; - int hstartcol; - --#if !defined(HAVE_VLA) - /* Allocate memory for the join buffer from the heap. */ - if (bufsize > QMFB_JOINBUFSIZE) { -- if (!(buf = jas_malloc(bufsize * numcols * sizeof(jpc_fix_t)))) { -+ if (!(buf = jas_alloc3(bufsize, numcols, sizeof(jpc_fix_t)))) { - /* We have no choice but to commit suicide. */ - abort(); - } - } --#endif - - hstartcol = (numrows + 1 - parity) >> 1; - -@@ -907,12 +845,10 @@ void jpc_qmfb_join_colres(jpc_fix_t *a, int numrows, int numcols, - srcptr += numcols; - } - --#if !defined(HAVE_VLA) - /* If the join buffer was allocated on the heap, free this memory. */ - if (buf != joinbuf) { - jas_free(buf); - } --#endif - - } - -diff --git a/src/libjasper/jpc/jpc_t1enc.c b/src/libjasper/jpc/jpc_t1enc.c -index 3a5acea..93c96ce 100644 ---- a/src/libjasper/jpc/jpc_t1enc.c -+++ b/src/libjasper/jpc/jpc_t1enc.c -@@ -219,12 +219,12 @@ int jpc_enc_enccblk(jpc_enc_t *enc, jas_stream_t *out, jpc_enc_tcmpt_t *tcmpt, j - - cblk->numpasses = (cblk->numbps > 0) ? (3 * cblk->numbps - 2) : 0; - if (cblk->numpasses > 0) { -- cblk->passes = jas_malloc(cblk->numpasses * sizeof(jpc_enc_pass_t)); -+ cblk->passes = jas_alloc2(cblk->numpasses, sizeof(jpc_enc_pass_t)); - assert(cblk->passes); - } else { - cblk->passes = 0; - } -- endpasses = &cblk->passes[cblk->numpasses]; -+ endpasses = (cblk->passes) ? &cblk->passes[cblk->numpasses] : 0; - for (pass = cblk->passes; pass != endpasses; ++pass) { - pass->start = 0; - pass->end = 0; -@@ -352,7 +352,7 @@ dump_passes(cblk->passes, cblk->numpasses, cblk); - #endif - - n = 0; -- endpasses = &cblk->passes[cblk->numpasses]; -+ endpasses = (cblk->passes) ? &cblk->passes[cblk->numpasses] : 0; - for (pass = cblk->passes; pass != endpasses; ++pass) { - if (pass->start < n) { - pass->start = n; -diff --git a/src/libjasper/jpc/jpc_t2cod.c b/src/libjasper/jpc/jpc_t2cod.c -index e734900..da28de5 100644 ---- a/src/libjasper/jpc/jpc_t2cod.c -+++ b/src/libjasper/jpc/jpc_t2cod.c -@@ -429,7 +429,7 @@ static int jpc_pi_nextcprl(register jpc_pi_t *pi) - } - - for (pi->compno = pchg->compnostart, pi->picomp = -- &pi->picomps[pi->compno]; pi->compno < JAS_CAST(int, pchg->compnoend); ++pi->compno, -+ &pi->picomps[pi->compno]; pi->compno < JAS_CAST(int, pchg->compnoend) && pi->compno < pi->numcomps; ++pi->compno, - ++pi->picomp) { - pirlvl = pi->picomp->pirlvls; - pi->xstep = pi->picomp->hsamp * (1 << (pirlvl->prcwidthexpn + -@@ -573,7 +573,7 @@ int jpc_pchglist_insert(jpc_pchglist_t *pchglist, int pchgno, jpc_pchg_t *pchg) - } - if (pchglist->numpchgs >= pchglist->maxpchgs) { - newmaxpchgs = pchglist->maxpchgs + 128; -- if (!(newpchgs = jas_realloc(pchglist->pchgs, newmaxpchgs * sizeof(jpc_pchg_t *)))) { -+ if (!(newpchgs = jas_realloc2(pchglist->pchgs, newmaxpchgs, sizeof(jpc_pchg_t *)))) { - return -1; - } - pchglist->maxpchgs = newmaxpchgs; -diff --git a/src/libjasper/jpc/jpc_t2dec.c b/src/libjasper/jpc/jpc_t2dec.c -index 6d2cb72..8300f9b 100644 ---- a/src/libjasper/jpc/jpc_t2dec.c -+++ b/src/libjasper/jpc/jpc_t2dec.c -@@ -478,7 +478,7 @@ jpc_pi_t *jpc_dec_pi_create(jpc_dec_t *dec, jpc_dec_tile_t *tile) - return 0; - } - pi->numcomps = dec->numcomps; -- if (!(pi->picomps = jas_malloc(pi->numcomps * sizeof(jpc_picomp_t)))) { -+ if (!(pi->picomps = jas_alloc2(pi->numcomps, sizeof(jpc_picomp_t)))) { - jpc_pi_destroy(pi); - return 0; - } -@@ -490,7 +490,7 @@ jpc_pi_t *jpc_dec_pi_create(jpc_dec_t *dec, jpc_dec_tile_t *tile) - for (compno = 0, tcomp = tile->tcomps, picomp = pi->picomps; - compno < pi->numcomps; ++compno, ++tcomp, ++picomp) { - picomp->numrlvls = tcomp->numrlvls; -- if (!(picomp->pirlvls = jas_malloc(picomp->numrlvls * -+ if (!(picomp->pirlvls = jas_alloc2(picomp->numrlvls, - sizeof(jpc_pirlvl_t)))) { - jpc_pi_destroy(pi); - return 0; -@@ -503,7 +503,7 @@ jpc_pi_t *jpc_dec_pi_create(jpc_dec_t *dec, jpc_dec_tile_t *tile) - rlvlno < picomp->numrlvls; ++rlvlno, ++pirlvl, ++rlvl) { - /* XXX sizeof(long) should be sizeof different type */ - pirlvl->numprcs = rlvl->numprcs; -- if (!(pirlvl->prclyrnos = jas_malloc(pirlvl->numprcs * -+ if (!(pirlvl->prclyrnos = jas_alloc2(pirlvl->numprcs, - sizeof(long)))) { - jpc_pi_destroy(pi); - return 0; -diff --git a/src/libjasper/jpc/jpc_t2enc.c b/src/libjasper/jpc/jpc_t2enc.c -index 9358a1c..d0c5fd1 100644 ---- a/src/libjasper/jpc/jpc_t2enc.c -+++ b/src/libjasper/jpc/jpc_t2enc.c -@@ -335,7 +335,9 @@ assert(jpc_firstone(datalen) < cblk->numlenbits + jpc_floorlog2(passcount)); - if (!(ms = jpc_ms_create(JPC_MS_EPH))) { - return -1; - } -- jpc_putms(out, enc->cstate, ms); -+ if (jpc_putms(out, enc->cstate, ms)) { -+ return -1; -+ } - jpc_ms_destroy(ms); - } - -@@ -565,7 +567,7 @@ jpc_pi_t *jpc_enc_pi_create(jpc_enc_cp_t *cp, jpc_enc_tile_t *tile) - } - pi->pktno = -1; - pi->numcomps = cp->numcmpts; -- if (!(pi->picomps = jas_malloc(pi->numcomps * sizeof(jpc_picomp_t)))) { -+ if (!(pi->picomps = jas_alloc2(pi->numcomps, sizeof(jpc_picomp_t)))) { - jpc_pi_destroy(pi); - return 0; - } -@@ -577,7 +579,7 @@ jpc_pi_t *jpc_enc_pi_create(jpc_enc_cp_t *cp, jpc_enc_tile_t *tile) - for (compno = 0, tcomp = tile->tcmpts, picomp = pi->picomps; - compno < pi->numcomps; ++compno, ++tcomp, ++picomp) { - picomp->numrlvls = tcomp->numrlvls; -- if (!(picomp->pirlvls = jas_malloc(picomp->numrlvls * -+ if (!(picomp->pirlvls = jas_alloc2(picomp->numrlvls, - sizeof(jpc_pirlvl_t)))) { - jpc_pi_destroy(pi); - return 0; -@@ -591,7 +593,7 @@ jpc_pi_t *jpc_enc_pi_create(jpc_enc_cp_t *cp, jpc_enc_tile_t *tile) - /* XXX sizeof(long) should be sizeof different type */ - pirlvl->numprcs = rlvl->numprcs; - if (rlvl->numprcs) { -- if (!(pirlvl->prclyrnos = jas_malloc(pirlvl->numprcs * -+ if (!(pirlvl->prclyrnos = jas_alloc2(pirlvl->numprcs, - sizeof(long)))) { - jpc_pi_destroy(pi); - return 0; -diff --git a/src/libjasper/jpc/jpc_tagtree.c b/src/libjasper/jpc/jpc_tagtree.c -index 06422d3..1194e7f 100644 ---- a/src/libjasper/jpc/jpc_tagtree.c -+++ b/src/libjasper/jpc/jpc_tagtree.c -@@ -125,7 +125,8 @@ jpc_tagtree_t *jpc_tagtree_create(int numleafsh, int numleafsv) - ++numlvls; - } while (n > 1); - -- if (!(tree->nodes_ = jas_malloc(tree->numnodes_ * sizeof(jpc_tagtreenode_t)))) { -+ if (!(tree->nodes_ = jas_alloc2(tree->numnodes_, sizeof(jpc_tagtreenode_t)))) { -+ jpc_tagtree_destroy(tree); - return 0; - } - -diff --git a/src/libjasper/jpc/jpc_util.c b/src/libjasper/jpc/jpc_util.c -index f53e248..6da1b66 100644 ---- a/src/libjasper/jpc/jpc_util.c -+++ b/src/libjasper/jpc/jpc_util.c -@@ -109,7 +109,7 @@ int jpc_atoaf(char *s, int *numvalues, double **values) - } - - if (n) { -- if (!(vs = jas_malloc(n * sizeof(double)))) { -+ if (!(vs = jas_alloc2(n, sizeof(double)))) { - return -1; - } - -diff --git a/src/libjasper/mif/mif_cod.c b/src/libjasper/mif/mif_cod.c -index 17506a1..cb62200 100644 ---- a/src/libjasper/mif/mif_cod.c -+++ b/src/libjasper/mif/mif_cod.c -@@ -438,8 +438,7 @@ static int mif_hdr_growcmpts(mif_hdr_t *hdr, int maxcmpts) - int cmptno; - mif_cmpt_t **newcmpts; - assert(maxcmpts >= hdr->numcmpts); -- newcmpts = (!hdr->cmpts) ? jas_malloc(maxcmpts * sizeof(mif_cmpt_t *)) : -- jas_realloc(hdr->cmpts, maxcmpts * sizeof(mif_cmpt_t *)); -+ newcmpts = jas_realloc2(hdr->cmpts, maxcmpts, sizeof(mif_cmpt_t *)); - if (!newcmpts) { - return -1; - } -@@ -565,7 +564,7 @@ static int mif_process_cmpt(mif_hdr_t *hdr, char *buf) - break; - case MIF_DATA: - if (!(cmpt->data = jas_strdup(jas_tvparser_getval(tvp)))) { -- return -1; -+ goto error; - } - break; - } -diff --git a/src/libjasper/ras/ras_enc.c b/src/libjasper/ras/ras_enc.c -index 21e7fcb..075bc0b 100644 ---- a/src/libjasper/ras/ras_enc.c -+++ b/src/libjasper/ras/ras_enc.c -@@ -242,8 +242,10 @@ static int ras_putdatastd(jas_stream_t *out, ras_hdr_t *hdr, jas_image_t *image, - - for (y = 0; y < hdr->height; y++) { - for (i = 0; i < numcmpts; ++i) { -- jas_image_readcmpt(image, cmpts[i], 0, y, jas_image_width(image), -- 1, data[i]); -+ if (jas_image_readcmpt(image, cmpts[i], 0, y, -+ jas_image_width(image), 1, data[i])) { -+ return -1; -+ } - } - z = 0; - nz = 0; diff --git a/patches/jxrlib.patch b/patches/jxrlib.patch deleted file mode 100644 index 7947d4e..0000000 --- a/patches/jxrlib.patch +++ /dev/null @@ -1,466 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -new file mode 100644 -index 0000000..94a24cf ---- /dev/null -+++ b/CMakeLists.txt -@@ -0,0 +1,131 @@ -+cmake_minimum_required(VERSION 3.31) -+project(jxrlib) -+include(GNUInstallDirs) -+include(xpflags) -+set(lib_name ${PROJECT_NAME}) -+####################################### -+set(JXRCommon_srcs -+ image/sys/adapthuff.c -+ image/sys/ansi.h -+ image/sys/common.h -+ image/sys/image.c -+ image/sys/perfTimer.h -+ image/sys/perfTimerANSI.c -+ image/sys/strcodec.c -+ image/sys/strcodec.h -+ image/sys/strPredQuant.c -+ image/sys/strTransform.c -+ image/sys/strTransform.h -+ image/sys/windowsmediaphoto.h -+ image/sys/xplatform_image.h -+ ) -+source_group(JXRCommon FILES ${JXRCommon_srcs}) -+list(APPEND ${lib_name}_libsrcs ${JXRCommon_srcs}) -+################### -+set(JXRDecode_srcs -+ image/decode/decode.c -+ image/decode/decode.h -+ image/decode/JXRTranscode.c -+ image/decode/postprocess.c -+ image/decode/segdec.c -+ image/decode/strdec.c -+ image/decode/strdec_x86.c -+ image/decode/strInvTransform.c -+ image/decode/strPredQuantDec.c -+ ) -+source_group(JXRDecode FILES ${JXRDecode_srcs}) -+list(APPEND ${lib_name}_libsrcs ${JXRDecode_srcs}) -+################### -+set(JXREncode_srcs -+ image/encode/encode.c -+ image/encode/encode.h -+ image/encode/segenc.c -+ image/encode/strenc.c -+ image/encode/strenc_x86.c -+ image/encode/strFwdTransform.c -+ image/encode/strPredQuantEnc.c -+ ) -+source_group(JXREncode FILES ${JXREncode_srcs}) -+list(APPEND ${lib_name}_libsrcs ${JXREncode_srcs}) -+################### -+set(Include_srcs -+ common/include/guiddef.h -+ common/include/wmsal.h -+ common/include/wmspecstring.h -+ common/include/wmspecstrings_adt.h -+ common/include/wmspecstrings_strict.h -+ common/include/wmspecstrings_undef.h -+ ) -+source_group(Include FILES ${Include_srcs}) -+list(APPEND ${lib_name}_libsrcs ${Include_srcs}) -+################### -+set(JXRGlue_srcs -+ jxrgluelib/JXRGlue.c -+ jxrgluelib/JXRGlue.h -+ jxrgluelib/JXRGlueJxr.c -+ jxrgluelib/JXRGluePFC.c -+ jxrgluelib/JXRMeta.c -+ jxrgluelib/JXRMeta.h -+ ) -+source_group(JXRGlue FILES ${JXRGlue_srcs}) -+list(APPEND ${lib_name}_libsrcs ${JXRGlue_srcs}) -+################### -+set(JXRTest_srcs -+ jxrtestlib/JXRTest.c -+ jxrtestlib/JXRTest.h -+ jxrtestlib/JXRTestBmp.c -+ jxrtestlib/JXRTestHdr.c -+ jxrtestlib/JXRTestPnm.c -+ jxrtestlib/JXRTestTif.c -+ jxrtestlib/JXRTestYUV.c -+ ) -+source_group(JXRTest FILES ${JXRTest_srcs}) -+list(APPEND ${lib_name}_libsrcs ${JXRTest_srcs}) -+####################################### -+set(verString "^JXR_VERSION=+([0-9]+)\\.([0-9]+)?") -+file(STRINGS Makefile VER REGEX "${verString}") -+string(REGEX REPLACE "${verString}" "\\1.\\2" VER ${VER}) -+####################################### -+add_library(${lib_name} STATIC ${${lib_name}_libsrcs}) -+target_include_directories(${lib_name} PUBLIC $ -+ $ -+ $ -+ $ -+ $ -+ ) -+target_compile_definitions(${lib_name} PRIVATE -DDISABLE_PERF_MEASUREMENT) -+if(CMAKE_COMPILER_IS_GNUCXX OR "${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang") -+ target_compile_definitions(${lib_name} PRIVATE -D__ANSI__) -+endif() -+include(CheckLibraryExists) -+check_library_exists(m pow "${CMAKE_LIBRARY_PATH}" HAVE_LIBM) -+if(HAVE_LIBM) -+ target_link_libraries(${lib_name} PRIVATE m) -+endif() -+####################################### -+set(exes JXRDec420 JxrDecApp JxrEnc420 JxrEncApp) -+foreach(exe ${exes}) -+ add_executable(${exe} jxrencoderdecoder/${exe}.c) -+ target_link_libraries(${exe} PRIVATE ${lib_name}) -+endforeach() -+####################################### -+set(lib_hdrs -+ "${Include_srcs}" -+ image/sys/windowsmediaphoto.h -+ jxrgluelib/JXRGlue.h -+ jxrgluelib/JXRMeta.h -+ ) -+set(targetsFile ${PROJECT_NAME}-targets) -+install(TARGETS ${lib_name} EXPORT ${targetsFile} -+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} -+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} -+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} -+ ) -+install(FILES ${lib_hdrs} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME}) -+if(DEFINED XP_NAMESPACE) -+ set(nameSpace NAMESPACE ${XP_NAMESPACE}::) -+endif() -+if(NOT DEFINED XP_INSTALL_CMAKEDIR) -+ set(XP_INSTALL_CMAKEDIR ${CMAKE_INSTALL_DATADIR}/cmake) -+endif() -+install(EXPORT ${targetsFile} DESTINATION ${XP_INSTALL_CMAKEDIR} ${nameSpace}) -diff --git a/Makefile b/Makefile -index d4d9192..5ce8be8 100644 ---- a/Makefile -+++ b/Makefile -@@ -31,7 +31,7 @@ build: all - - CC=cc - --JXR_VERSION=1.1 -+JXR_VERSION=15.08 - - DIR_SRC=$(CURDIR) - DIR_SYS=image/sys -diff --git a/common/include/guiddef.h b/common/include/guiddef.h -index 17e0ed3..a317d74 100644 ---- a/common/include/guiddef.h -+++ b/common/include/guiddef.h -@@ -53,6 +53,10 @@ typedef struct _GUID { - #endif - #endif - -+#if defined(__GNUC__) && !defined(__ANSI__) -+#define __ANSI__ -+#endif -+ - #ifndef FAR - #if defined(_WIN32) || defined(__ANSI__) - #define FAR -diff --git a/common/include/wmspecstring.h b/common/include/wmspecstring.h -index 1b4767e..2b6d9ca 100644 ---- a/common/include/wmspecstring.h -+++ b/common/include/wmspecstring.h -@@ -37,7 +37,7 @@ - #if _MSC_VER - #pragma once - #endif --#include -+#include "wmsal.h" - - #ifndef __SAL_H_FULL_VER - #define __SAL_H_FULL_VER 140050727 -@@ -301,7 +301,7 @@ __inner_assume_bound_dec - #ifdef __cplusplus - } - #endif --#include -+#include "wmspecstrings_adt.h" - #ifdef _PREFIX_ - /************************************************************************** - * Defintion of __pfx_assume and __pfx_assert. Thse should be the only -@@ -328,7 +328,7 @@ void __pfx_assume(int, const char *); - * Must avoid redfinitions of macros to workaround rc.exe issues. - ***************************************************************************/ - #if !(defined(RC_INVOKED) || defined(SORTPP_PASS)) --#include -+#include "wmspecstrings_strict.h" - #endif /* if !(defined(RC_INVOKED) || defined(SORTPP_PASS)) */ - #endif /* #ifndef SPECSTRINGS_H */ - -diff --git a/common/include/wmspecstrings_strict.h b/common/include/wmspecstrings_strict.h -index 46b44c2..fe41b81 100644 ---- a/common/include/wmspecstrings_strict.h -+++ b/common/include/wmspecstrings_strict.h -@@ -210,7 +210,7 @@ - ************************************************************************/ - #if (_MSC_VER >= 1400) && !defined(__midl) && !defined(_PREFAST_) && (__SPECSTRINGS_STRICT_LEVEL > 0) - #pragma once --#include -+#include "wmspecstrings_undef.h" - #define __ecount(size) __allowed(on_return) - #define __bcount(size) __allowed(on_return) - #define __xcount(size) __allowed(on_return) -diff --git a/image/encode/strenc.c b/image/encode/strenc.c -index d6e970e..9dc7e80 100644 ---- a/image/encode/strenc.c -+++ b/image/encode/strenc.c -@@ -429,11 +429,11 @@ Int StrIOEncInit(CWMImageStrCodec* pSC) - - if(pSC->cNumBitIO > 0){ - size_t i; --#if defined(_WINDOWS_) || defined(UNDER_CE) // tmpnam does not exist in VS2005 WinCE CRT -+#if defined(_WINDOWS_) || defined(UNDER_CE) // mkstemp/CreateWS_FileTemp does not exist - TCHAR szPath[MAX_PATH]; - DWORD cSize, j, k; --#endif - char * pFilename; -+#endif - - pSC->ppWStream = (struct WMPStream **)malloc(pSC->cNumBitIO * sizeof(struct WMPStream *)); - if(pSC->ppWStream == NULL) return ICERR_ERROR; -@@ -453,7 +453,7 @@ Int StrIOEncInit(CWMImageStrCodec* pSC) - - for(i = 0; i < pSC->cNumBitIO; i ++){ - if (pSC->cmbHeight * pSC->cmbWidth * pSC->WMISCP.cChannel >= MAX_MEMORY_SIZE_IN_WORDS) { --#if defined(_WINDOWS_) || defined(UNDER_CE) // tmpnam does not exist in VS2005 WinCE CRT -+#if defined(_WINDOWS_) || defined(UNDER_CE) // mkstemp/CreateWS_FileTemp does not exist - Bool bUnicode = sizeof(TCHAR) == 2; - pSC->ppTempFile[i] = (TCHAR *)malloc(MAX_PATH * sizeof(TCHAR)); - if(pSC->ppTempFile[i] == NULL) return ICERR_ERROR; -@@ -477,17 +477,15 @@ Int StrIOEncInit(CWMImageStrCodec* pSC) - } - pFilename[cSize] = '\0'; - } -+ if(CreateWS_File(pSC->ppWStream + i, pFilename, "w+b") != ICERR_OK) return ICERR_ERROR; - - #else //DPK needs to support ANSI - pSC->ppTempFile[i] = (char *)malloc(FILENAME_MAX * sizeof(char)); - if(pSC->ppTempFile[i] == NULL) return ICERR_ERROR; - -- if ((pFilename = tmpnam(NULL)) == NULL) -- return ICERR_ERROR; -- strcpy(pSC->ppTempFile[i], pFilename); -+ snprintf(pSC->ppTempFile[i], L_tmpnam, "%s/tmp.XXXXXXXXXX", P_tmpdir); -+ if(CreateWS_FileTemp(pSC->ppWStream + i, pSC->ppTempFile[i], "w+b") != ICERR_OK) return ICERR_ERROR; - #endif -- if(CreateWS_File(pSC->ppWStream + i, pFilename, "w+b") != ICERR_OK) return ICERR_ERROR; -- - } - else { - if(CreateWS_List(pSC->ppWStream + i) != ICERR_OK) return ICERR_ERROR; -diff --git a/image/sys/strcodec.c b/image/sys/strcodec.c -index c746d6f..ff0c3fc 100644 ---- a/image/sys/strcodec.c -+++ b/image/sys/strcodec.c -@@ -292,6 +292,37 @@ Cleanup: - return err; - } - -+ERR CreateWS_FileTemp(struct WMPStream** ppWS, char* szFilename, const char* szMode) -+{ -+#ifdef WIN32 -+ ERR err = WMP_errFileIO; -+#else -+ ERR err = WMP_errSuccess; -+ struct WMPStream* pWS = NULL; -+ -+ Call(WMPAlloc((void** )ppWS, sizeof(**ppWS))); -+ pWS = *ppWS; -+ -+ pWS->Close = CloseWS_File; -+ pWS->EOS = EOSWS_File; -+ -+ pWS->Read = ReadWS_File; -+ pWS->Write = WriteWS_File; -+ //pWS->GetLine = GetLineWS_File; -+ -+ pWS->SetPos = SetPosWS_File; -+ pWS->GetPos = GetPosWS_File; -+ -+ int fd = mkstemp(szFilename); -+ FailIf(-1 == fd, WMP_errFileIO); -+ pWS->state.file.pFile = fdopen(fd, szMode); -+ FailIf(NULL == pWS->state.file.pFile, WMP_errFileIO); -+#endif -+ -+Cleanup: -+ return err; -+} -+ - ERR CloseWS_File(struct WMPStream** ppWS) - { - ERR err = WMP_errSuccess; -diff --git a/image/sys/strcodec.h b/image/sys/strcodec.h -index 695a454..90b94ba 100644 ---- a/image/sys/strcodec.h -+++ b/image/sys/strcodec.h -@@ -64,7 +64,7 @@ - - #ifndef UNREFERENCED_PARAMETER - #define UNREFERENCED_PARAMETER(P) { (P) = (P); } --#endif UNREFERENCED_PARAMETER -+#endif // UNREFERENCED_PARAMETER - - #ifdef UNDER_CE - #define PLATFORM_WCE -diff --git a/jxrencoderdecoder/JxrDecApp.c b/jxrencoderdecoder/JxrDecApp.c -index 35fa10c..df0c415 100644 ---- a/jxrencoderdecoder/JxrDecApp.c -+++ b/jxrencoderdecoder/JxrDecApp.c -@@ -427,7 +427,7 @@ ERR WmpDecAppCreateEncoderFromExt( - Call(GetTestEncodeIID(szExt, &pIID)); - - // Create encoder -- Call(PKTestFactory_CreateCodec(pIID, ppIE)); -+ Call(PKTestFactory_CreateCodec(pIID, (void **) ppIE)); - - Cleanup: - return err; -diff --git a/jxrencoderdecoder/JxrEncApp.c b/jxrencoderdecoder/JxrEncApp.c -index aa9de53..d0ce39a 100644 ---- a/jxrencoderdecoder/JxrEncApp.c -+++ b/jxrencoderdecoder/JxrEncApp.c -@@ -615,7 +615,7 @@ main(int argc, char* argv[]) - - //================================ - Call(PKCreateCodecFactory(&pCodecFactory, WMP_SDK_VERSION)); -- Call(pCodecFactory->CreateCodec(&IID_PKImageWmpEncode, &pEncoder)); -+ Call(pCodecFactory->CreateCodec(&IID_PKImageWmpEncode, (void **) &pEncoder)); - - //---------------------------------------------------------------- - Call(PKCreateTestFactory(&pTestFactory, WMP_SDK_VERSION)); -diff --git a/jxrgluelib/JXRGlue.h b/jxrgluelib/JXRGlue.h -index 382763f..b439700 100644 ---- a/jxrgluelib/JXRGlue.h -+++ b/jxrgluelib/JXRGlue.h -@@ -31,8 +31,12 @@ - extern "C" { - #endif - --#include --#include -+#if defined(__GNUC__) && !defined(__ANSI__) -+#define __ANSI__ -+#endif -+ -+#include "JXRMeta.h" -+#include "guiddef.h" - - //================================================================ - #define WMP_SDK_VERSION 0x0101 -diff --git a/jxrgluelib/JXRMeta.h b/jxrgluelib/JXRMeta.h -index b7b5880..e9e0401 100644 ---- a/jxrgluelib/JXRMeta.h -+++ b/jxrgluelib/JXRMeta.h -@@ -27,9 +27,9 @@ - //*@@@---@@@@****************************************************************** - #pragma once - --#include -+#include "windowsmediaphoto.h" - #ifndef WIN32 --#include -+#include "wmspecstring.h" - #endif - - #ifndef UNREFERENCED_PARAMETER -diff --git a/jxrtestlib/JXRTest.c b/jxrtestlib/JXRTest.c -index b2a9b64..5552606 100644 ---- a/jxrtestlib/JXRTest.c -+++ b/jxrtestlib/JXRTest.c -@@ -198,7 +198,7 @@ ERR PKTestFactory_CreateDecoderFromFile(const char* szFilename, PKImageDecode** - ERR err = WMP_errSuccess; - - char *pExt = NULL; -- PKIID* pIID = NULL; -+ const PKIID* pIID = NULL; - - struct WMPStream* pStream = NULL; - PKImageDecode* pDecoder = NULL; -@@ -214,7 +214,7 @@ ERR PKTestFactory_CreateDecoderFromFile(const char* szFilename, PKImageDecode** - Call(CreateWS_File(&pStream, szFilename, "rb")); - - // Create decoder -- Call(PKTestFactory_CreateCodec(pIID, ppDecoder)); -+ Call(PKTestFactory_CreateCodec(pIID, (void **) ppDecoder)); - pDecoder = *ppDecoder; - - // attach stream to decoder -@@ -232,7 +232,7 @@ ERR PKCreateTestFactory(PKCodecFactory** ppCFactory, U32 uVersion) - - UNREFERENCED_PARAMETER( uVersion ); - -- Call(PKAlloc(ppCFactory, sizeof(**ppCFactory))); -+ Call(PKAlloc((void **) ppCFactory, sizeof(**ppCFactory))); - pCFactory = *ppCFactory; - - pCFactory->CreateCodec = PKTestFactory_CreateCodec; -@@ -287,7 +287,7 @@ ERR PKTestDecode_Release( - - pID->fStreamOwner && pID->pStream->Close(&pID->pStream); - -- return PKFree(ppID); -+ return PKFree((void **) ppID); - } - - ERR PKTestDecode_Create( -@@ -296,7 +296,7 @@ ERR PKTestDecode_Create( - ERR err = WMP_errSuccess; - PKTestDecode* pID = NULL; - -- Call(PKAlloc(ppID, sizeof(**ppID))); -+ Call(PKAlloc((void **) ppID, sizeof(**ppID))); - - pID = *ppID; - pID->Initialize = PKTestDecode_Initialize; -diff --git a/jxrtestlib/JXRTestHdr.c b/jxrtestlib/JXRTestHdr.c -index a62914c..6f108fb 100644 ---- a/jxrtestlib/JXRTestHdr.c -+++ b/jxrtestlib/JXRTestHdr.c -@@ -25,9 +25,9 @@ - // POSSIBILITY OF SUCH DAMAGE. - // - //*@@@---@@@@****************************************************************** --#ifndef ANSI -+#ifndef __ANSI__ - #define _CRT_SECURE_NO_WARNINGS --#endif ANSI -+#endif // __ANSI__ - - #include - #include -diff --git a/jxrtestlib/JXRTestPnm.c b/jxrtestlib/JXRTestPnm.c -index 8917d4a..840c746 100644 ---- a/jxrtestlib/JXRTestPnm.c -+++ b/jxrtestlib/JXRTestPnm.c -@@ -27,7 +27,7 @@ - //*@@@---@@@@****************************************************************** - #ifndef ANSI - #define _CRT_SECURE_NO_WARNINGS --#endif ANSI -+#endif // ANSI - - #include - -diff --git a/jxrtestlib/JXRTestTif.c b/jxrtestlib/JXRTestTif.c -index 39f619d..d8be054 100644 ---- a/jxrtestlib/JXRTestTif.c -+++ b/jxrtestlib/JXRTestTif.c -@@ -909,8 +909,8 @@ ERR PKImageDecode_Release_TIF(PKTestDecode** ppID) - - PKTestDecode *pID = *ppID; - -- Call(WMPFree(&pID->EXT.TIF.uStripOffsets)); -- Call(WMPFree(&pID->EXT.TIF.uStripByteCounts)); -+ Call(WMPFree((void **) &pID->EXT.TIF.uStripOffsets)); -+ Call(WMPFree((void **) &pID->EXT.TIF.uStripByteCounts)); - - Call(PKTestDecode_Release(ppID)); - diff --git a/patches/libstrophe.patch b/patches/libstrophe.patch deleted file mode 100644 index 6e82756..0000000 --- a/patches/libstrophe.patch +++ /dev/null @@ -1,215 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -new file mode 100644 -index 0000000..a3dab53 ---- /dev/null -+++ b/CMakeLists.txt -@@ -0,0 +1,51 @@ -+cmake_minimum_required(VERSION 3.31) -+project(libstrophe) -+include(GNUInstallDirs) -+include(xpflags) -+if(DEFINED XP_NAMESPACE) -+ set(nameSpace NAMESPACE ${XP_NAMESPACE}::) -+endif() -+if(NOT DEFINED XP_INSTALL_CMAKEDIR) -+ set(XP_INSTALL_CMAKEDIR ${CMAKE_INSTALL_DATADIR}/cmake) -+endif() -+enable_testing() -+set_property(GLOBAL PROPERTY USE_FOLDERS ON) # enables MSVC Solution Folders -+######################################## -+if(MSVC) -+ add_definitions( -+ -D_CRT_NONSTDC_NO_DEPRECATE -+ -D_CRT_SECURE_NO_WARNINGS -+ -D_WINSOCK_DEPRECATED_NO_WARNINGS -+ ) -+endif() -+######################################## -+if(COMMAND xpFindPkg) -+ xpFindPkg(PKGS expat openssl) -+else() -+ find_package(OpenSSL) -+ find_package(EXPAT) -+endif() -+if(NOT EXPAT_FOUND) -+ message(FATAL_ERROR "can't find expat - libstrophe cmake currently hard-coded to use expat") -+endif() -+if(NOT OPENSSL_FOUND) -+ message(FATAL_ERROR "can't find OpenSSL - libstrophe cmake currently hard-coded to use OpenSSL") -+endif() -+#################### -+include(CheckLibraryExists) -+function(checkLibraryConcat lib symbol liblist) -+ string(TOUPPER ${lib} LIB) -+ check_library_exists("${lib}" "${symbol}" "" LIBSTROPHE_HAS_${LIB}) -+ if(LIBSTROPHE_HAS_${LIB}) -+ list(APPEND ${liblist} ${lib}) -+ set(${liblist} ${${liblist}} PARENT_SCOPE) -+ endif() -+endfunction() -+checkLibraryConcat(resolv __res_query SYS_LIBS) -+checkLibraryConcat(winmm timeGetTime SYS_LIBS) -+checkLibraryConcat(ws2_32 getch SYS_LIBS) -+######################################## -+add_subdirectory(src) -+add_subdirectory(examples) -+add_subdirectory(tests) -+install(FILES strophe.h strophepp.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME}) -diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt -new file mode 100644 -index 0000000..5de7bc3 ---- /dev/null -+++ b/examples/CMakeLists.txt -@@ -0,0 +1,13 @@ -+set(examples -+ active -+ basic -+ bot -+ component -+ roster -+ uuid -+ ) -+foreach(exe ${examples}) -+ add_executable(${exe} ${exe}.c) -+ target_link_libraries(${exe} PRIVATE libstrophe) -+ set_property(TARGET ${exe} PROPERTY FOLDER examples) -+endforeach() -diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt -new file mode 100644 -index 0000000..6c4b9c3 ---- /dev/null -+++ b/src/CMakeLists.txt -@@ -0,0 +1,61 @@ -+set(lib_name ${PROJECT_NAME}) -+######################################## -+set(${lib_name}_libsrcs -+ auth.c -+ common.h -+ conn.c -+ crypto.c -+ ctx.c -+ event.c -+ handler.c -+ hash.c -+ hash.h -+ jid.c -+ md5.c -+ md5.h -+ ostypes.h -+ parser_expat.c -+ parser.h -+ #parser_libxml2.c # parser_expat instead -+ rand.c -+ rand.h -+ resolver.c -+ resolver.h -+ sasl.c -+ sasl.h -+ scram.c -+ scram.h -+ sha1.c -+ sha1.h -+ snprintf.c -+ snprintf.h -+ sock.c -+ sock.h -+ stanza.c -+ #tls_dummy.c # tls_openssl instead -+ #tls_gnutls.c # tls_openssl instead -+ tls.h -+ tls_openssl.c -+ #tls_schannel.c # tls_openssl instead -+ util.c -+ util.h -+ uuid.c -+ ) -+source_group("" FILES ${${lib_name}_libsrcs}) -+######################################## -+add_library(${lib_name} STATIC ${${lib_name}_libsrcs}) -+target_include_directories(${lib_name} PUBLIC $ -+ $ $ -+ ) -+target_link_libraries(${lib_name} PRIVATE ${EXPAT_LIBRARIES} ${OPENSSL_LIBRARIES} ${SYS_LIBS}) -+set_target_properties(${lib_name} PROPERTIES -+ PREFIX "" # strip off the "lib" prefix, since it's already libstrophe -+ ) -+######################################## -+set(targetsFile ${PROJECT_NAME}-targets) -+install(TARGETS ${lib_name} EXPORT ${targetsFile} -+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} -+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} -+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} -+ ) -+install(EXPORT ${targetsFile} DESTINATION ${XP_INSTALL_CMAKEDIR} ${nameSpace}) -diff --git a/src/tls_openssl.c b/src/tls_openssl.c -index 0e440c1..04f379e 100644 ---- a/src/tls_openssl.c -+++ b/src/tls_openssl.c -@@ -49,8 +49,12 @@ static void _tls_log_error(xmpp_ctx_t *ctx); - - void tls_initialize(void) - { -+#if OPENSSL_API_COMPAT < 0x10100000L - SSL_library_init(); - SSL_load_error_strings(); -+#else -+ OPENSSL_init_ssl(OPENSSL_INIT_LOAD_SSL_STRINGS | OPENSSL_INIT_LOAD_CRYPTO_STRINGS, NULL); -+#endif - } - - void tls_shutdown(void) -diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt -new file mode 100644 -index 0000000..dabc2ae ---- /dev/null -+++ b/tests/CMakeLists.txt -@@ -0,0 +1,28 @@ -+add_library(testlib STATIC test.c test.h) -+target_link_libraries(testlib PUBLIC libstrophe) -+set_property(TARGET testlib PROPERTY FOLDER tests) -+set(tests -+ check_parser -+ res_query_dump -+ test_base64 -+ test_ctx -+ test_hash -+ test_jid -+ test_md5 -+ test_rand -+ test_resolver -+ test_sasl -+ test_scram -+ test_sha1 -+ test_snprintf -+ test_sock -+ test_string -+ ) -+foreach(exe ${tests}) -+ if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${exe}.c) # there are some tests only in repo, not in download -+ add_executable(${exe} ${exe}.c) -+ target_link_libraries(${exe} PRIVATE testlib) -+ add_test(NAME ${exe} COMMAND ${exe}) -+ set_property(TARGET ${exe} PROPERTY FOLDER tests) -+ endif() -+endforeach() -diff --git a/tests/test_string.c b/tests/test_string.c -index fc1b391..0dc0b92 100644 ---- a/tests/test_string.c -+++ b/tests/test_string.c -@@ -20,6 +20,16 @@ - - #include "test.h" /* ARRAY_SIZE */ - -+/* strtok_s() has appeared in visual studio 2005. -+ Use own implementation for older versions. */ -+#ifdef _MSC_VER -+# if (_MSC_VER >= 1400) -+# define strtok_r strtok_s -+# else -+# define strtok_r xmpp_strtok_r -+# endif -+#endif /* _MSC_VER */ -+ - static int test_strtok_r(void) - { - const char *test = "-abc-=-def--"; diff --git a/patches/rapidjson.patch b/patches/rapidjson.patch deleted file mode 100644 index 001a842..0000000 --- a/patches/rapidjson.patch +++ /dev/null @@ -1,165 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index ceda71b1..ec763278 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -1,4 +1,4 @@ --CMAKE_MINIMUM_REQUIRED(VERSION 2.8) -+CMAKE_MINIMUM_REQUIRED(VERSION 2.8...3.31) - if(POLICY CMP0025) - # detect Apple's Clang - cmake_policy(SET CMP0025 NEW) -@@ -7,10 +7,17 @@ if(POLICY CMP0054) - cmake_policy(SET CMP0054 NEW) - endif() - --SET(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules) -+list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules) - - PROJECT(RapidJSON CXX) - -+include(GNUInstallDirs) -+include(xpflags) -+if(DEFINED XP_NAMESPACE) -+ set(nameSpace NAMESPACE ${XP_NAMESPACE}::) -+ set(XP_OPT_INSTALL EXCLUDE_FROM_ALL) -+endif() -+ - set(LIB_MAJOR_VERSION "1") - set(LIB_MINOR_VERSION "1") - set(LIB_PATCH_VERSION "0") -@@ -93,25 +100,29 @@ elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC") - endif() - - #add extra search paths for libraries and includes --SET(INCLUDE_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/include" CACHE PATH "The directory the headers are installed in") --SET(LIB_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/lib" CACHE STRING "Directory where lib will install") --SET(DOC_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/share/doc/${PROJECT_NAME}" CACHE PATH "Path to the documentation") -- --IF(UNIX OR CYGWIN) -- SET(_CMAKE_INSTALL_DIR "${LIB_INSTALL_DIR}/cmake/${PROJECT_NAME}") --ELSEIF(WIN32) -- SET(_CMAKE_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/cmake") --ENDIF() --SET(CMAKE_INSTALL_DIR "${_CMAKE_INSTALL_DIR}" CACHE PATH "The directory cmake fiels are installed in") -+SET(INCLUDE_INSTALL_DIR "${CMAKE_INSTALL_INCLUDEDIR}" CACHE PATH "The directory the headers are installed in") -+SET(LIB_INSTALL_DIR "${CMAKE_INSTALL_LIBDIR}" CACHE STRING "Directory where lib will install") -+SET(DOC_INSTALL_DIR "${CMAKE_INSTALL_DATADIR}/doc/${PROJECT_NAME}" CACHE PATH "Path to the documentation") -+if(NOT DEFINED XP_INSTALL_CMAKEDIR) -+ set(XP_INSTALL_CMAKEDIR ${CMAKE_INSTALL_DATADIR}/cmake) -+endif() -+SET(CMAKE_INSTALL_DIR "${XP_INSTALL_CMAKEDIR}" CACHE PATH "The directory cmake files are installed in") - - include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include) - -+string(TOLOWER ${PROJECT_NAME} lib_name) -+add_library(${lib_name} INTERFACE) -+target_include_directories(${lib_name} INTERFACE $) -+set(targetsFile ${lib_name}-targets) -+install(TARGETS ${lib_name} EXPORT ${targetsFile}) -+install(EXPORT ${targetsFile} DESTINATION ${CMAKE_INSTALL_DIR} ${nameSpace}) -+ - if(RAPIDJSON_BUILD_DOC) - add_subdirectory(doc) - endif() - - add_custom_target(travis_doc) --add_custom_command(TARGET travis_doc -+add_custom_command(TARGET travis_doc POST_BUILD - COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/travis-doxygen.sh) - - if(RAPIDJSON_BUILD_EXAMPLES) -@@ -133,11 +144,13 @@ IF (UNIX OR CYGWIN) - ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.pc - @ONLY) - INSTALL (FILES ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.pc -+ ${XP_OPT_INSTALL} - DESTINATION "${LIB_INSTALL_DIR}/pkgconfig" - COMPONENT pkgconfig) - ENDIF() - - install(FILES readme.md -+ ${XP_OPT_INSTALL} - DESTINATION "${DOC_INSTALL_DIR}" - COMPONENT doc) - -@@ -146,6 +159,7 @@ install(DIRECTORY include/rapidjson - COMPONENT dev) - - install(DIRECTORY example/ -+ ${XP_OPT_INSTALL} - DESTINATION "${DOC_INSTALL_DIR}/examples" - COMPONENT examples - # Following patterns are for excluding the intermediate/object files -@@ -169,5 +183,6 @@ CONFIGURE_FILE(${PROJECT_NAME}ConfigVersion.cmake.in - INSTALL(FILES - ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}Config.cmake - ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake -+ ${XP_OPT_INSTALL} - DESTINATION "${CMAKE_INSTALL_DIR}" - COMPONENT dev) -diff --git a/example/CMakeLists.txt b/example/CMakeLists.txt -index 4d448ccc..36e0fd9d 100644 ---- a/example/CMakeLists.txt -+++ b/example/CMakeLists.txt -@@ -1,4 +1,4 @@ --cmake_minimum_required(VERSION 2.8) -+cmake_minimum_required(VERSION 2.8...3.24) - - if(POLICY CMP0054) - cmake_policy(SET CMP0054 NEW) -diff --git a/include/rapidjson/document.h b/include/rapidjson/document.h -index e3e20dfb..5526913a 100644 ---- a/include/rapidjson/document.h -+++ b/include/rapidjson/document.h -@@ -1425,7 +1425,7 @@ public: - MemberIterator pos = MemberBegin() + (first - MemberBegin()); - for (MemberIterator itr = pos; itr != last; ++itr) - itr->~Member(); -- std::memmove(&*pos, &*last, static_cast(MemberEnd() - last) * sizeof(Member)); -+ std::memmove(static_cast(&*pos), &*last, static_cast(MemberEnd() - last) * sizeof(Member)); - data_.o.size -= static_cast(last - first); - return pos; - } -@@ -1628,8 +1628,8 @@ public: - RAPIDJSON_ASSERT(last <= End()); - ValueIterator pos = Begin() + (first - Begin()); - for (ValueIterator itr = pos; itr != last; ++itr) -- itr->~GenericValue(); -- std::memmove(pos, last, static_cast(End() - last) * sizeof(GenericValue)); -+ itr->~GenericValue(); -+ std::memmove(static_cast(pos), last, static_cast(End() - last) * sizeof(GenericValue)); - data_.a.size -= static_cast(last - first); - return pos; - } -@@ -1936,7 +1936,7 @@ private: - if (count) { - GenericValue* e = static_cast(allocator.Malloc(count * sizeof(GenericValue))); - SetElementsPointer(e); -- std::memcpy(e, values, count * sizeof(GenericValue)); -+ std::memcpy(static_cast(e), values, count * sizeof(GenericValue)); - } - else - SetElementsPointer(0); -@@ -1949,7 +1949,7 @@ private: - if (count) { - Member* m = static_cast(allocator.Malloc(count * sizeof(Member))); - SetMembersPointer(m); -- std::memcpy(m, members, count * sizeof(Member)); -+ std::memcpy(static_cast(m), members, count * sizeof(Member)); - } - else - SetMembersPointer(0); -diff --git a/include/rapidjson/internal/regex.h b/include/rapidjson/internal/regex.h -index 422a5240..d4039716 100644 ---- a/include/rapidjson/internal/regex.h -+++ b/include/rapidjson/internal/regex.h -@@ -29,6 +29,9 @@ RAPIDJSON_DIAG_OFF(implicit-fallthrough) - #ifdef __GNUC__ - RAPIDJSON_DIAG_PUSH - RAPIDJSON_DIAG_OFF(effc++) -+#if __GNUC__ >= 7 -+RAPIDJSON_DIAG_OFF(implicit-fallthrough) -+#endif - #endif - - #ifdef _MSC_VER diff --git a/patches/wirehair.patch b/patches/wirehair.patch deleted file mode 100644 index 188f57c..0000000 --- a/patches/wirehair.patch +++ /dev/null @@ -1,929 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index acf97f4..242c593 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -2,6 +2,7 @@ cmake_minimum_required(VERSION 3.5) - project(wirehair) - - set(CMAKE_CXX_STANDARD 11) -+include(xpflags) - - set(CMAKE_CONFIGURATION_TYPES "Debug;Release" CACHE STRING "" FORCE) - -@@ -14,8 +15,10 @@ option(MARCH_NATIVE "Use -march=native option" ON) - set(LIB_SOURCE_FILES - wirehair.cpp - include/wirehair/wirehair.h -+ cm256.cpp -+ include/wirehair/cm256.h - gf256.cpp -- gf256.h -+ include/wirehair/gf256.h - WirehairCodec.cpp - WirehairCodec.h - WirehairTools.cpp -@@ -58,26 +61,42 @@ set(GEN_TABLES - tables/TableGenerator.cpp - tables/HeavyRowGenerator.cpp - tables/HeavyRowGenerator.h -- gf256.cpp -- gf256.h - ) - - if(MSVC) - else() -- set(CMAKE_CXX_FLAGS "-Wall -Wextra") -- set(CMAKE_CXX_FLAGS_DEBUG "-g -O0") -- set(CMAKE_CXX_FLAGS_RELEASE "-O3") -+ set(flags -Wall -Wextra -mssse3) -+ if(MARCH_NATIVE) -+ list(APPEND flags -march=native) -+ endif() -+ include(CheckCXXCompilerFlag) -+ foreach(flag ${flags}) -+ string(REPLACE "=" "_" _flag ${flag}) -+ check_cxx_compiler_flag("${flag}" has_wh${_flag}) -+ if(has_wh${_flag}) -+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${flag}") -+ endif() -+ endforeach() -+ if(XP_BUILD_VERBOSE) -+ message(STATUS "CMAKE_CXX_FLAGS: ${CMAKE_CXX_FLAGS}") -+ message(STATUS "CMAKE_CXX_FLAGS_DEBUG: ${CMAKE_CXX_FLAGS_DEBUG}") -+ message(STATUS "CMAKE_CXX_FLAGS_RELEASE: ${CMAKE_CXX_FLAGS_RELEASE}") -+ endif() -+ if (CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64") -+ add_definitions(-DLINUX_ARM=1) -+ endif() - endif() - --if(MARCH_NATIVE) -- set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -march=native") -- set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -march=native") -+if(DONT_INSTALL_PYTHON) -+ set(optionalInstall EXCLUDE_FROM_ALL) - endif() - - add_library(wirehair ${LIB_SOURCE_FILES}) - set_target_properties(wirehair PROPERTIES VERSION 2) - set_target_properties(wirehair PROPERTIES SOVERSION 2) --target_include_directories(wirehair PUBLIC ${PROJECT_SOURCE_DIR}/include) -+target_include_directories(wirehair PUBLIC $ -+ $ -+ ) - - add_executable(unit_test ${UNIT_TEST_SOURCE_FILES}) - target_link_libraries(unit_test wirehair) -@@ -95,12 +114,21 @@ add_executable(gen_dcounts ${GEN_DCOUNTS}) - target_link_libraries(gen_dcounts wirehair) - - add_executable(gen_tables ${GEN_TABLES}) -+target_link_libraries(gen_tables wirehair) - - include(GNUInstallDirs) - --install(TARGETS wirehair -+set(targetsFile ${PROJECT_NAME}-targets) -+install(TARGETS wirehair EXPORT ${targetsFile} - ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} - PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) --install(DIRECTORY include DESTINATION ${CMAKE_INSTALL_PREFIX}) --install(DIRECTORY python DESTINATION ${CMAKE_INSTALL_PREFIX}) -+if(DEFINED XP_NAMESPACE) -+ set(nameSpace NAMESPACE ${XP_NAMESPACE}::) -+endif() -+if(NOT DEFINED XP_INSTALL_CMAKEDIR) -+ set(XP_INSTALL_CMAKEDIR ${CMAKE_INSTALL_DATADIR}/cmake) -+endif() -+install(EXPORT ${targetsFile} DESTINATION ${XP_INSTALL_CMAKEDIR} ${nameSpace}) -+install(DIRECTORY include/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) -+install(DIRECTORY python DESTINATION ${CMAKE_INSTALL_PREFIX} ${optionalInstall}) -diff --git a/WirehairTools.h b/WirehairTools.h -index 8340df5..f8b3251 100644 ---- a/WirehairTools.h -+++ b/WirehairTools.h -@@ -31,7 +31,7 @@ - #define WIREHAIR_TOOLS_H - - #include --#include "gf256.h" -+#include - #include // std::nothrow - - // Compiler-specific debug break -diff --git a/cm256.cpp b/cm256.cpp -new file mode 100644 -index 0000000..b51ff8f ---- /dev/null -+++ b/cm256.cpp -@@ -0,0 +1,603 @@ -+/* -+ Copyright (c) 2015 Christopher A. Taylor. All rights reserved. -+ -+ Redistribution and use in source and binary forms, with or without -+ modification, are permitted provided that the following conditions are met: -+ -+ * Redistributions of source code must retain the above copyright notice, -+ this list of conditions and the following disclaimer. -+ * Redistributions in binary form must reproduce the above copyright notice, -+ this list of conditions and the following disclaimer in the documentation -+ and/or other materials provided with the distribution. -+ * Neither the name of CM256 nor the names of its contributors may be -+ used to endorse or promote products derived from this software without -+ specific prior written permission. -+ -+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE -+ LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -+ POSSIBILITY OF SUCH DAMAGE. -+*/ -+ -+#include -+ -+ -+/* -+ GF(256) Cauchy Matrix Overview -+ -+ As described on Wikipedia, each element of a normal Cauchy matrix is defined as: -+ -+ a_ij = 1 / (x_i - y_j) -+ The arrays x_i and y_j are vector parameters of the matrix. -+ The values in x_i cannot be reused in y_j. -+ -+ Moving beyond the Wikipedia... -+ -+ (1) Number of rows (R) is the range of i, and number of columns (C) is the range of j. -+ -+ (2) Being able to select x_i and y_j makes Cauchy matrices more flexible in practice -+ than Vandermonde matrices, which only have one parameter per row. -+ -+ (3) Cauchy matrices are always invertible, AKA always full rank, AKA when treated as -+ as linear system y = M*x, the linear system has a single solution. -+ -+ (4) A Cauchy matrix concatenated below a square CxC identity matrix always has rank C, -+ Meaning that any R rows can be eliminated from the concatenated matrix and the -+ matrix will still be invertible. This is how Reed-Solomon erasure codes work. -+ -+ (5) Any row or column can be multiplied by non-zero values, and the resulting matrix -+ is still full rank. This is true for any matrix, since it is effectively the same -+ as pre and post multiplying by diagonal matrices, which are always invertible. -+ -+ (6) Matrix elements with a value of 1 are much faster to operate on than other values. -+ For instance a matrix of [1, 1, 1, 1, 1] is invertible and much faster for various -+ purposes than [2, 2, 2, 2, 2]. -+ -+ (7) For GF(256) matrices, the symbols in x_i and y_j are selected from the numbers -+ 0...255, and so the number of rows + number of columns may not exceed 256. -+ Note that values in x_i and y_j may not be reused as stated above. -+ -+ In summary, Cauchy matrices -+ are preferred over Vandermonde matrices. (2) -+ are great for MDS erasure codes. (3) and (4) -+ should be optimized to include more 1 elements. (5) and (6) -+ have a limited size in GF(256), rows+cols <= 256. (7) -+*/ -+ -+ -+//----------------------------------------------------------------------------- -+// Initialization -+ -+extern "C" int cm256_init_(int version) -+{ -+ if (version != CM256_VERSION) -+ { -+ // User's header does not match library version -+ return -10; -+ } -+ -+ // Return error code from GF(256) init if required -+ return gf256_init(); -+} -+ -+ -+/* -+ Selected Cauchy Matrix Form -+ -+ The matrix consists of elements a_ij, where i = row, j = column. -+ a_ij = 1 / (x_i - y_j), where x_i and y_j are sets of GF(256) values -+ that do not intersect. -+ -+ We select x_i and y_j to just be incrementing numbers for the -+ purposes of this library. Further optimizations may yield matrices -+ with more 1 elements, but the benefit seems relatively small. -+ -+ The x_i values range from 0...(originalCount - 1). -+ The y_j values range from originalCount...(originalCount + recoveryCount - 1). -+ -+ We then improve the Cauchy matrix by dividing each column by the -+ first row element of that column. The result is an invertible -+ matrix that has all 1 elements in the first row. This is equivalent -+ to a rotated Vandermonde matrix, so we could have used one of those. -+ -+ The advantage of doing this is that operations involving the first -+ row will be extremely fast (just memory XOR), so the decoder can -+ be optimized to take advantage of the shortcut when the first -+ recovery row can be used. -+ -+ First row element of Cauchy matrix for each column: -+ a_0j = 1 / (x_0 - y_j) = 1 / (x_0 - y_j) -+ -+ Our Cauchy matrix sets first row to ones, so: -+ a_ij = (1 / (x_i - y_j)) / a_0j -+ a_ij = (y_j - x_0) / (x_i - y_j) -+ a_ij = (y_j + x_0) div (x_i + y_j) in GF(256) -+*/ -+ -+// This function generates each matrix element based on x_i, x_0, y_j -+// Note that for x_i == x_0, this will return 1, so it is better to unroll out the first row. -+static GF256_FORCE_INLINE unsigned char GetMatrixElement(unsigned char x_i, unsigned char x_0, unsigned char y_j) -+{ -+ return gf256_div(gf256_add(y_j, x_0), gf256_add(x_i, y_j)); -+} -+ -+ -+//----------------------------------------------------------------------------- -+// Encoding -+ -+extern "C" void cm256_encode_block( -+ cm256_encoder_params params, // Encoder parameters -+ cm256_block* originals, // Array of pointers to original blocks -+ int recoveryBlockIndex, // Return value from cm256_get_recovery_block_index() -+ void* recoveryBlock) // Output recovery block -+{ -+ // If only one block of input data, -+ if (params.OriginalCount == 1) -+ { -+ // No meaningful operation here, degenerate to outputting the same data each time. -+ -+ memcpy(recoveryBlock, originals[0].Block, params.BlockBytes); -+ return; -+ } -+ // else OriginalCount >= 2: -+ -+ // Unroll first row of recovery matrix: -+ // The matrix we generate for the first row is all ones, -+ // so it is merely a parity of the original data. -+ if (recoveryBlockIndex == params.OriginalCount) -+ { -+ gf256_addset_mem(recoveryBlock, originals[0].Block, originals[1].Block, params.BlockBytes); -+ for (int j = 2; j < params.OriginalCount; ++j) -+ { -+ gf256_add_mem(recoveryBlock, originals[j].Block, params.BlockBytes); -+ } -+ return; -+ } -+ -+ // TBD: Faster algorithms seem to exist for computing this matrix-vector product. -+ -+ // Start the x_0 values arbitrarily from the original count. -+ const uint8_t x_0 = static_cast(params.OriginalCount); -+ -+ // For other rows: -+ { -+ const uint8_t x_i = static_cast(recoveryBlockIndex); -+ -+ // Unroll first operation for speed -+ { -+ const uint8_t y_0 = 0; -+ const uint8_t matrixElement = GetMatrixElement(x_i, x_0, y_0); -+ -+ gf256_mul_mem(recoveryBlock, originals[0].Block, matrixElement, params.BlockBytes); -+ } -+ -+ // For each original data column, -+ for (int j = 1; j < params.OriginalCount; ++j) -+ { -+ const uint8_t y_j = static_cast(j); -+ const uint8_t matrixElement = GetMatrixElement(x_i, x_0, y_j); -+ -+ gf256_muladd_mem(recoveryBlock, matrixElement, originals[j].Block, params.BlockBytes); -+ } -+ } -+} -+ -+extern "C" int cm256_encode( -+ cm256_encoder_params params, // Encoder params -+ cm256_block* originals, // Array of pointers to original blocks -+ void* recoveryBlocks) // Output recovery blocks end-to-end -+{ -+ // Validate input: -+ if (params.OriginalCount <= 0 || -+ params.RecoveryCount <= 0 || -+ params.BlockBytes <= 0) -+ { -+ return -1; -+ } -+ if (params.OriginalCount + params.RecoveryCount > 256) -+ { -+ return -2; -+ } -+ if (!originals || !recoveryBlocks) -+ { -+ return -3; -+ } -+ -+ uint8_t* recoveryBlock = static_cast(recoveryBlocks); -+ -+ for (int block = 0; block < params.RecoveryCount; ++block, recoveryBlock += params.BlockBytes) -+ { -+ cm256_encode_block(params, originals, (params.OriginalCount + block), recoveryBlock); -+ } -+ -+ return 0; -+} -+ -+ -+//----------------------------------------------------------------------------- -+// Decoding -+ -+struct CM256Decoder -+{ -+ // Encode parameters -+ cm256_encoder_params Params; -+ -+ // Recovery blocks -+ cm256_block* Recovery[256]; -+ int RecoveryCount; -+ -+ // Original blocks -+ cm256_block* Original[256]; -+ int OriginalCount; -+ -+ // Row indices that were erased -+ uint8_t ErasuresIndices[256]; -+ -+ // Initialize the decoder -+ bool Initialize(cm256_encoder_params& params, cm256_block* blocks); -+ -+ // Decode m=1 case -+ void DecodeM1(); -+ -+ // Decode for m>1 case -+ void Decode(); -+ -+ // Generate the LU decomposition of the matrix -+ void GenerateLDUDecomposition(uint8_t* matrix_L, uint8_t* diag_D, uint8_t* matrix_U); -+}; -+ -+bool CM256Decoder::Initialize(cm256_encoder_params& params, cm256_block* blocks) -+{ -+ Params = params; -+ -+ cm256_block* block = blocks; -+ OriginalCount = 0; -+ RecoveryCount = 0; -+ -+ // Initialize erasures to zeros -+ for (int ii = 0; ii < params.OriginalCount; ++ii) -+ { -+ ErasuresIndices[ii] = 0; -+ } -+ -+ // For each input block, -+ for (int ii = 0; ii < params.OriginalCount; ++ii, ++block) -+ { -+ int row = block->Index; -+ -+ // If it is an original block, -+ if (row < params.OriginalCount) -+ { -+ Original[OriginalCount++] = block; -+ -+ if (ErasuresIndices[row] != 0) -+ { -+ // Error out if two row indices repeat -+ return false; -+ } -+ -+ ErasuresIndices[row] = 1; -+ } -+ else -+ { -+ Recovery[RecoveryCount++] = block; -+ } -+ } -+ -+ // Identify erasures -+ for (int ii = 0, indexCount = 0; ii < 256; ++ii) -+ { -+ if (!ErasuresIndices[ii]) -+ { -+ ErasuresIndices[indexCount] = static_cast( ii ); -+ -+ if (++indexCount >= RecoveryCount) -+ { -+ break; -+ } -+ } -+ } -+ -+ return true; -+} -+ -+void CM256Decoder::DecodeM1() -+{ -+ // XOR all other blocks into the recovery block -+ uint8_t* outBlock = static_cast(Recovery[0]->Block); -+ const uint8_t* inBlock = nullptr; -+ -+ // For each block, -+ for (int ii = 0; ii < OriginalCount; ++ii) -+ { -+ const uint8_t* inBlock2 = static_cast(Original[ii]->Block); -+ -+ if (!inBlock) -+ { -+ inBlock = inBlock2; -+ } -+ else -+ { -+ // outBlock ^= inBlock ^ inBlock2 -+ gf256_add2_mem(outBlock, inBlock, inBlock2, Params.BlockBytes); -+ inBlock = nullptr; -+ } -+ } -+ -+ // Complete XORs -+ if (inBlock) -+ { -+ gf256_add_mem(outBlock, inBlock, Params.BlockBytes); -+ } -+ -+ // Recover the index it corresponds to -+ Recovery[0]->Index = ErasuresIndices[0]; -+} -+ -+// Generate the LU decomposition of the matrix -+void CM256Decoder::GenerateLDUDecomposition(uint8_t* matrix_L, uint8_t* diag_D, uint8_t* matrix_U) -+{ -+ // Schur-type-direct-Cauchy algorithm 2.5 from -+ // "Pivoting and Backward Stability of Fast Algorithms for Solving Cauchy Linear Equations" -+ // T. Boros, T. Kailath, V. Olshevsky -+ // Modified for practical use. I folded the diagonal parts of U/L matrices into the -+ // diagonal one to reduce the number of multiplications to perform against the input data, -+ // and organized the triangle matrices in memory to allow for faster SSE3 GF multiplications. -+ -+ // Matrix size NxN -+ const int N = RecoveryCount; -+ -+ // Generators -+ uint8_t g[256], b[256]; -+ for (int i = 0; i < N; ++i) -+ { -+ g[i] = 1; -+ b[i] = 1; -+ } -+ -+ // Temporary buffer for rotated row of U matrix -+ // This allows for faster GF bulk multiplication -+ uint8_t rotated_row_U[256]; -+ uint8_t* last_U = matrix_U + ((N - 1) * N) / 2 - 1; -+ int firstOffset_U = 0; -+ -+ // Start the x_0 values arbitrarily from the original count. -+ const uint8_t x_0 = static_cast(Params.OriginalCount); -+ -+ // Unrolling k = 0 just makes it slower for some reason. -+ for (int k = 0; k < N - 1; ++k) -+ { -+ const uint8_t x_k = Recovery[k]->Index; -+ const uint8_t y_k = ErasuresIndices[k]; -+ -+ // D_kk = (x_k + y_k) -+ // L_kk = g[k] / (x_k + y_k) -+ // U_kk = b[k] * (x_0 + y_k) / (x_k + y_k) -+ const uint8_t D_kk = gf256_add(x_k, y_k); -+ const uint8_t L_kk = gf256_div(g[k], D_kk); -+ const uint8_t U_kk = gf256_mul(gf256_div(b[k], D_kk), gf256_add(x_0, y_k)); -+ -+ // diag_D[k] = D_kk * L_kk * U_kk -+ diag_D[k] = gf256_mul(D_kk, gf256_mul(L_kk, U_kk)); -+ -+ // Computing the k-th row of L and U -+ uint8_t* row_L = matrix_L; -+ uint8_t* row_U = rotated_row_U; -+ for (int j = k + 1; j < N; ++j) -+ { -+ const uint8_t x_j = Recovery[j]->Index; -+ const uint8_t y_j = ErasuresIndices[j]; -+ -+ // L_jk = g[j] / (x_j + y_k) -+ // U_kj = b[j] / (x_k + y_j) -+ const uint8_t L_jk = gf256_div(g[j], gf256_add(x_j, y_k)); -+ const uint8_t U_kj = gf256_div(b[j], gf256_add(x_k, y_j)); -+ -+ *matrix_L++ = L_jk; -+ *row_U++ = U_kj; -+ -+ // g[j] = g[j] * (x_j + x_k) / (x_j + y_k) -+ // b[j] = b[j] * (y_j + y_k) / (y_j + x_k) -+ g[j] = gf256_mul(g[j], gf256_div(gf256_add(x_j, x_k), gf256_add(x_j, y_k))); -+ b[j] = gf256_mul(b[j], gf256_div(gf256_add(y_j, y_k), gf256_add(y_j, x_k))); -+ } -+ -+ // Do these row/column divisions in bulk for speed. -+ // L_jk /= L_kk -+ // U_kj /= U_kk -+ const int count = N - (k + 1); -+ gf256_div_mem(row_L, row_L, L_kk, count); -+ gf256_div_mem(rotated_row_U, rotated_row_U, U_kk, count); -+ -+ // Copy U matrix row into place in memory. -+ uint8_t* output_U = last_U + firstOffset_U; -+ row_U = rotated_row_U; -+ for (int j = k + 1; j < N; ++j) -+ { -+ *output_U = *row_U++; -+ output_U -= j; -+ } -+ firstOffset_U -= k + 2; -+ } -+ -+ // Multiply diagonal matrix into U -+ uint8_t* row_U = matrix_U; -+ for (int j = N - 1; j > 0; --j) -+ { -+ const uint8_t y_j = ErasuresIndices[j]; -+ const int count = j; -+ -+ gf256_mul_mem(row_U, row_U, gf256_add(x_0, y_j), count); -+ row_U += count; -+ } -+ -+ const uint8_t x_n = Recovery[N - 1]->Index; -+ const uint8_t y_n = ErasuresIndices[N - 1]; -+ -+ // D_nn = 1 / (x_n + y_n) -+ // L_nn = g[N-1] -+ // U_nn = b[N-1] * (x_0 + y_n) -+ const uint8_t L_nn = g[N - 1]; -+ const uint8_t U_nn = gf256_mul(b[N - 1], gf256_add(x_0, y_n)); -+ -+ // diag_D[N-1] = L_nn * D_nn * U_nn -+ diag_D[N - 1] = gf256_div(gf256_mul(L_nn, U_nn), gf256_add(x_n, y_n)); -+} -+ -+void CM256Decoder::Decode() -+{ -+ // Matrix size is NxN, where N is the number of recovery blocks used. -+ const int N = RecoveryCount; -+ -+ // Start the x_0 values arbitrarily from the original count. -+ const uint8_t x_0 = static_cast(Params.OriginalCount); -+ -+ // Eliminate original data from the the recovery rows -+ for (int originalIndex = 0; originalIndex < OriginalCount; ++originalIndex) -+ { -+ const uint8_t* inBlock = static_cast(Original[originalIndex]->Block); -+ const uint8_t inRow = Original[originalIndex]->Index; -+ -+ for (int recoveryIndex = 0; recoveryIndex < N; ++recoveryIndex) -+ { -+ uint8_t* outBlock = static_cast(Recovery[recoveryIndex]->Block); -+ const uint8_t x_i = Recovery[recoveryIndex]->Index; -+ const uint8_t y_j = inRow; -+ const uint8_t matrixElement = GetMatrixElement(x_i, x_0, y_j); -+ -+ gf256_muladd_mem(outBlock, matrixElement, inBlock, Params.BlockBytes); -+ } -+ } -+ -+ // Allocate matrix -+ static const int StackAllocSize = 2048; -+ uint8_t stackMatrix[StackAllocSize]; -+ uint8_t* dynamicMatrix = nullptr; -+ uint8_t* matrix = stackMatrix; -+ const int requiredSpace = N * N; -+ if (requiredSpace > StackAllocSize) -+ { -+ dynamicMatrix = new uint8_t[requiredSpace]; -+ matrix = dynamicMatrix; -+ } -+ -+ /* -+ Compute matrix decomposition: -+ -+ G = L * D * U -+ -+ L is lower-triangular, diagonal is all ones. -+ D is a diagonal matrix. -+ U is upper-triangular, diagonal is all ones. -+ */ -+ uint8_t* matrix_U = matrix; -+ uint8_t* diag_D = matrix_U + (N - 1) * N / 2; -+ uint8_t* matrix_L = diag_D + N; -+ GenerateLDUDecomposition(matrix_L, diag_D, matrix_U); -+ -+ /* -+ Eliminate lower left triangle. -+ */ -+ // For each column, -+ for (int j = 0; j < N - 1; ++j) -+ { -+ const void* block_j = Recovery[j]->Block; -+ -+ // For each row, -+ for (int i = j + 1; i < N; ++i) -+ { -+ void* block_i = Recovery[i]->Block; -+ const uint8_t c_ij = *matrix_L++; // Matrix elements are stored column-first, top-down. -+ -+ gf256_muladd_mem(block_i, c_ij, block_j, Params.BlockBytes); -+ } -+ } -+ -+ /* -+ Eliminate diagonal. -+ */ -+ for (int i = 0; i < N; ++i) -+ { -+ void* block = Recovery[i]->Block; -+ -+ Recovery[i]->Index = ErasuresIndices[i]; -+ -+ gf256_div_mem(block, block, diag_D[i], Params.BlockBytes); -+ } -+ -+ /* -+ Eliminate upper right triangle. -+ */ -+ for (int j = N - 1; j >= 1; --j) -+ { -+ const void* block_j = Recovery[j]->Block; -+ -+ for (int i = j - 1; i >= 0; --i) -+ { -+ void* block_i = Recovery[i]->Block; -+ const uint8_t c_ij = *matrix_U++; // Matrix elements are stored column-first, bottom-up. -+ -+ gf256_muladd_mem(block_i, c_ij, block_j, Params.BlockBytes); -+ } -+ } -+ -+ delete[] dynamicMatrix; -+} -+ -+extern "C" int cm256_decode( -+ cm256_encoder_params params, // Encoder params -+ cm256_block* blocks) // Array of 'originalCount' blocks as described above -+{ -+ if (params.OriginalCount <= 0 || -+ params.RecoveryCount <= 0 || -+ params.BlockBytes <= 0) -+ { -+ return -1; -+ } -+ if (params.OriginalCount + params.RecoveryCount > 256) -+ { -+ return -2; -+ } -+ if (!blocks) -+ { -+ return -3; -+ } -+ -+ // If there is only one block, -+ if (params.OriginalCount == 1) -+ { -+ // It is the same block repeated -+ blocks[0].Index = 0; -+ return 0; -+ } -+ -+ CM256Decoder state; -+ if (!state.Initialize(params, blocks)) -+ { -+ return -5; -+ } -+ -+ // If nothing is erased, -+ if (state.RecoveryCount <= 0) -+ { -+ return 0; -+ } -+ -+ // If m=1, -+ if (params.RecoveryCount == 1) -+ { -+ state.DecodeM1(); -+ return 0; -+ } -+ -+ // Decode for m>1 -+ state.Decode(); -+ return 0; -+} -diff --git a/gf256.cpp b/gf256.cpp -index 66aa9f0..5c31e1d 100644 ---- a/gf256.cpp -+++ b/gf256.cpp -@@ -27,7 +27,7 @@ - POSSIBILITY OF SUCH DAMAGE. - */ - --#include "gf256.h" -+#include - - #ifdef LINUX_ARM - #include -diff --git a/include/wirehair/cm256.h b/include/wirehair/cm256.h -new file mode 100644 -index 0000000..72a8415 ---- /dev/null -+++ b/include/wirehair/cm256.h -@@ -0,0 +1,170 @@ -+/* -+ Copyright (c) 2015 Christopher A. Taylor. All rights reserved. -+ -+ Redistribution and use in source and binary forms, with or without -+ modification, are permitted provided that the following conditions are met: -+ -+ * Redistributions of source code must retain the above copyright notice, -+ this list of conditions and the following disclaimer. -+ * Redistributions in binary form must reproduce the above copyright notice, -+ this list of conditions and the following disclaimer in the documentation -+ and/or other materials provided with the distribution. -+ * Neither the name of CM256 nor the names of its contributors may be -+ used to endorse or promote products derived from this software without -+ specific prior written permission. -+ -+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE -+ LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -+ POSSIBILITY OF SUCH DAMAGE. -+*/ -+ -+#ifndef CM256_H -+#define CM256_H -+ -+#include "gf256.h" -+ -+#include -+ -+// Library version -+#define CM256_VERSION 2 -+ -+ -+#ifdef __cplusplus -+extern "C" { -+#endif -+ -+/* -+ * Verify binary compatibility with the API on startup. -+ * -+ * Example: -+ * if (cm256_init()) exit(1); -+ * -+ * Returns 0 on success, and any other code indicates failure. -+ */ -+extern int cm256_init_(int version); -+#define cm256_init() cm256_init_(CM256_VERSION) -+ -+ -+// Encoder parameters -+typedef struct cm256_encoder_params_t { -+ // Original block count < 256 -+ int OriginalCount; -+ -+ // Recovery block count < 256 -+ int RecoveryCount; -+ -+ // Number of bytes per block (all blocks are the same size in bytes) -+ int BlockBytes; -+} cm256_encoder_params; -+ -+// Descriptor for data block -+typedef struct cm256_block_t { -+ // Pointer to data received. -+ void* Block; -+ -+ // Block index. -+ // For original data, it will be in the range -+ // [0..(originalCount-1)] inclusive. -+ // For recovery data, the first one's Index must be originalCount, -+ // and it will be in the range -+ // [originalCount..(originalCount+recoveryCount-1)] inclusive. -+ unsigned char Index; -+ // Ignored during encoding, required during decoding. -+} cm256_block; -+ -+ -+// Compute the value to put in the Index member of cm256_block -+static inline unsigned char cm256_get_recovery_block_index(cm256_encoder_params params, int recoveryBlockIndex) -+{ -+ assert(recoveryBlockIndex >= 0 && recoveryBlockIndex < params.RecoveryCount); -+ return (unsigned char)(params.OriginalCount + recoveryBlockIndex); -+} -+static inline unsigned char cm256_get_original_block_index(cm256_encoder_params params, int originalBlockIndex) -+{ -+ assert(originalBlockIndex >= 0 && originalBlockIndex < params.OriginalCount); -+ return (unsigned char)(originalBlockIndex); -+} -+ -+ -+/* -+ * Cauchy MDS GF(256) encode -+ * -+ * This produces a set of recovery blocks that should be transmitted after the -+ * original data blocks. -+ * -+ * It takes in 'originalCount' equal-sized blocks and produces 'recoveryCount' -+ * equally-sized recovery blocks. -+ * -+ * The input 'originals' array allows more natural usage of the library. -+ * The output recovery blocks are stored end-to-end in 'recoveryBlocks'. -+ * 'recoveryBlocks' should have recoveryCount * blockBytes bytes available. -+ * -+ * Precondition: originalCount + recoveryCount <= 256 -+ * -+ * When transmitting the data, the block index of the data should be sent, -+ * and the recovery block index is also needed. The decoder should also -+ * be provided with the values of originalCount, recoveryCount and blockBytes. -+ * -+ * Example wire format: -+ * [originalCount(1 byte)] [recoveryCount(1 byte)] -+ * [blockIndex(1 byte)] [blockData(blockBytes bytes)] -+ * -+ * Be careful not to mix blocks from different encoders. -+ * -+ * It is possible to support variable-length data by including the original -+ * data length at the front of each message in 2 bytes, such that when it is -+ * recovered after a loss the data length is available in the block data and -+ * the remaining bytes of padding can be neglected. -+ * -+ * Returns 0 on success, and any other code indicates failure. -+ */ -+extern int cm256_encode( -+ cm256_encoder_params params, // Encoder parameters -+ cm256_block* originals, // Array of pointers to original blocks -+ void* recoveryBlocks); // Output recovery blocks end-to-end -+ -+// Encode one block. -+// Note: This function does not validate input, use with care. -+extern void cm256_encode_block( -+ cm256_encoder_params params, // Encoder parameters -+ cm256_block* originals, // Array of pointers to original blocks -+ int recoveryBlockIndex, // Return value from cm256_get_recovery_block_index() -+ void* recoveryBlock); // Output recovery block -+ -+/* -+ * Cauchy MDS GF(256) decode -+ * -+ * This recovers the original data from the recovery data in the provided -+ * blocks. There should be 'originalCount' blocks in the provided array. -+ * Recovery will always be possible if that many blocks are received. -+ * -+ * Provide the same values for 'originalCount', 'recoveryCount', and -+ * 'blockBytes' used by the encoder. -+ * -+ * The block Index should be set to the block index of the original data, -+ * as described in the cm256_block struct comments above. -+ * -+ * Recovery blocks will be replaced with original data and the Index -+ * will be updated to indicate the original block that was recovered. -+ * -+ * Returns 0 on success, and any other code indicates failure. -+ */ -+extern int cm256_decode( -+ cm256_encoder_params params, // Encoder parameters -+ cm256_block* blocks); // Array of 'originalCount' blocks as described above -+ -+ -+#ifdef __cplusplus -+} -+#endif -+ -+ -+#endif // CM256_H -diff --git a/gf256.h b/include/wirehair/gf256.h -similarity index 100% -rename from gf256.h -rename to include/wirehair/gf256.h -diff --git a/tables/HeavyRowGenerator.cpp b/tables/HeavyRowGenerator.cpp -index c8ec0c8..c3050a6 100644 ---- a/tables/HeavyRowGenerator.cpp -+++ b/tables/HeavyRowGenerator.cpp -@@ -36,7 +36,7 @@ using namespace std; - static const unsigned kRows = 6; - static const unsigned kColumns = 18; - --#include "../gf256.h" -+#include - #include "../test/SiameseTools.h" - using namespace siamese; - diff --git a/patches/wx.patch b/patches/wx.patch deleted file mode 100644 index 0c524d1..0000000 --- a/patches/wx.patch +++ /dev/null @@ -1,986 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -new file mode 100644 -index 0000000000..ded0061f76 ---- /dev/null -+++ b/CMakeLists.txt -@@ -0,0 +1,3 @@ -+cmake_minimum_required(VERSION 3.31) -+project(wxwidgets) -+include(build/cmake/wx.cmake) -diff --git a/Makefile.in b/Makefile.in -index 57f68c1d66..c7dffa7ee6 100644 ---- a/Makefile.in -+++ b/Makefile.in -@@ -107,6 +107,8 @@ WXZLIB_OBJECTS = \ - WXPNG_CFLAGS = -DNDEBUG $(__INC_ZLIB_p) $(____SHARED) $(CPPFLAGS) $(CFLAGS) - WXPNG_OBJECTS = \ - wxpng_png.o \ -+ wxpng_arm_init.o \ -+ wxpng_filter_neon_intrinsics.o \ - wxpng_pngerror.o \ - wxpng_pngget.o \ - wxpng_pngmem.o \ -@@ -14817,6 +14819,12 @@ wxzlib_zutil.o: $(srcdir)/src/zlib/zutil.c - wxpng_png.o: $(srcdir)/src/png/png.c - $(CCC) -c -o $@ $(WXPNG_CFLAGS) $(srcdir)/src/png/png.c - -+wxpng_arm_init.o: $(srcdir)/src/png/png.c -+ $(CCC) -c -o $@ $(WXPNG_CFLAGS) $(srcdir)/src/png/arm/arm_init.c -+ -+wxpng_filter_neon_intrinsics.o: $(srcdir)/src/png/arm/filter_neon_intrinsics.c -+ $(CCC) -c -o $@ $(WXPNG_CFLAGS) $(srcdir)/src/png/arm/filter_neon_intrinsics.c -+ - wxpng_pngerror.o: $(srcdir)/src/png/pngerror.c - $(CCC) -c -o $@ $(WXPNG_CFLAGS) $(srcdir)/src/png/pngerror.c - -diff --git a/include/wx/msw/setup.h b/include/wx/msw/setup.h -index d005bc3580..9913fdf078 100644 ---- a/include/wx/msw/setup.h -+++ b/include/wx/msw/setup.h -@@ -328,7 +328,7 @@ - // - // Recommended setting: 1 unless compatibility with the official wxWidgets - // build and/or the existing code is a concern. --#define wxUSE_STD_CONTAINERS 0 -+#define wxUSE_STD_CONTAINERS 1 - - // Use standard C++ streams if 1 instead of wx streams in some places. If - // disabled, wx streams are used everywhere and wxWidgets doesn't depend on the -diff --git a/src/generic/statbmpg.cpp b/src/generic/statbmpg.cpp -index 285c86d798..cdb3ba1641 100644 ---- a/src/generic/statbmpg.cpp -+++ b/src/generic/statbmpg.cpp -@@ -15,6 +15,7 @@ - #include "wx/dcclient.h" - #endif - -+#include "wx/dcbuffer.h" - #include "wx/generic/statbmpg.h" - - #if wxUSE_GRAPHICS_CONTEXT -@@ -34,8 +35,11 @@ bool wxGenericStaticBitmap::Create(wxWindow *parent, wxWindowID id, - wxDefaultValidator, name)) - return false; - m_scaleMode = Scale_None; -+ SetBackgroundStyle(wxBG_STYLE_PAINT); - SetBitmap(bitmap); - Connect(wxEVT_PAINT, wxPaintEventHandler(wxGenericStaticBitmap::OnPaint)); -+ // reduce flickering -+ Bind(wxEVT_ERASE_BACKGROUND, [](wxEraseEvent&){}); - return true; - } - -@@ -44,7 +48,12 @@ void wxGenericStaticBitmap::OnPaint(wxPaintEvent& WXUNUSED(event)) - if ( !m_bitmap.IsOk() ) - return; - -- wxPaintDC dc(this); -+ wxAutoBufferedPaintDC dc(this); -+ auto bgClr = GetParent()->GetBackgroundColour(); -+ if ( UseBgCol() ) -+ bgClr = GetBackgroundColour(); -+ dc.SetBackground(wxBrush(bgClr)); -+ dc.Clear(); - const wxSize drawSize = GetClientSize(); - const wxSize bmpSize = m_bitmap.GetSize(); - wxDouble w = 0; -diff --git a/src/generic/stattextg.cpp b/src/generic/stattextg.cpp -index a8b4b5c150..e46ad1948b 100644 ---- a/src/generic/stattextg.cpp -+++ b/src/generic/stattextg.cpp -@@ -21,6 +21,7 @@ - #include "wx/validate.h" - #endif - -+#include "wx/dcbuffer.h" - #include "wx/generic/stattextg.h" - - #if wxUSE_MARKUP -@@ -42,9 +43,12 @@ bool wxGenericStaticText::Create(wxWindow *parent, - wxDefaultValidator, name) ) - return false; - -+ SetBackgroundStyle(wxBG_STYLE_PAINT); - SetLabel(label); - SetInitialSize(size); - Connect(wxEVT_PAINT, wxPaintEventHandler(wxGenericStaticText::OnPaint)); -+ // reduce flickering -+ Bind(wxEVT_ERASE_BACKGROUND, [](wxEraseEvent&){}); - return true; - } - -@@ -67,7 +71,13 @@ void wxGenericStaticText::DoDrawLabel(wxDC& dc, const wxRect& rect) - - void wxGenericStaticText::OnPaint(wxPaintEvent& WXUNUSED(event)) - { -- wxPaintDC dc(this); -+ wxAutoBufferedPaintDC dc(this); -+ -+ auto bgClr = GetParent()->GetBackgroundColour(); -+ if ( UseBgCol() ) -+ bgClr = GetBackgroundColour(); -+ dc.SetBackground(wxBrush(bgClr)); -+ dc.Clear(); - - wxRect rect = GetClientRect(); - if ( !IsEnabled() ) -diff --git a/src/gtk/dataview.cpp b/src/gtk/dataview.cpp -index 7b73d1a9ba..2e11194bc2 100644 ---- a/src/gtk/dataview.cpp -+++ b/src/gtk/dataview.cpp -@@ -1471,7 +1471,11 @@ static GtkCellEditable *gtk_wx_cell_renderer_start_editing( - if (!cell->StartEditing(item, renderrect)) - return NULL; - -+#ifdef __WXGTK3__ - wxrenderer->editor_bin = gtk_wx_cell_editor_bin_new(cell->GetEditorCtrl()); -+#else -+ wxrenderer->editor_bin = cell->GetEditorCtrl()->m_widget; -+#endif - gtk_widget_show(wxrenderer->editor_bin); - - return GTK_CELL_EDITABLE(wxrenderer->editor_bin); -diff --git a/src/gtk/window.cpp b/src/gtk/window.cpp -index f86dbe21d3..aa6935cd27 100644 ---- a/src/gtk/window.cpp -+++ b/src/gtk/window.cpp -@@ -3397,6 +3397,18 @@ void wxWindowGTK::DoEnable( bool enable ) - gtk_widget_set_sensitive( m_widget, enable ); - if (m_wxwindow && (m_wxwindow != m_widget)) - gtk_widget_set_sensitive( m_wxwindow, enable ); -+ -+ if (enable && AcceptsFocusFromKeyboard()) -+ { -+ wxWindowGTK* parent = this; -+ while ((parent = parent->GetParent())) -+ { -+ parent->m_dirtyTabOrder = true; -+ if (parent->IsTopLevel()) -+ break; -+ } -+ wxTheApp->WakeUpIdle(); -+ } - } - - int wxWindowGTK::GetCharHeight() const -diff --git a/src/msw/statbmp.cpp b/src/msw/statbmp.cpp -index bea1ddd561..1ba0bb7793 100644 ---- a/src/msw/statbmp.cpp -+++ b/src/msw/statbmp.cpp -@@ -134,6 +134,9 @@ bool wxStaticBitmap::Create(wxWindow *parent, - Connect(wxEVT_PAINT, wxPaintEventHandler(wxStaticBitmap::DoPaintManually)); - } - -+ // reduce flickering -+ Bind(wxEVT_ERASE_BACKGROUND, [](wxEraseEvent&){}); -+ - return true; - } - -diff --git a/src/msw/stattext.cpp b/src/msw/stattext.cpp -index 1b532ce62a..a09193cf3e 100644 ---- a/src/msw/stattext.cpp -+++ b/src/msw/stattext.cpp -@@ -51,6 +51,9 @@ bool wxStaticText::Create(wxWindow *parent, - // the initial size correctly -- do it now - SetInitialSize(size); - -+ // reduce flickering -+ Bind(wxEVT_ERASE_BACKGROUND, [](wxEraseEvent&){}); -+ - // NOTE: if the label contains ampersand characters which are interpreted as - // accelerators, they will be rendered (at least on WinXP) only if the - // static text is placed inside a window class which correctly handles -diff --git a/src/png/arm/arm_init.c b/src/png/arm/arm_init.c -new file mode 100644 -index 0000000000..02df812e77 ---- /dev/null -+++ b/src/png/arm/arm_init.c -@@ -0,0 +1,135 @@ -+ -+/* arm_init.c - NEON optimised filter functions -+ * -+ * Copyright (c) 2014,2016 Glenn Randers-Pehrson -+ * Written by Mans Rullgard, 2011. -+ * Last changed in libpng 1.6.22 [May 26, 2016] -+ * -+ * This code is released under the libpng license. -+ * For conditions of distribution and use, see the disclaimer -+ * and license in png.h -+ */ -+/* Below, after checking __linux__, various non-C90 POSIX 1003.1 functions are -+ * called. -+ */ -+#define _POSIX_SOURCE 1 -+ -+#include "../pngpriv.h" -+ -+#ifdef PNG_READ_SUPPORTED -+ -+#if PNG_ARM_NEON_OPT > 0 -+#ifdef PNG_ARM_NEON_CHECK_SUPPORTED /* Do run-time checks */ -+/* WARNING: it is strongly recommended that you do not build libpng with -+ * run-time checks for CPU features if at all possible. In the case of the ARM -+ * NEON instructions there is no processor-specific way of detecting the -+ * presence of the required support, therefore run-time detection is extremely -+ * OS specific. -+ * -+ * You may set the macro PNG_ARM_NEON_FILE to the file name of file containing -+ * a fragment of C source code which defines the png_have_neon function. There -+ * are a number of implementations in contrib/arm-neon, but the only one that -+ * has partial support is contrib/arm-neon/linux.c - a generic Linux -+ * implementation which reads /proc/cpufino. -+ */ -+#ifndef PNG_ARM_NEON_FILE -+# ifdef __linux__ -+# define PNG_ARM_NEON_FILE "contrib/arm-neon/linux.c" -+# endif -+#endif -+ -+#ifdef PNG_ARM_NEON_FILE -+ -+#include /* for sig_atomic_t */ -+static int png_have_neon(png_structp png_ptr); -+#include PNG_ARM_NEON_FILE -+ -+#else /* PNG_ARM_NEON_FILE */ -+# error "PNG_ARM_NEON_FILE undefined: no support for run-time ARM NEON checks" -+#endif /* PNG_ARM_NEON_FILE */ -+#endif /* PNG_ARM_NEON_CHECK_SUPPORTED */ -+ -+#ifndef PNG_ALIGNED_MEMORY_SUPPORTED -+# error "ALIGNED_MEMORY is required; set: -DPNG_ALIGNED_MEMORY_SUPPORTED" -+#endif -+ -+void -+png_init_filter_functions_neon(png_structp pp, unsigned int bpp) -+{ -+ /* The switch statement is compiled in for ARM_NEON_API, the call to -+ * png_have_neon is compiled in for ARM_NEON_CHECK. If both are defined -+ * the check is only performed if the API has not set the NEON option on -+ * or off explicitly. In this case the check controls what happens. -+ * -+ * If the CHECK is not compiled in and the option is UNSET the behavior prior -+ * to 1.6.7 was to use the NEON code - this was a bug caused by having the -+ * wrong order of the 'ON' and 'default' cases. UNSET now defaults to OFF, -+ * as documented in png.h -+ */ -+ png_debug(1, "in png_init_filter_functions_neon"); -+#ifdef PNG_ARM_NEON_API_SUPPORTED -+ switch ((pp->options >> PNG_ARM_NEON) & 3) -+ { -+ case PNG_OPTION_UNSET: -+ /* Allow the run-time check to execute if it has been enabled - -+ * thus both API and CHECK can be turned on. If it isn't supported -+ * this case will fall through to the 'default' below, which just -+ * returns. -+ */ -+#endif /* PNG_ARM_NEON_API_SUPPORTED */ -+#ifdef PNG_ARM_NEON_CHECK_SUPPORTED -+ { -+ static volatile sig_atomic_t no_neon = -1; /* not checked */ -+ -+ if (no_neon < 0) -+ no_neon = !png_have_neon(pp); -+ -+ if (no_neon) -+ return; -+ } -+#ifdef PNG_ARM_NEON_API_SUPPORTED -+ break; -+#endif -+#endif /* PNG_ARM_NEON_CHECK_SUPPORTED */ -+ -+#ifdef PNG_ARM_NEON_API_SUPPORTED -+ default: /* OFF or INVALID */ -+ return; -+ -+ case PNG_OPTION_ON: -+ /* Option turned on */ -+ break; -+ } -+#endif -+ -+ /* IMPORTANT: any new external functions used here must be declared using -+ * PNG_INTERNAL_FUNCTION in ../pngpriv.h. This is required so that the -+ * 'prefix' option to configure works: -+ * -+ * ./configure --with-libpng-prefix=foobar_ -+ * -+ * Verify you have got this right by running the above command, doing a build -+ * and examining pngprefix.h; it must contain a #define for every external -+ * function you add. (Notice that this happens automatically for the -+ * initialization function.) -+ */ -+ pp->read_filter[PNG_FILTER_VALUE_UP-1] = png_read_filter_row_up_neon; -+ -+ if (bpp == 3) -+ { -+ pp->read_filter[PNG_FILTER_VALUE_SUB-1] = png_read_filter_row_sub3_neon; -+ pp->read_filter[PNG_FILTER_VALUE_AVG-1] = png_read_filter_row_avg3_neon; -+ pp->read_filter[PNG_FILTER_VALUE_PAETH-1] = -+ png_read_filter_row_paeth3_neon; -+ } -+ -+ else if (bpp == 4) -+ { -+ pp->read_filter[PNG_FILTER_VALUE_SUB-1] = png_read_filter_row_sub4_neon; -+ pp->read_filter[PNG_FILTER_VALUE_AVG-1] = png_read_filter_row_avg4_neon; -+ pp->read_filter[PNG_FILTER_VALUE_PAETH-1] = -+ png_read_filter_row_paeth4_neon; -+ } -+} -+#endif /* PNG_ARM_NEON_OPT > 0 */ -+#endif /* READ */ -diff --git a/src/png/arm/filter_neon.S b/src/png/arm/filter_neon.S -new file mode 100644 -index 0000000000..000764cd21 ---- /dev/null -+++ b/src/png/arm/filter_neon.S -@@ -0,0 +1,253 @@ -+ -+/* filter_neon.S - NEON optimised filter functions -+ * -+ * Copyright (c) 2014,2017 Glenn Randers-Pehrson -+ * Written by Mans Rullgard, 2011. -+ * Last changed in libpng 1.6.31 [July 27, 2017] -+ * -+ * This code is released under the libpng license. -+ * For conditions of distribution and use, see the disclaimer -+ * and license in png.h -+ */ -+ -+/* This is required to get the symbol renames, which are #defines, and the -+ * definitions (or not) of PNG_ARM_NEON_OPT and PNG_ARM_NEON_IMPLEMENTATION. -+ */ -+#define PNG_VERSION_INFO_ONLY -+#include "../pngpriv.h" -+ -+#if (defined(__linux__) || defined(__FreeBSD__)) && defined(__ELF__) -+.section .note.GNU-stack,"",%progbits /* mark stack as non-executable */ -+#endif -+ -+#ifdef PNG_READ_SUPPORTED -+ -+/* Assembler NEON support - only works for 32-bit ARM (i.e. it does not work for -+ * ARM64). The code in arm/filter_neon_intrinsics.c supports ARM64, however it -+ * only works if -mfpu=neon is specified on the GCC command line. See pngpriv.h -+ * for the logic which sets PNG_USE_ARM_NEON_ASM: -+ */ -+#if PNG_ARM_NEON_IMPLEMENTATION == 2 /* hand-coded assembler */ -+ -+#if PNG_ARM_NEON_OPT > 0 -+ -+#ifdef __ELF__ -+# define ELF -+#else -+# define ELF @ -+#endif -+ -+ .arch armv7-a -+ .fpu neon -+ -+.macro func name, export=0 -+ .macro endfunc -+ELF .size \name, . - \name -+ .endfunc -+ .purgem endfunc -+ .endm -+ .text -+ -+ /* Explicitly specifying alignment here because some versions of -+ * GAS don't align code correctly. This is harmless in correctly -+ * written versions of GAS. -+ */ -+ .align 2 -+ -+ .if \export -+ .global \name -+ .endif -+ELF .type \name, STT_FUNC -+ .func \name -+\name: -+.endm -+ -+func png_read_filter_row_sub4_neon, export=1 -+ ldr r3, [r0, #4] @ rowbytes -+ vmov.i8 d3, #0 -+1: -+ vld4.32 {d4[],d5[],d6[],d7[]}, [r1,:128] -+ vadd.u8 d0, d3, d4 -+ vadd.u8 d1, d0, d5 -+ vadd.u8 d2, d1, d6 -+ vadd.u8 d3, d2, d7 -+ vst4.32 {d0[0],d1[0],d2[0],d3[0]},[r1,:128]! -+ subs r3, r3, #16 -+ bgt 1b -+ -+ bx lr -+endfunc -+ -+func png_read_filter_row_sub3_neon, export=1 -+ ldr r3, [r0, #4] @ rowbytes -+ vmov.i8 d3, #0 -+ mov r0, r1 -+ mov r2, #3 -+ mov r12, #12 -+ vld1.8 {q11}, [r0], r12 -+1: -+ vext.8 d5, d22, d23, #3 -+ vadd.u8 d0, d3, d22 -+ vext.8 d6, d22, d23, #6 -+ vadd.u8 d1, d0, d5 -+ vext.8 d7, d23, d23, #1 -+ vld1.8 {q11}, [r0], r12 -+ vst1.32 {d0[0]}, [r1,:32], r2 -+ vadd.u8 d2, d1, d6 -+ vst1.32 {d1[0]}, [r1], r2 -+ vadd.u8 d3, d2, d7 -+ vst1.32 {d2[0]}, [r1], r2 -+ vst1.32 {d3[0]}, [r1], r2 -+ subs r3, r3, #12 -+ bgt 1b -+ -+ bx lr -+endfunc -+ -+func png_read_filter_row_up_neon, export=1 -+ ldr r3, [r0, #4] @ rowbytes -+1: -+ vld1.8 {q0}, [r1,:128] -+ vld1.8 {q1}, [r2,:128]! -+ vadd.u8 q0, q0, q1 -+ vst1.8 {q0}, [r1,:128]! -+ subs r3, r3, #16 -+ bgt 1b -+ -+ bx lr -+endfunc -+ -+func png_read_filter_row_avg4_neon, export=1 -+ ldr r12, [r0, #4] @ rowbytes -+ vmov.i8 d3, #0 -+1: -+ vld4.32 {d4[],d5[],d6[],d7[]}, [r1,:128] -+ vld4.32 {d16[],d17[],d18[],d19[]},[r2,:128]! -+ vhadd.u8 d0, d3, d16 -+ vadd.u8 d0, d0, d4 -+ vhadd.u8 d1, d0, d17 -+ vadd.u8 d1, d1, d5 -+ vhadd.u8 d2, d1, d18 -+ vadd.u8 d2, d2, d6 -+ vhadd.u8 d3, d2, d19 -+ vadd.u8 d3, d3, d7 -+ vst4.32 {d0[0],d1[0],d2[0],d3[0]},[r1,:128]! -+ subs r12, r12, #16 -+ bgt 1b -+ -+ bx lr -+endfunc -+ -+func png_read_filter_row_avg3_neon, export=1 -+ push {r4,lr} -+ ldr r12, [r0, #4] @ rowbytes -+ vmov.i8 d3, #0 -+ mov r0, r1 -+ mov r4, #3 -+ mov lr, #12 -+ vld1.8 {q11}, [r0], lr -+1: -+ vld1.8 {q10}, [r2], lr -+ vext.8 d5, d22, d23, #3 -+ vhadd.u8 d0, d3, d20 -+ vext.8 d17, d20, d21, #3 -+ vadd.u8 d0, d0, d22 -+ vext.8 d6, d22, d23, #6 -+ vhadd.u8 d1, d0, d17 -+ vext.8 d18, d20, d21, #6 -+ vadd.u8 d1, d1, d5 -+ vext.8 d7, d23, d23, #1 -+ vld1.8 {q11}, [r0], lr -+ vst1.32 {d0[0]}, [r1,:32], r4 -+ vhadd.u8 d2, d1, d18 -+ vst1.32 {d1[0]}, [r1], r4 -+ vext.8 d19, d21, d21, #1 -+ vadd.u8 d2, d2, d6 -+ vhadd.u8 d3, d2, d19 -+ vst1.32 {d2[0]}, [r1], r4 -+ vadd.u8 d3, d3, d7 -+ vst1.32 {d3[0]}, [r1], r4 -+ subs r12, r12, #12 -+ bgt 1b -+ -+ pop {r4,pc} -+endfunc -+ -+.macro paeth rx, ra, rb, rc -+ vaddl.u8 q12, \ra, \rb @ a + b -+ vaddl.u8 q15, \rc, \rc @ 2*c -+ vabdl.u8 q13, \rb, \rc @ pa -+ vabdl.u8 q14, \ra, \rc @ pb -+ vabd.u16 q15, q12, q15 @ pc -+ vcle.u16 q12, q13, q14 @ pa <= pb -+ vcle.u16 q13, q13, q15 @ pa <= pc -+ vcle.u16 q14, q14, q15 @ pb <= pc -+ vand q12, q12, q13 @ pa <= pb && pa <= pc -+ vmovn.u16 d28, q14 -+ vmovn.u16 \rx, q12 -+ vbsl d28, \rb, \rc -+ vbsl \rx, \ra, d28 -+.endm -+ -+func png_read_filter_row_paeth4_neon, export=1 -+ ldr r12, [r0, #4] @ rowbytes -+ vmov.i8 d3, #0 -+ vmov.i8 d20, #0 -+1: -+ vld4.32 {d4[],d5[],d6[],d7[]}, [r1,:128] -+ vld4.32 {d16[],d17[],d18[],d19[]},[r2,:128]! -+ paeth d0, d3, d16, d20 -+ vadd.u8 d0, d0, d4 -+ paeth d1, d0, d17, d16 -+ vadd.u8 d1, d1, d5 -+ paeth d2, d1, d18, d17 -+ vadd.u8 d2, d2, d6 -+ paeth d3, d2, d19, d18 -+ vmov d20, d19 -+ vadd.u8 d3, d3, d7 -+ vst4.32 {d0[0],d1[0],d2[0],d3[0]},[r1,:128]! -+ subs r12, r12, #16 -+ bgt 1b -+ -+ bx lr -+endfunc -+ -+func png_read_filter_row_paeth3_neon, export=1 -+ push {r4,lr} -+ ldr r12, [r0, #4] @ rowbytes -+ vmov.i8 d3, #0 -+ vmov.i8 d4, #0 -+ mov r0, r1 -+ mov r4, #3 -+ mov lr, #12 -+ vld1.8 {q11}, [r0], lr -+1: -+ vld1.8 {q10}, [r2], lr -+ paeth d0, d3, d20, d4 -+ vext.8 d5, d22, d23, #3 -+ vadd.u8 d0, d0, d22 -+ vext.8 d17, d20, d21, #3 -+ paeth d1, d0, d17, d20 -+ vst1.32 {d0[0]}, [r1,:32], r4 -+ vext.8 d6, d22, d23, #6 -+ vadd.u8 d1, d1, d5 -+ vext.8 d18, d20, d21, #6 -+ paeth d2, d1, d18, d17 -+ vext.8 d7, d23, d23, #1 -+ vld1.8 {q11}, [r0], lr -+ vst1.32 {d1[0]}, [r1], r4 -+ vadd.u8 d2, d2, d6 -+ vext.8 d19, d21, d21, #1 -+ paeth d3, d2, d19, d18 -+ vst1.32 {d2[0]}, [r1], r4 -+ vmov d4, d19 -+ vadd.u8 d3, d3, d7 -+ vst1.32 {d3[0]}, [r1], r4 -+ subs r12, r12, #12 -+ bgt 1b -+ -+ pop {r4,pc} -+endfunc -+#endif /* PNG_ARM_NEON_OPT > 0 */ -+#endif /* PNG_ARM_NEON_IMPLEMENTATION == 2 (assembler) */ -+#endif /* READ */ -diff --git a/src/png/arm/filter_neon_intrinsics.c b/src/png/arm/filter_neon_intrinsics.c -new file mode 100644 -index 0000000000..ea7e356bcc ---- /dev/null -+++ b/src/png/arm/filter_neon_intrinsics.c -@@ -0,0 +1,387 @@ -+ -+/* filter_neon_intrinsics.c - NEON optimised filter functions -+ * -+ * Copyright (c) 2014,2016 Glenn Randers-Pehrson -+ * Written by James Yu , October 2013. -+ * Based on filter_neon.S, written by Mans Rullgard, 2011. -+ * -+ * Last changed in libpng 1.6.22 [May 26, 2016] -+ * -+ * This code is released under the libpng license. -+ * For conditions of distribution and use, see the disclaimer -+ * and license in png.h -+ */ -+ -+#include "../pngpriv.h" -+ -+#ifdef PNG_READ_SUPPORTED -+ -+/* This code requires -mfpu=neon on the command line: */ -+#if PNG_ARM_NEON_IMPLEMENTATION == 1 /* intrinsics code from pngpriv.h */ -+ -+#include -+ -+/* libpng row pointers are not necessarily aligned to any particular boundary, -+ * however this code will only work with appropriate alignment. arm/arm_init.c -+ * checks for this (and will not compile unless it is done). This code uses -+ * variants of png_aligncast to avoid compiler warnings. -+ */ -+#define png_ptr(type,pointer) png_aligncast(type *,pointer) -+#define png_ptrc(type,pointer) png_aligncastconst(const type *,pointer) -+ -+/* The following relies on a variable 'temp_pointer' being declared with type -+ * 'type'. This is written this way just to hide the GCC strict aliasing -+ * warning; note that the code is safe because there never is an alias between -+ * the input and output pointers. -+ */ -+#define png_ldr(type,pointer)\ -+ (temp_pointer = png_ptr(type,pointer), *temp_pointer) -+ -+#if PNG_ARM_NEON_OPT > 0 -+ -+void -+png_read_filter_row_up_neon(png_row_infop row_info, png_bytep row, -+ png_const_bytep prev_row) -+{ -+ png_bytep rp = row; -+ png_bytep rp_stop = row + row_info->rowbytes; -+ png_const_bytep pp = prev_row; -+ -+ png_debug(1, "in png_read_filter_row_up_neon"); -+ -+ for (; rp < rp_stop; rp += 16, pp += 16) -+ { -+ uint8x16_t qrp, qpp; -+ -+ qrp = vld1q_u8(rp); -+ qpp = vld1q_u8(pp); -+ qrp = vaddq_u8(qrp, qpp); -+ vst1q_u8(rp, qrp); -+ } -+} -+ -+void -+png_read_filter_row_sub3_neon(png_row_infop row_info, png_bytep row, -+ png_const_bytep prev_row) -+{ -+ png_bytep rp = row; -+ png_bytep rp_stop = row + row_info->rowbytes; -+ -+ uint8x16_t vtmp = vld1q_u8(rp); -+ uint8x8x2_t *vrpt = png_ptr(uint8x8x2_t, &vtmp); -+ uint8x8x2_t vrp = *vrpt; -+ -+ uint8x8x4_t vdest; -+ vdest.val[3] = vdup_n_u8(0); -+ -+ png_debug(1, "in png_read_filter_row_sub3_neon"); -+ -+ for (; rp < rp_stop;) -+ { -+ uint8x8_t vtmp1, vtmp2; -+ uint32x2_t *temp_pointer; -+ -+ vtmp1 = vext_u8(vrp.val[0], vrp.val[1], 3); -+ vdest.val[0] = vadd_u8(vdest.val[3], vrp.val[0]); -+ vtmp2 = vext_u8(vrp.val[0], vrp.val[1], 6); -+ vdest.val[1] = vadd_u8(vdest.val[0], vtmp1); -+ -+ vtmp1 = vext_u8(vrp.val[1], vrp.val[1], 1); -+ vdest.val[2] = vadd_u8(vdest.val[1], vtmp2); -+ vdest.val[3] = vadd_u8(vdest.val[2], vtmp1); -+ -+ vtmp = vld1q_u8(rp + 12); -+ vrpt = png_ptr(uint8x8x2_t, &vtmp); -+ vrp = *vrpt; -+ -+ vst1_lane_u32(png_ptr(uint32_t,rp), png_ldr(uint32x2_t,&vdest.val[0]), 0); -+ rp += 3; -+ vst1_lane_u32(png_ptr(uint32_t,rp), png_ldr(uint32x2_t,&vdest.val[1]), 0); -+ rp += 3; -+ vst1_lane_u32(png_ptr(uint32_t,rp), png_ldr(uint32x2_t,&vdest.val[2]), 0); -+ rp += 3; -+ vst1_lane_u32(png_ptr(uint32_t,rp), png_ldr(uint32x2_t,&vdest.val[3]), 0); -+ rp += 3; -+ } -+ -+ PNG_UNUSED(prev_row) -+} -+ -+void -+png_read_filter_row_sub4_neon(png_row_infop row_info, png_bytep row, -+ png_const_bytep prev_row) -+{ -+ png_bytep rp = row; -+ png_bytep rp_stop = row + row_info->rowbytes; -+ -+ uint8x8x4_t vdest; -+ vdest.val[3] = vdup_n_u8(0); -+ -+ png_debug(1, "in png_read_filter_row_sub4_neon"); -+ -+ for (; rp < rp_stop; rp += 16) -+ { -+ uint32x2x4_t vtmp = vld4_u32(png_ptr(uint32_t,rp)); -+ uint8x8x4_t *vrpt = png_ptr(uint8x8x4_t,&vtmp); -+ uint8x8x4_t vrp = *vrpt; -+ uint32x2x4_t *temp_pointer; -+ -+ vdest.val[0] = vadd_u8(vdest.val[3], vrp.val[0]); -+ vdest.val[1] = vadd_u8(vdest.val[0], vrp.val[1]); -+ vdest.val[2] = vadd_u8(vdest.val[1], vrp.val[2]); -+ vdest.val[3] = vadd_u8(vdest.val[2], vrp.val[3]); -+ vst4_lane_u32(png_ptr(uint32_t,rp), png_ldr(uint32x2x4_t,&vdest), 0); -+ } -+ -+ PNG_UNUSED(prev_row) -+} -+ -+void -+png_read_filter_row_avg3_neon(png_row_infop row_info, png_bytep row, -+ png_const_bytep prev_row) -+{ -+ png_bytep rp = row; -+ png_const_bytep pp = prev_row; -+ png_bytep rp_stop = row + row_info->rowbytes; -+ -+ uint8x16_t vtmp; -+ uint8x8x2_t *vrpt; -+ uint8x8x2_t vrp; -+ uint8x8x4_t vdest; -+ vdest.val[3] = vdup_n_u8(0); -+ -+ vtmp = vld1q_u8(rp); -+ vrpt = png_ptr(uint8x8x2_t,&vtmp); -+ vrp = *vrpt; -+ -+ png_debug(1, "in png_read_filter_row_avg3_neon"); -+ -+ for (; rp < rp_stop; pp += 12) -+ { -+ uint8x8_t vtmp1, vtmp2, vtmp3; -+ -+ uint8x8x2_t *vppt; -+ uint8x8x2_t vpp; -+ -+ uint32x2_t *temp_pointer; -+ -+ vtmp = vld1q_u8(pp); -+ vppt = png_ptr(uint8x8x2_t,&vtmp); -+ vpp = *vppt; -+ -+ vtmp1 = vext_u8(vrp.val[0], vrp.val[1], 3); -+ vdest.val[0] = vhadd_u8(vdest.val[3], vpp.val[0]); -+ vdest.val[0] = vadd_u8(vdest.val[0], vrp.val[0]); -+ -+ vtmp2 = vext_u8(vpp.val[0], vpp.val[1], 3); -+ vtmp3 = vext_u8(vrp.val[0], vrp.val[1], 6); -+ vdest.val[1] = vhadd_u8(vdest.val[0], vtmp2); -+ vdest.val[1] = vadd_u8(vdest.val[1], vtmp1); -+ -+ vtmp2 = vext_u8(vpp.val[0], vpp.val[1], 6); -+ vtmp1 = vext_u8(vrp.val[1], vrp.val[1], 1); -+ -+ vtmp = vld1q_u8(rp + 12); -+ vrpt = png_ptr(uint8x8x2_t,&vtmp); -+ vrp = *vrpt; -+ -+ vdest.val[2] = vhadd_u8(vdest.val[1], vtmp2); -+ vdest.val[2] = vadd_u8(vdest.val[2], vtmp3); -+ -+ vtmp2 = vext_u8(vpp.val[1], vpp.val[1], 1); -+ -+ vdest.val[3] = vhadd_u8(vdest.val[2], vtmp2); -+ vdest.val[3] = vadd_u8(vdest.val[3], vtmp1); -+ -+ vst1_lane_u32(png_ptr(uint32_t,rp), png_ldr(uint32x2_t,&vdest.val[0]), 0); -+ rp += 3; -+ vst1_lane_u32(png_ptr(uint32_t,rp), png_ldr(uint32x2_t,&vdest.val[1]), 0); -+ rp += 3; -+ vst1_lane_u32(png_ptr(uint32_t,rp), png_ldr(uint32x2_t,&vdest.val[2]), 0); -+ rp += 3; -+ vst1_lane_u32(png_ptr(uint32_t,rp), png_ldr(uint32x2_t,&vdest.val[3]), 0); -+ rp += 3; -+ } -+} -+ -+void -+png_read_filter_row_avg4_neon(png_row_infop row_info, png_bytep row, -+ png_const_bytep prev_row) -+{ -+ png_bytep rp = row; -+ png_bytep rp_stop = row + row_info->rowbytes; -+ png_const_bytep pp = prev_row; -+ -+ uint8x8x4_t vdest; -+ vdest.val[3] = vdup_n_u8(0); -+ -+ png_debug(1, "in png_read_filter_row_avg4_neon"); -+ -+ for (; rp < rp_stop; rp += 16, pp += 16) -+ { -+ uint32x2x4_t vtmp; -+ uint8x8x4_t *vrpt, *vppt; -+ uint8x8x4_t vrp, vpp; -+ uint32x2x4_t *temp_pointer; -+ -+ vtmp = vld4_u32(png_ptr(uint32_t,rp)); -+ vrpt = png_ptr(uint8x8x4_t,&vtmp); -+ vrp = *vrpt; -+ vtmp = vld4_u32(png_ptrc(uint32_t,pp)); -+ vppt = png_ptr(uint8x8x4_t,&vtmp); -+ vpp = *vppt; -+ -+ vdest.val[0] = vhadd_u8(vdest.val[3], vpp.val[0]); -+ vdest.val[0] = vadd_u8(vdest.val[0], vrp.val[0]); -+ vdest.val[1] = vhadd_u8(vdest.val[0], vpp.val[1]); -+ vdest.val[1] = vadd_u8(vdest.val[1], vrp.val[1]); -+ vdest.val[2] = vhadd_u8(vdest.val[1], vpp.val[2]); -+ vdest.val[2] = vadd_u8(vdest.val[2], vrp.val[2]); -+ vdest.val[3] = vhadd_u8(vdest.val[2], vpp.val[3]); -+ vdest.val[3] = vadd_u8(vdest.val[3], vrp.val[3]); -+ -+ vst4_lane_u32(png_ptr(uint32_t,rp), png_ldr(uint32x2x4_t,&vdest), 0); -+ } -+} -+ -+static uint8x8_t -+paeth(uint8x8_t a, uint8x8_t b, uint8x8_t c) -+{ -+ uint8x8_t d, e; -+ uint16x8_t p1, pa, pb, pc; -+ -+ p1 = vaddl_u8(a, b); /* a + b */ -+ pc = vaddl_u8(c, c); /* c * 2 */ -+ pa = vabdl_u8(b, c); /* pa */ -+ pb = vabdl_u8(a, c); /* pb */ -+ pc = vabdq_u16(p1, pc); /* pc */ -+ -+ p1 = vcleq_u16(pa, pb); /* pa <= pb */ -+ pa = vcleq_u16(pa, pc); /* pa <= pc */ -+ pb = vcleq_u16(pb, pc); /* pb <= pc */ -+ -+ p1 = vandq_u16(p1, pa); /* pa <= pb && pa <= pc */ -+ -+ d = vmovn_u16(pb); -+ e = vmovn_u16(p1); -+ -+ d = vbsl_u8(d, b, c); -+ e = vbsl_u8(e, a, d); -+ -+ return e; -+} -+ -+void -+png_read_filter_row_paeth3_neon(png_row_infop row_info, png_bytep row, -+ png_const_bytep prev_row) -+{ -+ png_bytep rp = row; -+ png_const_bytep pp = prev_row; -+ png_bytep rp_stop = row + row_info->rowbytes; -+ -+ uint8x16_t vtmp; -+ uint8x8x2_t *vrpt; -+ uint8x8x2_t vrp; -+ uint8x8_t vlast = vdup_n_u8(0); -+ uint8x8x4_t vdest; -+ vdest.val[3] = vdup_n_u8(0); -+ -+ vtmp = vld1q_u8(rp); -+ vrpt = png_ptr(uint8x8x2_t,&vtmp); -+ vrp = *vrpt; -+ -+ png_debug(1, "in png_read_filter_row_paeth3_neon"); -+ -+ for (; rp < rp_stop; pp += 12) -+ { -+ uint8x8x2_t *vppt; -+ uint8x8x2_t vpp; -+ uint8x8_t vtmp1, vtmp2, vtmp3; -+ uint32x2_t *temp_pointer; -+ -+ vtmp = vld1q_u8(pp); -+ vppt = png_ptr(uint8x8x2_t,&vtmp); -+ vpp = *vppt; -+ -+ vdest.val[0] = paeth(vdest.val[3], vpp.val[0], vlast); -+ vdest.val[0] = vadd_u8(vdest.val[0], vrp.val[0]); -+ -+ vtmp1 = vext_u8(vrp.val[0], vrp.val[1], 3); -+ vtmp2 = vext_u8(vpp.val[0], vpp.val[1], 3); -+ vdest.val[1] = paeth(vdest.val[0], vtmp2, vpp.val[0]); -+ vdest.val[1] = vadd_u8(vdest.val[1], vtmp1); -+ -+ vtmp1 = vext_u8(vrp.val[0], vrp.val[1], 6); -+ vtmp3 = vext_u8(vpp.val[0], vpp.val[1], 6); -+ vdest.val[2] = paeth(vdest.val[1], vtmp3, vtmp2); -+ vdest.val[2] = vadd_u8(vdest.val[2], vtmp1); -+ -+ vtmp1 = vext_u8(vrp.val[1], vrp.val[1], 1); -+ vtmp2 = vext_u8(vpp.val[1], vpp.val[1], 1); -+ -+ vtmp = vld1q_u8(rp + 12); -+ vrpt = png_ptr(uint8x8x2_t,&vtmp); -+ vrp = *vrpt; -+ -+ vdest.val[3] = paeth(vdest.val[2], vtmp2, vtmp3); -+ vdest.val[3] = vadd_u8(vdest.val[3], vtmp1); -+ -+ vlast = vtmp2; -+ -+ vst1_lane_u32(png_ptr(uint32_t,rp), png_ldr(uint32x2_t,&vdest.val[0]), 0); -+ rp += 3; -+ vst1_lane_u32(png_ptr(uint32_t,rp), png_ldr(uint32x2_t,&vdest.val[1]), 0); -+ rp += 3; -+ vst1_lane_u32(png_ptr(uint32_t,rp), png_ldr(uint32x2_t,&vdest.val[2]), 0); -+ rp += 3; -+ vst1_lane_u32(png_ptr(uint32_t,rp), png_ldr(uint32x2_t,&vdest.val[3]), 0); -+ rp += 3; -+ } -+} -+ -+void -+png_read_filter_row_paeth4_neon(png_row_infop row_info, png_bytep row, -+ png_const_bytep prev_row) -+{ -+ png_bytep rp = row; -+ png_bytep rp_stop = row + row_info->rowbytes; -+ png_const_bytep pp = prev_row; -+ -+ uint8x8_t vlast = vdup_n_u8(0); -+ uint8x8x4_t vdest; -+ vdest.val[3] = vdup_n_u8(0); -+ -+ png_debug(1, "in png_read_filter_row_paeth4_neon"); -+ -+ for (; rp < rp_stop; rp += 16, pp += 16) -+ { -+ uint32x2x4_t vtmp; -+ uint8x8x4_t *vrpt, *vppt; -+ uint8x8x4_t vrp, vpp; -+ uint32x2x4_t *temp_pointer; -+ -+ vtmp = vld4_u32(png_ptr(uint32_t,rp)); -+ vrpt = png_ptr(uint8x8x4_t,&vtmp); -+ vrp = *vrpt; -+ vtmp = vld4_u32(png_ptrc(uint32_t,pp)); -+ vppt = png_ptr(uint8x8x4_t,&vtmp); -+ vpp = *vppt; -+ -+ vdest.val[0] = paeth(vdest.val[3], vpp.val[0], vlast); -+ vdest.val[0] = vadd_u8(vdest.val[0], vrp.val[0]); -+ vdest.val[1] = paeth(vdest.val[0], vpp.val[1], vpp.val[0]); -+ vdest.val[1] = vadd_u8(vdest.val[1], vrp.val[1]); -+ vdest.val[2] = paeth(vdest.val[1], vpp.val[2], vpp.val[1]); -+ vdest.val[2] = vadd_u8(vdest.val[2], vrp.val[2]); -+ vdest.val[3] = paeth(vdest.val[2], vpp.val[3], vpp.val[2]); -+ vdest.val[3] = vadd_u8(vdest.val[3], vrp.val[3]); -+ -+ vlast = vpp.val[3]; -+ -+ vst4_lane_u32(png_ptr(uint32_t,rp), png_ldr(uint32x2x4_t,&vdest), 0); -+ } -+} -+ -+#endif /* PNG_ARM_NEON_OPT > 0 */ -+#endif /* PNG_ARM_NEON_IMPLEMENTATION == 1 (intrinsics) */ -+#endif /* READ */ diff --git a/patches/wxInclude.patch b/patches/wxInclude.patch deleted file mode 100644 index 5650809..0000000 --- a/patches/wxInclude.patch +++ /dev/null @@ -1,308 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -new file mode 100644 -index 0000000..720f399 ---- /dev/null -+++ b/CMakeLists.txt -@@ -0,0 +1,22 @@ -+cmake_minimum_required(VERSION 3.31) -+project(wxInclude) -+include(GNUInstallDirs) -+include(xpflags) -+xpFindPkg(PKGS boost) -+add_executable(${CMAKE_PROJECT_NAME} wxInclude.cpp) -+target_link_libraries(${CMAKE_PROJECT_NAME} PRIVATE Boost::filesystem Boost::program_options Boost::timer) -+string(TOLOWER ${PROJECT_NAME} prj) -+install(TARGETS ${CMAKE_PROJECT_NAME} EXPORT ${prj}-targets -+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} -+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} -+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} -+ ) -+if(DEFINED XP_NAMESPACE) -+ set(nameSpace NAMESPACE ${XP_NAMESPACE}::) -+endif() -+if(NOT DEFINED XP_INSTALL_CMAKEDIR) -+ set(XP_INSTALL_CMAKEDIR ${CMAKE_INSTALL_DATADIR}/cmake) -+endif() -+install(EXPORT ${prj}-targets DESTINATION ${XP_INSTALL_CMAKEDIR} ${nameSpace}) -+add_executable(decompressor decompress.cpp) -+target_link_libraries(decompressor PRIVATE Boost::filesystem Boost::iostreams) -diff --git a/decompress.cpp b/decompress.cpp -new file mode 100644 -index 0000000..d3aeb53 ---- /dev/null -+++ b/decompress.cpp -@@ -0,0 +1,73 @@ -+#include -+#include -+#include -+#include -+#pragma warning(push) -+// conversion from std::streamsize to int, possible loss of data -+#pragma warning(disable : 4244) -+#include -+#pragma warning(pop) -+#include -+#include -+#include -+ -+int main(int argc, char** argv) -+{ -+ namespace bfs = boost::filesystem; -+ namespace bio = boost::iostreams; -+ bfs::path exepath = bfs::path(std::string(argv[0])); -+ if (argc != 2) -+ { -+ std::cerr << "usage: " << exepath.filename().string() << " file.[bz2|gz|Z]" << std::endl; -+ return 1; -+ } -+ try -+ { -+ bfs::path filepath = bfs::path(std::string(argv[1])); -+ if (!bfs::exists(filepath)) -+ { -+ std::cerr << filepath.string() << ": doesn't exist" << std::endl; -+ return 1; -+ } -+ bio::filtering_streambuf in; -+ std::string ext = filepath.extension().string(); -+ if (ext.compare(".bz2") == 0) -+ in.push(bio::bzip2_decompressor()); -+ else if (ext.compare(".gz") == 0) -+ in.push(bio::gzip_decompressor()); -+ else if (ext.compare(".Z") == 0) -+ in.push(bio::zlib_decompressor()); -+ else -+ { -+ std::cerr << filepath.filename().string() << ": unsupported extension (must be .[bz2|gz|Z])" << std::endl; -+ return 1; -+ } -+ std::ifstream file(argv[1], std::ios_base::in | std::ios_base::binary); -+ in.push(file); -+ bio::copy(in, std::cout); -+ } -+ //catch (const bio::bzip2_error& e) -+ catch (const bio::zlib_error& e) -+ { -+ int err = e.error(); -+ if (err == bio::zlib::buf_error) -+ std::cerr << "zlib buffer error" << std::endl; -+ else if (err == bio::zlib::data_error) -+ std::cerr << "zlib data error" << std::endl; -+ else if (err == bio::zlib::mem_error) -+ std::cerr << "zlib memory error" << std::endl; -+ else if (err == bio::zlib::stream_error) -+ std::cerr << "zlib stream error" << std::endl; -+ else if (err == bio::zlib::version_error) -+ std::cerr << "zlib version error" << std::endl; -+ else -+ std::cerr << "zlib unknown error" << std::endl; -+ return 1; -+ } -+ catch (const std::exception& e) -+ { -+ std::cerr << e.what() << std::endl; -+ return 1; -+ } -+ return 0; -+} -diff --git a/wxInclude.cpp b/wxInclude.cpp -index c2109e3..04b8d1b 100644 ---- a/wxInclude.cpp -+++ b/wxInclude.cpp -@@ -1,20 +1,25 @@ - /* -- wxInclude version 1.0 -+ wxInclude - Kim De Deyn - */ - - #include - #include -+#include - #include - #include - #include - #include - #include --#include -+#include - - namespace po = boost::program_options; - namespace fs = boost::filesystem; - -+#ifdef _MSC_VER -+#define snprintf _snprintf -+#endif -+ - #define WXINCLUDE_INFO "wxInclude by Kim De Deyn, use --help for more information.\n" - - #define WXINCLUDE_HELP "This tool can be used to convert binary files into a useful C/C++ header.\n" \ -@@ -25,9 +30,11 @@ namespace fs = boost::filesystem; - "Example of use:\n\n" \ - " wxInclude.exe --const --input-file=mydata1.bin\n" \ - " --input-type=.png --input-type=.bmp\n" \ -- " --output-file=myheader.h mydata2.bin myimage.png\n" -+ " --output-file=myheader.h mydata2.bin myimage.png\n\n" \ -+ "Recommended usage (at Space Dynamics Lab):\n" \ -+ " wxInclude --const --appendtype --wxnone --respectcase --output-file=foo.hrc foo.png\n" - --#define WXINCLUDE_VERSION "Version 1.0, compiled at " __DATE__ " " __TIME__ -+#define WXINCLUDE_VERSION "Version 1.2, compiled on " __DATE__ " at " __TIME__ - - #define BUFFER_SIZE 4096 - -@@ -106,7 +113,7 @@ void definefile( std::ostringstream& data, fs::ifstream& input, std::string& nam - /* Define array */ - data << "static" << ( useconst ? " const " : " " ) << "unsigned char " << name << "[] = {" << std::endl; - -- int size = input.tellg(); -+ int size = static_cast(input.tellg()); // conversion from std::streamoff to int, possible loss of data - input.seekg( 0, std::ios::beg ); - - int c = 0; -@@ -130,7 +137,7 @@ void definefile( std::ostringstream& data, fs::ifstream& input, std::string& nam - Still faster then the optimized boost::format use, but not that much! - */ - static char temp[5]; -- _snprintf( temp, 5, "0x%02X", c ); -+ snprintf( temp, 5, "0x%02X", c ); - data << temp; - - if ( i >= size ) -@@ -156,7 +163,7 @@ void definefile( std::ostringstream& data, fs::ifstream& input, std::string& nam - data << "};" << std::endl << std::endl; - } - --int _tmain(int argc, _TCHAR* argv[]) -+int main(int argc, char* argv[]) - { - try - { -@@ -164,9 +171,10 @@ int _tmain(int argc, _TCHAR* argv[]) - desc.add_options() - ( "help,h", "Show detailed help." ) - ( "options,p", "Show parameter information." ) -- ( "version,p", "Show version information." ) -- ( "input-file,i", po::value>(), "Define file(s) for the convertion input." ) -- ( "input-type,I", po::value>(), "Define file type(s) for automatic conversion of files in the working directory." ) -+ ( "version,v", "Show version information." ) -+ ( "quiet,q", "Quiet at runtime, not verbose." ) -+ ( "input-file,i", po::value >(), "Define file(s) for the convertion input." ) -+ ( "input-type,I", po::value >(), "Define file type(s) for automatic conversion of files in the working directory." ) - ( "output-file,o", po::value(), "Define file for the convertion output." ) - ( "noheader,h", "Disable adding of header support defines." ) - ( "const,C", "Define array as const." ) -@@ -174,7 +182,6 @@ int _tmain(int argc, _TCHAR* argv[]) - ( "wxnone,w", "Disable adding of wxWidgets support macro's." ) - ( "wxheader,W", po::value()->default_value( "wx/wx.h" ), "Select the header that includes wxWidgets (precompiled header?)." ) - ( "appendtype,t", "Add the file type at the end of the identifier (myimage_png)." ) -- ( "text,T", "Disable binary output and use text output, converts feed codes to systems defaults." ) - ; - - po::positional_options_description posdesc; -@@ -182,10 +189,12 @@ int _tmain(int argc, _TCHAR* argv[]) - - po::variables_map opt; - po::store( po::command_line_parser( argc, argv ).options( desc ).positional( posdesc ).run(), opt ); -- po::store( po::parse_config_file( fs::ifstream( fs::path( "default.cfg" ) ), desc ), opt ); -+ fs::ifstream ifs(fs::path("default.cfg")); -+ po::store( po::parse_config_file( ifs, desc ), opt ); - po::notify( opt ); - -- std::cout << WXINCLUDE_INFO << std::endl; -+ if ( !opt.count( "quiet" ) ) -+ std::cout << WXINCLUDE_INFO << std::endl; - - /* Show options when requested */ - if ( opt.count( "options" ) ) -@@ -215,26 +224,23 @@ int _tmain(int argc, _TCHAR* argv[]) - if ( opt.count( "output-file" ) ) - { - /* Create timer */ -- boost::timer timer; -+ boost::timer::cpu_timer timer; - - /* Create output file */ - std::string headername( opt[ "output-file" ].as() ); - - fs::path outputpath( headername ); -- fs::ofstream output( outputpath, std::ios::out | std::ios::trunc ); -+ fs::ofstream output( outputpath, std::ios::out | std::ios::trunc | std::ios::binary ); - - /* Use buffer */ - char outbuffer[BUFFER_SIZE]; - output.rdbuf()->pubsetbuf( outbuffer, BUFFER_SIZE ); - -- if ( !opt.count( "text" ) ) -- output.setf( std::ios::binary ); -- - if ( !output ) - throw std::runtime_error( "Failed to create output file!" ); - -- /* Show status */ -- std::cout << "Build : file '" << outputpath.leaf() << "'..." << std::endl; -+ if ( !opt.count( "quiet" ) ) /* Show status */ -+ std::cout << "Build : file '" << outputpath.leaf() << "'..." << std::endl; - - /* Get base name of file */ - headername = fs::basename( outputpath ); -@@ -259,7 +265,7 @@ int _tmain(int argc, _TCHAR* argv[]) - /* Process input files based on provided list */ - if ( opt.count( "input-file" ) ) - { -- std::vector files( opt[ "input-file" ].as>() ); -+ std::vector files( opt[ "input-file" ].as >() ); - - BOOST_FOREACH( std::string& file, files ) - { -@@ -271,8 +277,8 @@ int _tmain(int argc, _TCHAR* argv[]) - - if ( input.is_open() ) - { -- /* Show status */ -- std::cout << "Process: file '" << file << "'..." << std::endl; -+ if ( !opt.count( "quiet" ) ) /* Show status */ -+ std::cout << "Process: file '" << file << "'..." << std::endl; - - /* Remove extension */ - boost::erase_last( file, fileext ); -@@ -308,7 +314,7 @@ int _tmain(int argc, _TCHAR* argv[]) - /* Process input files based on provided type */ - if ( opt.count( "input-type" ) ) - { -- std::vector types( opt[ "input-type" ].as>() ); -+ std::vector types( opt[ "input-type" ].as >() ); - - for ( fs::directory_iterator dir_itr( fs::initial_path() ); dir_itr != fs::directory_iterator(); ++dir_itr ) - { -@@ -332,12 +338,12 @@ int _tmain(int argc, _TCHAR* argv[]) - fs::ifstream input( dir_itr->path(), std::ios::in | std::ios::binary | std::ios::ate ); - input.rdbuf()->pubsetbuf( inbuffer, BUFFER_SIZE ); - -- std::string file( dir_itr->path().leaf() ); -+ std::string file( dir_itr->path().leaf().string() ); - - if ( input.is_open() ) - { -- /* Show status */ -- std::cout << "Process: file '" << file << "'..." << std::endl; -+ if ( !opt.count( "quiet" ) ) /* Show status */ -+ std::cout << "Process: file '" << file << "'..." << std::endl; - - /* Remove extension */ - boost::erase_last( file, fileext ); -@@ -378,8 +384,12 @@ int _tmain(int argc, _TCHAR* argv[]) - output.seekp( 0, std::ios::beg ); - output << data.str(); - -- /* Show status */ -- std::cout << "Build : " << timer.elapsed() << "s needed for conversion of " << list.size() << " files." << std::endl; -+ if ( !opt.count( "quiet" ) ) /* Show status */ -+ { -+ auto nanoseconds = boost::chrono::nanoseconds(timer.elapsed().user + timer.elapsed().system); -+ auto seconds = boost::chrono::duration_cast(nanoseconds); -+ std::cout << "Build : " << seconds.count() << "s needed for conversion of " << list.size() << " files." << std::endl; -+ } - } - else - { diff --git a/patches/wxcmake.patch b/patches/wxcmake.patch deleted file mode 100644 index f8a8bc8..0000000 --- a/patches/wxcmake.patch +++ /dev/null @@ -1,3110 +0,0 @@ -diff --git a/adv.cmake b/adv.cmake -new file mode 100644 -index 0000000..e105962 ---- /dev/null -+++ b/adv.cmake -@@ -0,0 +1,173 @@ -+set(lib_name adv) -+####################################### -+# library sources -+set(thisfile ${wxroot}/build/cmake/${lib_name}.cmake) -+source_group("" FILES ${thisfile}) -+list(APPEND ${lib_name}_libsrcs ${thisfile}) -+######################## -+# Common Headers -+set(Common_hdrs -+ ${wxroot}/include/wx/aboutdlg.h -+ ${wxroot}/include/wx/activityindicator.h -+ ${wxroot}/include/wx/addremovectrl.h -+ ${wxroot}/include/wx/animate.h -+ ${wxroot}/include/wx/bannerwindow.h -+ ${wxroot}/include/wx/bmpcbox.h -+ ${wxroot}/include/wx/calctrl.h -+ ${wxroot}/include/wx/commandlinkbutton.h -+ ${wxroot}/include/wx/dataview.h -+ ${wxroot}/include/wx/datectrl.h -+ ${wxroot}/include/wx/dateevt.h -+ ${wxroot}/include/wx/datetimectrl.h -+ ${wxroot}/include/wx/dcbuffer.h -+ ${wxroot}/include/wx/dvrenderers.h -+ ${wxroot}/include/wx/editlbox.h -+ ${wxroot}/include/wx/grid.h -+ ${wxroot}/include/wx/hyperlink.h -+ ${wxroot}/include/wx/joystick.h -+ ${wxroot}/include/wx/laywin.h -+ ${wxroot}/include/wx/notifmsg.h -+ ${wxroot}/include/wx/odcombo.h -+ ${wxroot}/include/wx/propdlg.h -+ ${wxroot}/include/wx/richtooltip.h -+ ${wxroot}/include/wx/sashwin.h -+ ${wxroot}/include/wx/sound.h -+ ${wxroot}/include/wx/splash.h -+ ${wxroot}/include/wx/taskbar.h -+ ${wxroot}/include/wx/timectrl.h -+ ${wxroot}/include/wx/tipdlg.h -+ ${wxroot}/include/wx/treelist.h -+ ${wxroot}/include/wx/wizard.h -+ ) -+source_group("Common Headers" FILES ${Common_hdrs}) -+list(APPEND ${lib_name}_libsrcs ${Common_hdrs}) -+######################## -+# Common Sources -+set(Common_srcs -+ ${wxroot}/src/common/addremovectrl.cpp -+ ${wxroot}/src/common/animatecmn.cpp -+ ${wxroot}/src/common/bmpcboxcmn.cpp -+ ${wxroot}/src/common/calctrlcmn.cpp -+ ${wxroot}/src/common/datavcmn.cpp -+ ${wxroot}/src/common/dummy.cpp -+ ${wxroot}/src/common/gridcmn.cpp -+ ${wxroot}/src/common/hyperlnkcmn.cpp -+ ${wxroot}/src/common/notifmsgcmn.cpp -+ ${wxroot}/src/common/odcombocmn.cpp -+ ${wxroot}/src/common/richtooltipcmn.cpp -+ ${wxroot}/src/common/taskbarcmn.cpp -+ ) -+source_group("Common Sources" FILES ${Common_srcs}) -+list(APPEND ${lib_name}_libsrcs ${Common_srcs}) -+######################## -+# Generic Headers -+set(Generic_hdrs -+ ${wxroot}/include/wx/generic/aboutdlgg.h -+ ${wxroot}/include/wx/generic/activityindicator.h -+ ${wxroot}/include/wx/generic/animate.h -+ ${wxroot}/include/wx/generic/bmpcbox.h -+ ${wxroot}/include/wx/generic/calctrlg.h -+ ${wxroot}/include/wx/generic/dataview.h -+ ${wxroot}/include/wx/generic/datectrl.h -+ ${wxroot}/include/wx/generic/dvrenderer.h -+ ${wxroot}/include/wx/generic/dvrenderers.h -+ ${wxroot}/include/wx/generic/grid.h -+ ${wxroot}/include/wx/generic/gridctrl.h -+ ${wxroot}/include/wx/generic/grideditors.h -+ ${wxroot}/include/wx/generic/gridsel.h -+ ${wxroot}/include/wx/generic/helpext.h -+ ${wxroot}/include/wx/generic/hyperlink.h -+ ${wxroot}/include/wx/generic/laywin.h -+ ${wxroot}/include/wx/generic/notifmsg.h -+ ${wxroot}/include/wx/generic/propdlg.h -+ ${wxroot}/include/wx/generic/sashwin.h -+ ${wxroot}/include/wx/generic/splash.h -+ ${wxroot}/include/wx/generic/timectrl.h -+ ${wxroot}/include/wx/generic/wizard.h -+ ) -+source_group("Generic Headers" FILES ${Generic_hdrs}) -+list(APPEND ${lib_name}_libsrcs ${Generic_hdrs}) -+######################## -+# Generic Sources -+set(Generic_srcs -+ ${wxroot}/src/generic/aboutdlgg.cpp -+ ${wxroot}/src/generic/activityindicator.cpp -+ ${wxroot}/src/generic/animateg.cpp -+ ${wxroot}/src/generic/bannerwindow.cpp -+ ${wxroot}/src/generic/bmpcboxg.cpp -+ ${wxroot}/src/generic/calctrlg.cpp -+ ${wxroot}/src/generic/commandlinkbuttong.cpp -+ ${wxroot}/src/generic/datavgen.cpp -+ ${wxroot}/src/generic/datectlg.cpp -+ ${wxroot}/src/generic/editlbox.cpp -+ ${wxroot}/src/generic/grid.cpp -+ ${wxroot}/src/generic/gridctrl.cpp -+ ${wxroot}/src/generic/grideditors.cpp -+ ${wxroot}/src/generic/gridsel.cpp -+ ${wxroot}/src/generic/helpext.cpp -+ ${wxroot}/src/generic/hyperlinkg.cpp -+ ${wxroot}/src/generic/laywin.cpp -+ ${wxroot}/src/generic/notifmsgg.cpp -+ ${wxroot}/src/generic/odcombo.cpp -+ ${wxroot}/src/generic/propdlg.cpp -+ ${wxroot}/src/generic/richtooltipg.cpp -+ ${wxroot}/src/generic/sashwin.cpp -+ ${wxroot}/src/generic/splash.cpp -+ ${wxroot}/src/generic/timectrlg.cpp -+ ${wxroot}/src/generic/tipdlg.cpp -+ ${wxroot}/src/generic/treelist.cpp -+ ${wxroot}/src/generic/wizard.cpp -+ ) -+source_group("Generic Sources" FILES ${Generic_srcs}) -+list(APPEND ${lib_name}_libsrcs ${Generic_srcs}) -+######################## -+# MSW Headers -+set(MSW_hdrs -+ ${wxroot}/include/wx/msw/bmpcbox.h -+ ${wxroot}/include/wx/msw/calctrl.h -+ ${wxroot}/include/wx/msw/commandlinkbutton.h -+ ${wxroot}/include/wx/msw/datectrl.h -+ ${wxroot}/include/wx/msw/datetimectrl.h -+ ${wxroot}/include/wx/msw/genrcdefs.h -+ ${wxroot}/include/wx/msw/hyperlink.h -+ ${wxroot}/include/wx/msw/joystick.h -+ ${wxroot}/include/wx/msw/sound.h -+ ${wxroot}/include/wx/msw/taskbar.h -+ ${wxroot}/include/wx/msw/timectrl.h -+ ) -+source_group("MSW Headers" FILES ${MSW_hdrs}) -+list(APPEND ${lib_name}_libsrcs ${MSW_hdrs}) -+######################## -+# MSW Sources -+set(MSW_srcs -+ ${wxroot}/src/msw/aboutdlg.cpp -+ ${wxroot}/src/msw/bmpcbox.cpp -+ ${wxroot}/src/msw/calctrl.cpp -+ ${wxroot}/src/msw/commandlinkbutton.cpp -+ ${wxroot}/src/msw/datecontrols.cpp -+ ${wxroot}/src/msw/datectrl.cpp -+ ${wxroot}/src/msw/datetimectrl.cpp -+ ${wxroot}/src/msw/hyperlink.cpp -+ ${wxroot}/src/msw/joystick.cpp -+ ${wxroot}/src/msw/notifmsg.cpp -+ ${wxroot}/src/msw/rt/notifmsgrt.cpp -+ ${wxroot}/src/msw/richtooltip.cpp -+ ${wxroot}/src/msw/sound.cpp -+ ${wxroot}/src/msw/taskbar.cpp -+ ${wxroot}/src/msw/timectrl.cpp -+ #${wxroot}/src/msw/version.rc -+ ) -+source_group("MSW Sources" FILES ${MSW_srcs}) -+list(APPEND ${lib_name}_libsrcs ${MSW_srcs}) -+######################## -+# Setup Headers -+set(Setup_hdrs -+ ${wxroot}/include/wx/msw/setup.h -+ ) -+source_group("Setup Headers" FILES ${Setup_hdrs}) -+list(APPEND ${lib_name}_libsrcs ${Setup_hdrs}) -+####################################### -+# library -+add_library(${lib_name} STATIC ${${lib_name}_libsrcs}) -+target_link_libraries(${lib_name} PUBLIC core) -+set_wxtarget_properties(${lib_name}) -diff --git a/aui.cmake b/aui.cmake -new file mode 100644 -index 0000000..27d6af3 ---- /dev/null -+++ b/aui.cmake -@@ -0,0 +1,74 @@ -+set(lib_name aui) -+####################################### -+# library sources -+set(thisfile ${wxroot}/build/cmake/${lib_name}.cmake) -+source_group("" FILES ${thisfile}) -+list(APPEND ${lib_name}_libsrcs ${thisfile}) -+######################## -+# Common Headers -+set(Common_hdrs -+ ${wxroot}/include/wx/aui/aui.h -+ ${wxroot}/include/wx/aui/auibar.h -+ ${wxroot}/include/wx/aui/auibook.h -+ ${wxroot}/include/wx/aui/barartmsw.h -+ ${wxroot}/include/wx/aui/dockart.h -+ ${wxroot}/include/wx/aui/floatpane.h -+ ${wxroot}/include/wx/aui/framemanager.h -+ ${wxroot}/include/wx/aui/tabart.h -+ ${wxroot}/include/wx/aui/tabartmsw.h -+ ${wxroot}/include/wx/aui/tabmdi.h -+ ${wxroot}/include/wx/xrc/xh_auinotbk.h -+ ${wxroot}/include/wx/xrc/xh_auitoolb.h -+ ) -+source_group("Common Headers" FILES ${Common_hdrs}) -+list(APPEND ${lib_name}_libsrcs ${Common_hdrs}) -+######################## -+# Common Sources -+set(Common_srcs -+ ${wxroot}/src/common/dummy.cpp -+ ) -+source_group("Common Sources" FILES ${Common_srcs}) -+list(APPEND ${lib_name}_libsrcs ${Common_srcs}) -+######################## -+# MSW Headers -+set(MSW_hdrs -+ ${wxroot}/include/wx/msw/genrcdefs.h -+ ) -+source_group("MSW Headers" FILES ${MSW_hdrs}) -+list(APPEND ${lib_name}_libsrcs ${MSW_hdrs}) -+######################## -+# MSW Sources -+set(MSW_srcs -+ #${wxroot}/src/msw/version.rc -+ ) -+source_group("MSW Sources" FILES ${MSW_srcs}) -+list(APPEND ${lib_name}_libsrcs ${MSW_srcs}) -+######################## -+# Setup Headers -+set(Setup_hdrs -+ ${wxroot}/include/wx/msw/setup.h -+ ) -+source_group("Setup Headers" FILES ${Setup_hdrs}) -+list(APPEND ${lib_name}_libsrcs ${Setup_hdrs}) -+######################## -+# Source Files -+set(Source_srcs -+ ${wxroot}/src/aui/auibar.cpp -+ ${wxroot}/src/aui/auibook.cpp -+ ${wxroot}/src/aui/barartmsw.cpp -+ ${wxroot}/src/aui/dockart.cpp -+ ${wxroot}/src/aui/floatpane.cpp -+ ${wxroot}/src/aui/framemanager.cpp -+ ${wxroot}/src/aui/tabart.cpp -+ ${wxroot}/src/aui/tabartmsw.cpp -+ ${wxroot}/src/aui/tabmdi.cpp -+ ${wxroot}/src/xrc/xh_auinotbk.cpp -+ ${wxroot}/src/xrc/xh_auitoolb.cpp -+ ) -+source_group("Source Files" FILES ${Source_srcs}) -+list(APPEND ${lib_name}_libsrcs ${Source_srcs}) -+####################################### -+# library -+add_library(${lib_name} STATIC ${${lib_name}_libsrcs}) -+target_link_libraries(${lib_name} PUBLIC adv html) -+set_wxtarget_properties(${lib_name}) -diff --git a/base.cmake b/base.cmake -new file mode 100644 -index 0000000..d07a6ef ---- /dev/null -+++ b/base.cmake -@@ -0,0 +1,368 @@ -+set(lib_name base) -+####################################### -+# library sources -+######################## -+set(thisfile ${wxroot}/build/cmake/${lib_name}.cmake) -+set(wxfile ${wxroot}/build/cmake/wx.cmake) -+source_group("" FILES ${thisfile} ${wxfile}) -+list(APPEND ${lib_name}_libsrcs ${thisfile} ${wxfile}) -+######################## -+# Common Headers -+set(Common_hdrs -+ ${wxroot}/include/wx/afterstd.h -+ ${wxroot}/include/wx/any.h -+ ${wxroot}/include/wx/anystr.h -+ ${wxroot}/include/wx/app.h -+ ${wxroot}/include/wx/apptrait.h -+ ${wxroot}/include/wx/archive.h -+ ${wxroot}/include/wx/arrimpl.cpp -+ ${wxroot}/include/wx/arrstr.h -+ ${wxroot}/include/wx/atomic.h -+ ${wxroot}/include/wx/base64.h -+ ${wxroot}/include/wx/beforestd.h -+ ${wxroot}/include/wx/buffer.h -+ ${wxroot}/include/wx/build.h -+ ${wxroot}/include/wx/chartype.h -+ ${wxroot}/include/wx/checkeddelete.h -+ ${wxroot}/include/wx/chkconf.h -+ ${wxroot}/include/wx/clntdata.h -+ ${wxroot}/include/wx/cmdargs.h -+ ${wxroot}/include/wx/cmdline.h -+ ${wxroot}/include/wx/compiler.h -+ ${wxroot}/include/wx/confbase.h -+ ${wxroot}/include/wx/config.h -+ ${wxroot}/include/wx/containr.h -+ ${wxroot}/include/wx/convauto.h -+ ${wxroot}/include/wx/meta/convertible.h -+ ${wxroot}/include/wx/cpp.h -+ ${wxroot}/include/wx/crt.h -+ ${wxroot}/include/wx/datetime.h -+ ${wxroot}/include/wx/datstrm.h -+ ${wxroot}/include/wx/dde.h -+ ${wxroot}/include/wx/debug.h -+ ${wxroot}/include/wx/defs.h -+ ${wxroot}/include/wx/dir.h -+ ${wxroot}/include/wx/dlimpexp.h -+ ${wxroot}/include/wx/dlist.h -+ ${wxroot}/include/wx/dynarray.h -+ ${wxroot}/include/wx/dynlib.h -+ ${wxroot}/include/wx/dynload.h -+ ${wxroot}/include/wx/encconv.h -+ ${wxroot}/include/wx/event.h -+ ${wxroot}/include/wx/eventfilter.h -+ ${wxroot}/include/wx/evtloop.h -+ ${wxroot}/include/wx/except.h -+ ${wxroot}/include/wx/features.h -+ ${wxroot}/include/wx/ffile.h -+ ${wxroot}/include/wx/file.h -+ ${wxroot}/include/wx/fileconf.h -+ ${wxroot}/include/wx/filefn.h -+ ${wxroot}/include/wx/filename.h -+ ${wxroot}/include/wx/filesys.h -+ ${wxroot}/include/wx/flags.h -+ ${wxroot}/include/wx/fontenc.h -+ ${wxroot}/include/wx/fontmap.h -+ ${wxroot}/include/wx/fs_arc.h -+ ${wxroot}/include/wx/fs_filter.h -+ ${wxroot}/include/wx/fs_mem.h -+ ${wxroot}/include/wx/fs_zip.h -+ ${wxroot}/include/wx/fswatcher.h -+ ${wxroot}/include/wx/hash.h -+ ${wxroot}/include/wx/hashmap.h -+ ${wxroot}/include/wx/hashset.h -+ ${wxroot}/include/wx/iconloc.h -+ ${wxroot}/include/wx/meta/if.h -+ ${wxroot}/include/wx/meta/implicitconversion.h -+ ${wxroot}/include/wx/init.h -+ ${wxroot}/include/wx/meta/int2type.h -+ ${wxroot}/include/wx/intl.h -+ ${wxroot}/include/wx/iosfwrap.h -+ ${wxroot}/include/wx/ioswrap.h -+ ${wxroot}/include/wx/ipc.h -+ ${wxroot}/include/wx/ipcbase.h -+ ${wxroot}/include/wx/kbdstate.h -+ ${wxroot}/include/wx/language.h -+ ${wxroot}/include/wx/link.h -+ ${wxroot}/include/wx/list.h -+ ${wxroot}/include/wx/listimpl.cpp -+ ${wxroot}/include/wx/log.h -+ ${wxroot}/include/wx/longlong.h -+ ${wxroot}/include/wx/math.h -+ ${wxroot}/include/wx/memconf.h -+ ${wxroot}/include/wx/memory.h -+ ${wxroot}/include/wx/memtext.h -+ ${wxroot}/include/wx/mimetype.h -+ ${wxroot}/include/wx/module.h -+ ${wxroot}/include/wx/mousestate.h -+ ${wxroot}/include/wx/meta/movable.h -+ ${wxroot}/include/wx/msgout.h -+ ${wxroot}/include/wx/msgqueue.h -+ ${wxroot}/include/wx/mstream.h -+ ${wxroot}/include/wx/numformatter.h -+ ${wxroot}/include/wx/object.h -+ ${wxroot}/include/wx/platform.h -+ ${wxroot}/include/wx/platinfo.h -+ ${wxroot}/include/wx/meta/pod.h -+ ${wxroot}/include/wx/power.h -+ ${wxroot}/include/wx/process.h -+ ${wxroot}/include/wx/ptr_scpd.h -+ ${wxroot}/include/wx/ptr_shrd.h -+ ${wxroot}/include/wx/recguard.h -+ ${wxroot}/include/wx/regex.h -+ ${wxroot}/include/wx/meta/removeref.h -+ ${wxroot}/include/wx/rtti.h -+ ${wxroot}/include/wx/scopedarray.h -+ ${wxroot}/include/wx/scopedptr.h -+ ${wxroot}/include/wx/scopeguard.h -+ ${wxroot}/include/wx/sharedptr.h -+ ${wxroot}/include/wx/snglinst.h -+ ${wxroot}/include/wx/sstream.h -+ ${wxroot}/include/wx/stack.h -+ ${wxroot}/include/wx/stackwalk.h -+ ${wxroot}/include/wx/stdpaths.h -+ ${wxroot}/include/wx/stdstream.h -+ ${wxroot}/include/wx/stockitem.h -+ ${wxroot}/include/wx/stopwatch.h -+ ${wxroot}/include/wx/strconv.h -+ ${wxroot}/include/wx/stream.h -+ ${wxroot}/include/wx/string.h -+ ${wxroot}/include/wx/stringimpl.h -+ ${wxroot}/include/wx/stringops.h -+ ${wxroot}/include/wx/strvararg.h -+ ${wxroot}/include/wx/sysopt.h -+ ${wxroot}/include/wx/tarstrm.h -+ ${wxroot}/include/wx/textbuf.h -+ ${wxroot}/include/wx/textfile.h -+ ${wxroot}/include/wx/thread.h -+ ${wxroot}/include/wx/thrimpl.cpp -+ ${wxroot}/include/wx/time.h -+ ${wxroot}/include/wx/timer.h -+ ${wxroot}/include/wx/tls.h -+ ${wxroot}/include/wx/tokenzr.h -+ ${wxroot}/include/wx/tracker.h -+ ${wxroot}/include/wx/translation.h -+ ${wxroot}/include/wx/txtstrm.h -+ ${wxroot}/include/wx/typeinfo.h -+ ${wxroot}/include/wx/types.h -+ ${wxroot}/include/wx/unichar.h -+ ${wxroot}/include/wx/uri.h -+ ${wxroot}/include/wx/ustring.h -+ ${wxroot}/include/wx/utils.h -+ ${wxroot}/include/wx/variant.h -+ ${wxroot}/include/wx/vector.h -+ ${wxroot}/include/wx/version.h -+ ${wxroot}/include/wx/versioninfo.h -+ ${wxroot}/include/wx/volume.h -+ ${wxroot}/include/wx/weakref.h -+ ${wxroot}/include/wx/wfstream.h -+ ${wxroot}/include/wx/wx.h -+ ${wxroot}/include/wx/wxchar.h -+ ${wxroot}/include/wx/wxcrt.h -+ ${wxroot}/include/wx/wxcrtbase.h -+ ${wxroot}/include/wx/wxcrtvararg.h -+ ${wxroot}/include/wx/wxprec.h -+ ${wxroot}/include/wx/xlocale.h -+ ${wxroot}/include/wx/xti.h -+ ${wxroot}/include/wx/xti2.h -+ ${wxroot}/include/wx/xtictor.h -+ ${wxroot}/include/wx/xtihandler.h -+ ${wxroot}/include/wx/xtiprop.h -+ ${wxroot}/include/wx/xtistrm.h -+ ${wxroot}/include/wx/xtitypes.h -+ ${wxroot}/include/wx/zipstrm.h -+ ${wxroot}/include/wx/zstream.h -+ ) -+set_source_files_properties( -+ ${wxroot}/include/wx/arrimpl.cpp -+ ${wxroot}/include/wx/listimpl.cpp -+ ${wxroot}/include/wx/thrimpl.cpp -+ PROPERTIES HEADER_FILE_ONLY TRUE -+ ) -+source_group("Common Headers" FILES ${Common_hdrs}) -+list(APPEND ${lib_name}_libsrcs ${Common_hdrs}) -+######################## -+# Common Sources -+set(Common_srcs -+ ${wxroot}/src/common/any.cpp -+ ${wxroot}/src/common/appbase.cpp -+ ${wxroot}/src/common/arcall.cpp -+ ${wxroot}/src/common/arcfind.cpp -+ ${wxroot}/src/common/archive.cpp -+ ${wxroot}/src/common/arrstr.cpp -+ ${wxroot}/src/common/base64.cpp -+ ${wxroot}/src/common/clntdata.cpp -+ ${wxroot}/src/common/cmdline.cpp -+ ${wxroot}/src/common/config.cpp -+ ${wxroot}/src/common/convauto.cpp -+ ${wxroot}/src/common/datetime.cpp -+ ${wxroot}/src/common/datetimefmt.cpp -+ ${wxroot}/src/common/datstrm.cpp -+ ${wxroot}/src/common/dircmn.cpp -+ ${wxroot}/src/common/dummy.cpp -+ ${wxroot}/src/common/dynarray.cpp -+ ${wxroot}/src/common/dynlib.cpp -+ ${wxroot}/src/common/dynload.cpp -+ ${wxroot}/src/common/encconv.cpp -+ ${wxroot}/src/common/event.cpp -+ ${wxroot}/src/common/evtloopcmn.cpp -+ ${wxroot}/src/common/extended.c -+ ${wxroot}/src/common/ffile.cpp -+ ${wxroot}/src/common/file.cpp -+ ${wxroot}/src/common/fileback.cpp -+ ${wxroot}/src/common/fileconf.cpp -+ ${wxroot}/src/common/filefn.cpp -+ ${wxroot}/src/common/filename.cpp -+ ${wxroot}/src/common/filesys.cpp -+ ${wxroot}/src/common/filtall.cpp -+ ${wxroot}/src/common/filtfind.cpp -+ ${wxroot}/src/common/fmapbase.cpp -+ ${wxroot}/src/common/fs_arc.cpp -+ ${wxroot}/src/common/fs_filter.cpp -+ ${wxroot}/src/common/fs_mem.cpp -+ ${wxroot}/src/common/fswatchercmn.cpp -+ ${wxroot}/src/common/hash.cpp -+ ${wxroot}/src/common/hashmap.cpp -+ ${wxroot}/src/common/init.cpp -+ ${wxroot}/src/common/intl.cpp -+ ${wxroot}/src/common/ipcbase.cpp -+ ${wxroot}/src/common/languageinfo.cpp -+ ${wxroot}/src/common/list.cpp -+ ${wxroot}/src/common/log.cpp -+ ${wxroot}/src/common/longlong.cpp -+ ${wxroot}/src/common/memory.cpp -+ ${wxroot}/src/common/mimecmn.cpp -+ ${wxroot}/src/common/module.cpp -+ ${wxroot}/src/common/msgout.cpp -+ ${wxroot}/src/common/mstream.cpp -+ ${wxroot}/src/common/numformatter.cpp -+ ${wxroot}/src/common/object.cpp -+ ${wxroot}/src/common/platinfo.cpp -+ ${wxroot}/src/common/powercmn.cpp -+ ${wxroot}/src/common/process.cpp -+ ${wxroot}/src/common/regex.cpp -+ ${wxroot}/src/common/sstream.cpp -+ ${wxroot}/src/common/stdpbase.cpp -+ ${wxroot}/src/common/stdstream.cpp -+ ${wxroot}/src/common/stopwatch.cpp -+ ${wxroot}/src/common/strconv.cpp -+ ${wxroot}/src/common/stream.cpp -+ ${wxroot}/src/common/string.cpp -+ ${wxroot}/src/common/stringimpl.cpp -+ ${wxroot}/src/common/stringops.cpp -+ ${wxroot}/src/common/strvararg.cpp -+ ${wxroot}/src/common/sysopt.cpp -+ ${wxroot}/src/common/tarstrm.cpp -+ ${wxroot}/src/common/textbuf.cpp -+ ${wxroot}/src/common/textfile.cpp -+ ${wxroot}/src/common/threadinfo.cpp -+ ${wxroot}/src/common/time.cpp -+ ${wxroot}/src/common/timercmn.cpp -+ ${wxroot}/src/common/timerimpl.cpp -+ ${wxroot}/src/common/tokenzr.cpp -+ ${wxroot}/src/common/translation.cpp -+ ${wxroot}/src/common/txtstrm.cpp -+ ${wxroot}/src/common/unichar.cpp -+ ${wxroot}/src/common/uri.cpp -+ ${wxroot}/src/common/ustring.cpp -+ ${wxroot}/src/common/utilscmn.cpp -+ ${wxroot}/src/common/variant.cpp -+ ${wxroot}/src/common/wfstream.cpp -+ ${wxroot}/src/common/wxcrt.cpp -+ ${wxroot}/src/common/wxprintf.cpp -+ ${wxroot}/src/common/xlocale.cpp -+ ${wxroot}/src/common/xti.cpp -+ ${wxroot}/src/common/xtistrm.cpp -+ ${wxroot}/src/common/zipstrm.cpp -+ ${wxroot}/src/common/zstream.cpp -+ ) -+source_group("Common Sources" FILES ${Common_srcs}) -+list(APPEND ${lib_name}_libsrcs ${Common_srcs}) -+######################## -+# Generic Headers -+set(Generic_hdrs -+ ${wxroot}/include/wx/generic/fswatcher.h -+ ) -+source_group("Generic Headers" FILES ${Generic_hdrs}) -+list(APPEND ${lib_name}_libsrcs ${Generic_hdrs}) -+######################## -+# Generic Sources -+set(Generic_srcs -+ ${wxroot}/src/generic/fswatcherg.cpp -+ ) -+source_group("Generic Sources" FILES ${Generic_srcs}) -+list(APPEND ${lib_name}_libsrcs ${Generic_srcs}) -+######################## -+# MSW Headers -+set(MSW_hdrs -+ ${wxroot}/include/wx/msw/apptbase.h -+ ${wxroot}/include/wx/msw/apptrait.h -+ ${wxroot}/include/wx/msw/chkconf.h -+ ${wxroot}/include/wx/msw/crashrpt.h -+ ${wxroot}/include/wx/msw/dde.h -+ ${wxroot}/include/wx/msw/debughlp.h -+ ${wxroot}/include/wx/msw/evtloopconsole.h -+ ${wxroot}/include/wx/msw/fswatcher.h -+ ${wxroot}/include/wx/msw/gccpriv.h -+ ${wxroot}/include/wx/msw/genrcdefs.h -+ ${wxroot}/include/wx/msw/libraries.h -+ ${wxroot}/include/wx/msw/mimetype.h -+ ${wxroot}/include/wx/msw/private.h -+ ${wxroot}/include/wx/msw/regconf.h -+ ${wxroot}/include/wx/msw/registry.h -+ ${wxroot}/include/wx/msw/seh.h -+ ${wxroot}/include/wx/msw/stackwalk.h -+ ${wxroot}/include/wx/msw/stdpaths.h -+ ${wxroot}/include/wx/msw/winundef.h -+ ${wxroot}/include/wx/msw/wrapcctl.h -+ ${wxroot}/include/wx/msw/wrapcdlg.h -+ ${wxroot}/include/wx/msw/wrapwin.h -+ ) -+source_group("MSW Headers" FILES ${MSW_hdrs}) -+list(APPEND ${lib_name}_libsrcs ${MSW_hdrs}) -+######################## -+# MSW Sources -+set(MSW_srcs -+ ${wxroot}/src/msw/basemsw.cpp -+ ${wxroot}/src/msw/crashrpt.cpp -+ ${wxroot}/src/msw/dde.cpp -+ ${wxroot}/src/msw/debughlp.cpp -+ ${wxroot}/src/msw/dir.cpp -+ ${wxroot}/src/msw/dlmsw.cpp -+ ${wxroot}/src/msw/evtloopconsole.cpp -+ ${wxroot}/src/msw/fswatcher.cpp -+ ${wxroot}/src/msw/main.cpp -+ ${wxroot}/src/msw/mimetype.cpp -+ ${wxroot}/src/msw/power.cpp -+ ${wxroot}/src/msw/regconf.cpp -+ ${wxroot}/src/msw/registry.cpp -+ ${wxroot}/src/msw/snglinst.cpp -+ ${wxroot}/src/msw/stackwalk.cpp -+ ${wxroot}/src/msw/stdpaths.cpp -+ ${wxroot}/src/msw/thread.cpp -+ ${wxroot}/src/msw/timer.cpp -+ ${wxroot}/src/msw/utils.cpp -+ ${wxroot}/src/msw/utilsexc.cpp -+ #${wxroot}/src/msw/version.rc -+ ${wxroot}/src/msw/volume.cpp -+ ) -+source_group("MSW Sources" FILES ${MSW_srcs}) -+list(APPEND ${lib_name}_libsrcs ${MSW_srcs}) -+######################## -+# Setup Headers -+set(Setup_hdrs -+ ${wxroot}/include/wx/msw/setup.h -+ ) -+source_group("Setup Headers" FILES ${Setup_hdrs}) -+list(APPEND ${lib_name}_libsrcs ${Setup_hdrs}) -+####################################### -+# library -+add_library(${lib_name} STATIC ${${lib_name}_libsrcs}) -+target_compile_definitions(${lib_name} PUBLIC $ $ -+ $ $ -+ PRIVATE wxUSE_GUI=0 wxUSE_BASE=1 -+ ) -+target_include_directories(${lib_name} PUBLIC $ -+ $ # find setup.h -+ ) -+target_link_libraries(${lib_name} PRIVATE wxregex wxzlib) -+set_wxtarget_properties(${lib_name}) -diff --git a/core.cmake b/core.cmake -new file mode 100644 -index 0000000..49148ff ---- /dev/null -+++ b/core.cmake -@@ -0,0 +1,696 @@ -+set(lib_name core) -+####################################### -+# library sources -+set(thisfile ${wxroot}/build/cmake/${lib_name}.cmake) -+source_group("" FILES ${thisfile}) -+list(APPEND ${lib_name}_libsrcs ${thisfile}) -+######################## -+# Common Headers -+set(Common_hdrs -+ ${wxroot}/include/wx/accel.h -+ ${wxroot}/include/wx/access.h -+ ${wxroot}/include/wx/affinematrix2d.h -+ ${wxroot}/include/wx/affinematrix2dbase.h -+ ${wxroot}/include/wx/anidecod.h -+ ${wxroot}/include/wx/animdecod.h -+ ${wxroot}/include/wx/anybutton.h -+ ${wxroot}/include/wx/appprogress.h -+ ${wxroot}/include/wx/artprov.h -+ ${wxroot}/include/wx/bitmap.h -+ ${wxroot}/include/wx/bmpbuttn.h -+ ${wxroot}/include/wx/bookctrl.h -+ ${wxroot}/include/wx/persist/bookctrl.h -+ ${wxroot}/include/wx/brush.h -+ ${wxroot}/include/wx/busyinfo.h -+ ${wxroot}/include/wx/button.h -+ ${wxroot}/include/wx/caret.h -+ ${wxroot}/include/wx/checkbox.h -+ ${wxroot}/include/wx/checklst.h -+ ${wxroot}/include/wx/choicdlg.h -+ ${wxroot}/include/wx/choice.h -+ ${wxroot}/include/wx/choicebk.h -+ ${wxroot}/include/wx/clipbrd.h -+ ${wxroot}/include/wx/clrpicker.h -+ ${wxroot}/include/wx/cmdproc.h -+ ${wxroot}/include/wx/cmndata.h -+ ${wxroot}/include/wx/collheaderctrl.h -+ ${wxroot}/include/wx/collpane.h -+ ${wxroot}/include/wx/colordlg.h -+ ${wxroot}/include/wx/colour.h -+ ${wxroot}/include/wx/colourdata.h -+ ${wxroot}/include/wx/combo.h -+ ${wxroot}/include/wx/combobox.h -+ ${wxroot}/include/wx/compositewin.h -+ ${wxroot}/include/wx/control.h -+ ${wxroot}/include/wx/cshelp.h -+ ${wxroot}/include/wx/ctrlsub.h -+ ${wxroot}/include/wx/cursor.h -+ ${wxroot}/include/wx/custombgwin.h -+ ${wxroot}/include/wx/dataobj.h -+ ${wxroot}/include/wx/dc.h -+ ${wxroot}/include/wx/dcclient.h -+ ${wxroot}/include/wx/dcgraph.h -+ ${wxroot}/include/wx/dcmemory.h -+ ${wxroot}/include/wx/dcmirror.h -+ ${wxroot}/include/wx/dcprint.h -+ ${wxroot}/include/wx/dcps.h -+ ${wxroot}/include/wx/dcscreen.h -+ ${wxroot}/include/wx/dcsvg.h -+ ${wxroot}/include/wx/dialog.h -+ ${wxroot}/include/wx/dialup.h -+ ${wxroot}/include/wx/dirctrl.h -+ ${wxroot}/include/wx/dirdlg.h -+ ${wxroot}/include/wx/display.h -+ ${wxroot}/include/wx/display_impl.h -+ ${wxroot}/include/wx/dnd.h -+ ${wxroot}/include/wx/docmdi.h -+ ${wxroot}/include/wx/docview.h -+ ${wxroot}/include/wx/dragimag.h -+ ${wxroot}/include/wx/effects.h -+ ${wxroot}/include/wx/encinfo.h -+ ${wxroot}/include/wx/evtloopsrc.h -+ ${wxroot}/include/wx/fdrepdlg.h -+ ${wxroot}/include/wx/filectrl.h -+ ${wxroot}/include/wx/filedlg.h -+ ${wxroot}/include/wx/filehistory.h -+ ${wxroot}/include/wx/filepicker.h -+ ${wxroot}/include/wx/fmappriv.h -+ ${wxroot}/include/wx/font.h -+ ${wxroot}/include/wx/fontdata.h -+ ${wxroot}/include/wx/fontdlg.h -+ ${wxroot}/include/wx/fontenum.h -+ ${wxroot}/include/wx/fontpicker.h -+ ${wxroot}/include/wx/fontutil.h -+ ${wxroot}/include/wx/frame.h -+ ${wxroot}/include/wx/gauge.h -+ ${wxroot}/include/wx/gbsizer.h -+ ${wxroot}/include/wx/gdicmn.h -+ ${wxroot}/include/wx/gdiobj.h -+ ${wxroot}/include/wx/geometry.h -+ ${wxroot}/include/wx/gifdecod.h -+ ${wxroot}/include/wx/graphics.h -+ ${wxroot}/include/wx/headercol.h -+ ${wxroot}/include/wx/headerctrl.h -+ ${wxroot}/include/wx/help.h -+ ${wxroot}/include/wx/helpbase.h -+ ${wxroot}/include/wx/helphtml.h -+ ${wxroot}/include/wx/helpwin.h -+ ${wxroot}/include/wx/icon.h -+ ${wxroot}/include/wx/iconbndl.h -+ ${wxroot}/include/wx/imagbmp.h -+ ${wxroot}/include/wx/image.h -+ ${wxroot}/include/wx/imaggif.h -+ ${wxroot}/include/wx/imagiff.h -+ ${wxroot}/include/wx/imagjpeg.h -+ ${wxroot}/include/wx/imaglist.h -+ ${wxroot}/include/wx/imagpcx.h -+ ${wxroot}/include/wx/imagpng.h -+ ${wxroot}/include/wx/imagpnm.h -+ ${wxroot}/include/wx/imagtga.h -+ ${wxroot}/include/wx/imagtiff.h -+ ${wxroot}/include/wx/imagxpm.h -+ ${wxroot}/include/wx/infobar.h -+ ${wxroot}/include/wx/itemid.h -+ ${wxroot}/include/wx/layout.h -+ ${wxroot}/include/wx/listbase.h -+ ${wxroot}/include/wx/listbook.h -+ ${wxroot}/include/wx/listbox.h -+ ${wxroot}/include/wx/listctrl.h -+ ${wxroot}/include/wx/matrix.h -+ ${wxroot}/include/wx/mdi.h -+ ${wxroot}/include/wx/menu.h -+ ${wxroot}/include/wx/menuitem.h -+ ${wxroot}/include/wx/metafile.h -+ ${wxroot}/include/wx/minifram.h -+ ${wxroot}/include/wx/modalhook.h -+ ${wxroot}/include/wx/mousemanager.h -+ ${wxroot}/include/wx/msgdlg.h -+ ${wxroot}/include/wx/nativewin.h -+ ${wxroot}/include/wx/nonownedwnd.h -+ ${wxroot}/include/wx/notebook.h -+ ${wxroot}/include/wx/numdlg.h -+ ${wxroot}/include/wx/overlay.h -+ ${wxroot}/include/wx/ownerdrw.h -+ ${wxroot}/include/wx/palette.h -+ ${wxroot}/include/wx/panel.h -+ ${wxroot}/include/wx/paper.h -+ ${wxroot}/include/wx/pen.h -+ ${wxroot}/include/wx/persist.h -+ ${wxroot}/include/wx/pickerbase.h -+ ${wxroot}/include/wx/popupwin.h -+ ${wxroot}/include/wx/position.h -+ ${wxroot}/include/wx/preferences.h -+ ${wxroot}/include/wx/print.h -+ ${wxroot}/include/wx/printdlg.h -+ ${wxroot}/include/wx/prntbase.h -+ ${wxroot}/include/wx/progdlg.h -+ ${wxroot}/include/wx/quantize.h -+ ${wxroot}/include/wx/radiobox.h -+ ${wxroot}/include/wx/radiobut.h -+ ${wxroot}/include/wx/range.h -+ ${wxroot}/include/wx/rawbmp.h -+ ${wxroot}/include/wx/rearrangectrl.h -+ ${wxroot}/include/wx/region.h -+ ${wxroot}/include/wx/renderer.h -+ ${wxroot}/include/wx/richmsgdlg.h -+ ${wxroot}/include/wx/scopeguard.h -+ ${wxroot}/include/wx/scrolbar.h -+ ${wxroot}/include/wx/scrolwin.h -+ ${wxroot}/include/wx/selstore.h -+ ${wxroot}/include/wx/settings.h -+ ${wxroot}/include/wx/simplebook.h -+ ${wxroot}/include/wx/sizer.h -+ ${wxroot}/include/wx/slider.h -+ ${wxroot}/include/wx/spinbutt.h -+ ${wxroot}/include/wx/spinctrl.h -+ ${wxroot}/include/wx/persist/splitter.h -+ ${wxroot}/include/wx/splitter.h -+ ${wxroot}/include/wx/srchctrl.h -+ ${wxroot}/include/wx/statbmp.h -+ ${wxroot}/include/wx/statbox.h -+ ${wxroot}/include/wx/statline.h -+ ${wxroot}/include/wx/stattext.h -+ ${wxroot}/include/wx/statusbr.h -+ ${wxroot}/include/wx/systhemectrl.h -+ ${wxroot}/include/wx/taskbarbutton.h -+ ${wxroot}/include/wx/tbarbase.h -+ ${wxroot}/include/wx/testing.h -+ ${wxroot}/include/wx/textcompleter.h -+ ${wxroot}/include/wx/textctrl.h -+ ${wxroot}/include/wx/textdlg.h -+ ${wxroot}/include/wx/textentry.h -+ ${wxroot}/include/wx/textwrapper.h -+ ${wxroot}/include/wx/tglbtn.h -+ ${wxroot}/include/wx/tipwin.h -+ ${wxroot}/include/wx/toolbar.h -+ ${wxroot}/include/wx/toolbook.h -+ ${wxroot}/include/wx/tooltip.h -+ ${wxroot}/include/wx/persist/toplevel.h -+ ${wxroot}/include/wx/toplevel.h -+ ${wxroot}/include/wx/treebase.h -+ ${wxroot}/include/wx/persist/treebook.h -+ ${wxroot}/include/wx/treebook.h -+ ${wxroot}/include/wx/treectrl.h -+ ${wxroot}/include/wx/uiaction.h -+ ${wxroot}/include/wx/valgen.h -+ ${wxroot}/include/wx/validate.h -+ ${wxroot}/include/wx/valnum.h -+ ${wxroot}/include/wx/valtext.h -+ ${wxroot}/include/wx/vidmode.h -+ ${wxroot}/include/wx/vlbox.h -+ ${wxroot}/include/wx/vms_x_fix.h -+ ${wxroot}/include/wx/vscroll.h -+ ${wxroot}/include/wx/persist/window.h -+ ${wxroot}/include/wx/window.h -+ ${wxroot}/include/wx/windowid.h -+ ${wxroot}/include/wx/windowptr.h -+ ${wxroot}/include/wx/withimages.h -+ ${wxroot}/include/wx/wrapsizer.h -+ ${wxroot}/include/wx/wupdlock.h -+ ${wxroot}/include/wx/xrc/xmlreshandler.h -+ ${wxroot}/include/wx/xpmdecod.h -+ ${wxroot}/include/wx/xpmhand.h -+ ) -+source_group("Common Headers" FILES ${Common_hdrs}) -+list(APPEND ${lib_name}_libsrcs ${Common_hdrs}) -+######################## -+# Common Sources -+set(Common_srcs -+ ${wxroot}/src/common/accelcmn.cpp -+ ${wxroot}/src/common/accesscmn.cpp -+ ${wxroot}/src/common/affinematrix2d.cpp -+ ${wxroot}/src/common/anidecod.cpp -+ ${wxroot}/src/common/appcmn.cpp -+ ${wxroot}/src/common/artprov.cpp -+ ${wxroot}/src/common/artstd.cpp -+ ${wxroot}/src/common/arttango.cpp -+ ${wxroot}/src/common/bmpbase.cpp -+ ${wxroot}/src/common/bmpbtncmn.cpp -+ ${wxroot}/src/common/bookctrl.cpp -+ ${wxroot}/src/common/btncmn.cpp -+ ${wxroot}/src/common/cairo.cpp -+ ${wxroot}/src/common/checkboxcmn.cpp -+ ${wxroot}/src/common/checklstcmn.cpp -+ ${wxroot}/src/common/choiccmn.cpp -+ ${wxroot}/src/common/clipcmn.cpp -+ ${wxroot}/src/common/clrpickercmn.cpp -+ ${wxroot}/src/common/cmdproc.cpp -+ ${wxroot}/src/common/cmndata.cpp -+ ${wxroot}/src/common/colourcmn.cpp -+ ${wxroot}/src/common/colourdata.cpp -+ ${wxroot}/src/common/combocmn.cpp -+ ${wxroot}/src/common/containr.cpp -+ ${wxroot}/src/common/cshelp.cpp -+ ${wxroot}/src/common/ctrlcmn.cpp -+ ${wxroot}/src/common/ctrlsub.cpp -+ ${wxroot}/src/common/dcbase.cpp -+ ${wxroot}/src/common/dcbufcmn.cpp -+ ${wxroot}/src/common/dcgraph.cpp -+ ${wxroot}/src/common/dcsvg.cpp -+ ${wxroot}/src/common/dirctrlcmn.cpp -+ ${wxroot}/src/common/dlgcmn.cpp -+ ${wxroot}/src/common/dndcmn.cpp -+ ${wxroot}/src/common/dobjcmn.cpp -+ ${wxroot}/src/common/docmdi.cpp -+ ${wxroot}/src/common/docview.cpp -+ ${wxroot}/src/common/dpycmn.cpp -+ ${wxroot}/src/common/dseldlg.cpp -+ ${wxroot}/src/common/dummy.cpp -+ ${wxroot}/src/common/effects.cpp -+ ${wxroot}/src/common/event.cpp -+ ${wxroot}/src/common/fddlgcmn.cpp -+ ${wxroot}/src/common/filectrlcmn.cpp -+ ${wxroot}/src/common/filehistorycmn.cpp -+ ${wxroot}/src/common/filepickercmn.cpp -+ ${wxroot}/src/common/fldlgcmn.cpp -+ ${wxroot}/src/common/fontcmn.cpp -+ ${wxroot}/src/common/fontdata.cpp -+ ${wxroot}/src/common/fontenumcmn.cpp -+ ${wxroot}/src/common/fontmap.cpp -+ ${wxroot}/src/common/fontpickercmn.cpp -+ ${wxroot}/src/common/fontutilcmn.cpp -+ ${wxroot}/src/common/framecmn.cpp -+ ${wxroot}/src/common/fs_mem.cpp -+ ${wxroot}/src/common/gaugecmn.cpp -+ ${wxroot}/src/common/gbsizer.cpp -+ ${wxroot}/src/common/gdicmn.cpp -+ ${wxroot}/src/common/geometry.cpp -+ ${wxroot}/src/common/gifdecod.cpp -+ ${wxroot}/src/common/graphcmn.cpp -+ ${wxroot}/src/common/headercolcmn.cpp -+ ${wxroot}/src/common/headerctrlcmn.cpp -+ ${wxroot}/src/common/helpbase.cpp -+ ${wxroot}/src/common/iconbndl.cpp -+ ${wxroot}/src/common/imagall.cpp -+ ${wxroot}/src/common/imagbmp.cpp -+ ${wxroot}/src/common/image.cpp -+ ${wxroot}/src/common/imagfill.cpp -+ ${wxroot}/src/common/imaggif.cpp -+ ${wxroot}/src/common/imagiff.cpp -+ ${wxroot}/src/common/imagjpeg.cpp -+ ${wxroot}/src/common/imagpcx.cpp -+ ${wxroot}/src/common/imagpng.cpp -+ ${wxroot}/src/common/imagpnm.cpp -+ ${wxroot}/src/common/imagtga.cpp -+ ${wxroot}/src/common/imagtiff.cpp -+ ${wxroot}/src/common/imagxpm.cpp -+ ${wxroot}/src/common/layout.cpp -+ ${wxroot}/src/common/lboxcmn.cpp -+ ${wxroot}/src/common/listctrlcmn.cpp -+ ${wxroot}/src/common/markupparser.cpp -+ ${wxroot}/src/common/matrix.cpp -+ ${wxroot}/src/common/menucmn.cpp -+ ${wxroot}/src/common/modalhook.cpp -+ ${wxroot}/src/common/mousemanager.cpp -+ ${wxroot}/src/common/msgout.cpp -+ ${wxroot}/src/common/nbkbase.cpp -+ ${wxroot}/src/common/overlaycmn.cpp -+ ${wxroot}/src/common/ownerdrwcmn.cpp -+ ${wxroot}/src/common/panelcmn.cpp -+ ${wxroot}/src/common/paper.cpp -+ ${wxroot}/src/common/persist.cpp -+ ${wxroot}/src/common/pickerbase.cpp -+ ${wxroot}/src/common/popupcmn.cpp -+ ${wxroot}/src/common/preferencescmn.cpp -+ ${wxroot}/src/common/prntbase.cpp -+ ${wxroot}/src/common/quantize.cpp -+ ${wxroot}/src/common/radiobtncmn.cpp -+ ${wxroot}/src/common/radiocmn.cpp -+ ${wxroot}/src/common/rearrangectrl.cpp -+ ${wxroot}/src/common/rendcmn.cpp -+ ${wxroot}/src/common/rgncmn.cpp -+ ${wxroot}/src/common/scrolbarcmn.cpp -+ ${wxroot}/src/common/settcmn.cpp -+ ${wxroot}/src/common/sizer.cpp -+ ${wxroot}/src/common/slidercmn.cpp -+ ${wxroot}/src/common/spinbtncmn.cpp -+ ${wxroot}/src/common/spinctrlcmn.cpp -+ ${wxroot}/src/common/srchcmn.cpp -+ ${wxroot}/src/common/statbar.cpp -+ ${wxroot}/src/common/statbmpcmn.cpp -+ ${wxroot}/src/common/statboxcmn.cpp -+ ${wxroot}/src/common/statlinecmn.cpp -+ ${wxroot}/src/common/stattextcmn.cpp -+ ${wxroot}/src/common/stockitem.cpp -+ ${wxroot}/src/common/tbarbase.cpp -+ ${wxroot}/src/common/textcmn.cpp -+ ${wxroot}/src/common/textentrycmn.cpp -+ ${wxroot}/src/common/textmeasurecmn.cpp -+ ${wxroot}/src/common/toplvcmn.cpp -+ ${wxroot}/src/common/treebase.cpp -+ ${wxroot}/src/common/uiactioncmn.cpp -+ ${wxroot}/src/common/utilscmn.cpp -+ ${wxroot}/src/common/valgen.cpp -+ ${wxroot}/src/common/validate.cpp -+ ${wxroot}/src/common/valnum.cpp -+ ${wxroot}/src/common/valtext.cpp -+ ${wxroot}/src/common/wincmn.cpp -+ ${wxroot}/src/common/windowid.cpp -+ ${wxroot}/src/common/wrapsizer.cpp -+ ${wxroot}/src/xrc/xmlreshandler.cpp -+ ${wxroot}/src/common/xpmdecod.cpp -+ ) -+source_group("Common Sources" FILES ${Common_srcs}) -+list(APPEND ${lib_name}_libsrcs ${Common_srcs}) -+######################## -+# Generic Headers -+set(Generic_hdrs -+ ${wxroot}/include/wx/generic/accel.h -+ ${wxroot}/include/wx/generic/busyinfo.h -+ ${wxroot}/include/wx/generic/buttonbar.h -+ ${wxroot}/include/wx/generic/choicdgg.h -+ ${wxroot}/include/wx/generic/clrpickerg.h -+ ${wxroot}/include/wx/generic/collheaderctrl.h -+ ${wxroot}/include/wx/generic/collpaneg.h -+ ${wxroot}/include/wx/generic/combo.h -+ ${wxroot}/include/wx/generic/custombgwin.h -+ ${wxroot}/include/wx/generic/dcpsg.h -+ ${wxroot}/include/wx/generic/dirctrlg.h -+ ${wxroot}/include/wx/generic/dragimgg.h -+ ${wxroot}/include/wx/generic/filectrlg.h -+ ${wxroot}/include/wx/generic/filepickerg.h -+ ${wxroot}/include/wx/generic/fontpickerg.h -+ ${wxroot}/include/wx/generic/headerctrlg.h -+ ${wxroot}/include/wx/generic/infobar.h -+ ${wxroot}/include/wx/generic/logg.h -+ ${wxroot}/include/wx/generic/msgdlgg.h -+ ${wxroot}/include/wx/generic/notebook.h -+ ${wxroot}/include/wx/generic/numdlgg.h -+ ${wxroot}/include/wx/generic/panelg.h -+ ${wxroot}/include/wx/generic/printps.h -+ ${wxroot}/include/wx/generic/prntdlgg.h -+ ${wxroot}/include/wx/generic/progdlgg.h -+ ${wxroot}/include/wx/generic/richmsgdlgg.h -+ ${wxroot}/include/wx/generic/scrolwin.h -+ ${wxroot}/include/wx/generic/spinctlg.h -+ ${wxroot}/include/wx/generic/splitter.h -+ ${wxroot}/include/wx/generic/srchctlg.h -+ ${wxroot}/include/wx/generic/statbmpg.h -+ ${wxroot}/include/wx/generic/stattextg.h -+ ${wxroot}/include/wx/generic/textdlgg.h -+ ${wxroot}/include/wx/generic/treectlg.h -+ ) -+source_group("Generic Headers" FILES ${Generic_hdrs}) -+list(APPEND ${lib_name}_libsrcs ${Generic_hdrs}) -+######################## -+# Generic Sources -+set(Generic_srcs -+ ${wxroot}/src/generic/busyinfo.cpp -+ ${wxroot}/src/generic/buttonbar.cpp -+ ${wxroot}/src/generic/choicbkg.cpp -+ ${wxroot}/src/generic/choicdgg.cpp -+ ${wxroot}/src/generic/clrpickerg.cpp -+ ${wxroot}/src/generic/collheaderctrlg.cpp -+ ${wxroot}/src/generic/collpaneg.cpp -+ ${wxroot}/src/generic/combog.cpp -+ ${wxroot}/src/generic/dcpsg.cpp -+ ${wxroot}/src/generic/dirctrlg.cpp -+ ${wxroot}/src/generic/dragimgg.cpp -+ ${wxroot}/src/generic/filectrlg.cpp -+ ${wxroot}/src/generic/filepickerg.cpp -+ ${wxroot}/src/generic/fontpickerg.cpp -+ ${wxroot}/src/generic/graphicc.cpp -+ ${wxroot}/src/generic/headerctrlg.cpp -+ ${wxroot}/src/generic/infobar.cpp -+ ${wxroot}/src/generic/listbkg.cpp -+ ${wxroot}/src/generic/logg.cpp -+ ${wxroot}/src/generic/markuptext.cpp -+ ${wxroot}/src/generic/msgdlgg.cpp -+ ${wxroot}/src/generic/numdlgg.cpp -+ ${wxroot}/src/generic/preferencesg.cpp -+ ${wxroot}/src/generic/printps.cpp -+ ${wxroot}/src/generic/prntdlgg.cpp -+ ${wxroot}/src/generic/progdlgg.cpp -+ ${wxroot}/src/generic/renderg.cpp -+ ${wxroot}/src/generic/richmsgdlgg.cpp -+ ${wxroot}/src/generic/scrlwing.cpp -+ ${wxroot}/src/generic/selstore.cpp -+ ${wxroot}/src/generic/spinctlg.cpp -+ ${wxroot}/src/generic/splitter.cpp -+ ${wxroot}/src/generic/srchctlg.cpp -+ ${wxroot}/src/generic/statbmpg.cpp -+ ${wxroot}/src/generic/stattextg.cpp -+ ${wxroot}/src/generic/statusbr.cpp -+ ${wxroot}/src/generic/textdlgg.cpp -+ ${wxroot}/src/generic/tipwin.cpp -+ ${wxroot}/src/generic/toolbkg.cpp -+ ${wxroot}/src/generic/treebkg.cpp -+ ${wxroot}/src/generic/treectlg.cpp -+ ${wxroot}/src/generic/vlbox.cpp -+ ${wxroot}/src/generic/vscroll.cpp -+ ) -+source_group("Generic Sources" FILES ${Generic_srcs}) -+list(APPEND ${lib_name}_libsrcs ${Generic_srcs}) -+######################## -+# MSW Headers -+set(MSW_hdrs -+ ${wxroot}/include/wx/msw/accel.h -+ ${wxroot}/include/wx/msw/ole/access.h -+ ${wxroot}/include/wx/msw/ole/activex.h -+ ${wxroot}/include/wx/msw/anybutton.h -+ ${wxroot}/include/wx/msw/app.h -+ ${wxroot}/include/wx/msw/appprogress.h -+ ${wxroot}/include/wx/msw/ole/automtn.h -+ ${wxroot}/include/wx/msw/bitmap.h -+ ${wxroot}/include/wx/msw/bmpbuttn.h -+ ${wxroot}/include/wx/msw/brush.h -+ ${wxroot}/include/wx/msw/button.h -+ ${wxroot}/include/wx/msw/caret.h -+ ${wxroot}/include/wx/msw/checkbox.h -+ ${wxroot}/include/wx/msw/checklst.h -+ ${wxroot}/include/wx/msw/choice.h -+ ${wxroot}/include/wx/msw/clipbrd.h -+ ${wxroot}/include/wx/msw/colordlg.h -+ ${wxroot}/include/wx/msw/colour.h -+ ${wxroot}/include/wx/msw/combo.h -+ ${wxroot}/include/wx/msw/combobox.h -+ ${wxroot}/include/wx/msw/control.h -+ ${wxroot}/include/wx/msw/ctrlsub.h -+ ${wxroot}/include/wx/msw/cursor.h -+ ${wxroot}/include/wx/msw/custombgwin.h -+ ${wxroot}/include/wx/msw/ole/dataform.h -+ ${wxroot}/include/wx/msw/ole/dataobj.h -+ ${wxroot}/include/wx/msw/ole/dataobj2.h -+ ${wxroot}/include/wx/msw/dc.h -+ ${wxroot}/include/wx/msw/dcclient.h -+ ${wxroot}/include/wx/msw/dcmemory.h -+ ${wxroot}/include/wx/msw/dcprint.h -+ ${wxroot}/include/wx/msw/dcscreen.h -+ ${wxroot}/include/wx/msw/dialog.h -+ ${wxroot}/include/wx/msw/dib.h -+ ${wxroot}/include/wx/msw/dirdlg.h -+ ${wxroot}/include/wx/msw/dragimag.h -+ ${wxroot}/include/wx/msw/ole/dropsrc.h -+ ${wxroot}/include/wx/msw/ole/droptgt.h -+ ${wxroot}/include/wx/msw/enhmeta.h -+ ${wxroot}/include/wx/msw/evtloop.h -+ ${wxroot}/include/wx/msw/fdrepdlg.h -+ ${wxroot}/include/wx/msw/filedlg.h -+ ${wxroot}/include/wx/msw/font.h -+ ${wxroot}/include/wx/msw/fontdlg.h -+ ${wxroot}/include/wx/msw/frame.h -+ ${wxroot}/include/wx/msw/gauge.h -+ ${wxroot}/include/wx/msw/gdiimage.h -+ ${wxroot}/include/wx/msw/genrcdefs.h -+ ${wxroot}/include/wx/msw/headerctrl.h -+ ${wxroot}/include/wx/msw/helpchm.h -+ ${wxroot}/include/wx/msw/helpwin.h -+ ${wxroot}/include/wx/msw/htmlhelp.h -+ ${wxroot}/include/wx/msw/icon.h -+ ${wxroot}/include/wx/msw/imaglist.h -+ ${wxroot}/include/wx/msw/iniconf.h -+ ${wxroot}/include/wx/msw/init.h -+ ${wxroot}/include/wx/msw/listbox.h -+ ${wxroot}/include/wx/msw/listctrl.h -+ ${wxroot}/include/wx/msw/mdi.h -+ ${wxroot}/include/wx/msw/menu.h -+ ${wxroot}/include/wx/msw/menuitem.h -+ ${wxroot}/include/wx/msw/metafile.h -+ ${wxroot}/include/wx/msw/minifram.h -+ ${wxroot}/include/wx/msw/missing.h -+ ${wxroot}/include/wx/msw/msgdlg.h -+ ${wxroot}/include/wx/msw/msvcrt.h -+ ${wxroot}/include/wx/msw/nonownedwnd.h -+ ${wxroot}/include/wx/msw/notebook.h -+ ${wxroot}/include/wx/msw/ole/oleutils.h -+ ${wxroot}/include/wx/msw/ownerdrawnbutton.h -+ ${wxroot}/include/wx/msw/ownerdrw.h -+ ${wxroot}/include/wx/msw/palette.h -+ ${wxroot}/include/wx/msw/panel.h -+ ${wxroot}/include/wx/msw/pen.h -+ ${wxroot}/include/wx/msw/popupwin.h -+ ${wxroot}/include/wx/msw/printdlg.h -+ ${wxroot}/include/wx/msw/printwin.h -+ ${wxroot}/include/wx/msw/progdlg.h -+ ${wxroot}/include/wx/msw/radiobox.h -+ ${wxroot}/include/wx/msw/radiobut.h -+ ${wxroot}/include/wx/msw/rcdefs.h -+ ${wxroot}/include/wx/msw/region.h -+ ${wxroot}/include/wx/msw/richmsgdlg.h -+ ${wxroot}/include/wx/msw/ole/safearray.h -+ ${wxroot}/include/wx/msw/scrolbar.h -+ ${wxroot}/include/wx/msw/slider.h -+ ${wxroot}/include/wx/msw/spinbutt.h -+ ${wxroot}/include/wx/msw/spinctrl.h -+ ${wxroot}/include/wx/msw/statbmp.h -+ ${wxroot}/include/wx/msw/statbox.h -+ ${wxroot}/include/wx/msw/statline.h -+ ${wxroot}/include/wx/msw/stattext.h -+ ${wxroot}/include/wx/msw/statusbar.h -+ ${wxroot}/include/wx/msw/taskbarbutton.h -+ ${wxroot}/include/wx/msw/textctrl.h -+ ${wxroot}/include/wx/msw/textentry.h -+ ${wxroot}/include/wx/msw/tglbtn.h -+ ${wxroot}/include/wx/msw/toolbar.h -+ ${wxroot}/include/wx/msw/tooltip.h -+ ${wxroot}/include/wx/msw/toplevel.h -+ ${wxroot}/include/wx/msw/treectrl.h -+ ${wxroot}/include/wx/msw/rt/utils.h -+ ${wxroot}/include/wx/msw/ole/uuid.h -+ ${wxroot}/include/wx/msw/uxtheme.h -+ ${wxroot}/include/wx/msw/uxthemep.h -+ ${wxroot}/include/wx/msw/window.h -+ ) -+source_group("MSW Headers" FILES ${MSW_hdrs}) -+list(APPEND ${lib_name}_libsrcs ${MSW_hdrs}) -+######################## -+# MSW Sources -+set(MSW_srcs -+ ${wxroot}/src/msw/accel.cpp -+ ${wxroot}/src/msw/ole/access.cpp -+ ${wxroot}/src/msw/ole/activex.cpp -+ ${wxroot}/src/msw/anybutton.cpp -+ ${wxroot}/src/msw/app.cpp -+ ${wxroot}/src/msw/appprogress.cpp -+ ${wxroot}/src/msw/artmsw.cpp -+ ${wxroot}/src/msw/ole/automtn.cpp -+ ${wxroot}/src/msw/bitmap.cpp -+ ${wxroot}/src/msw/bmpbuttn.cpp -+ ${wxroot}/src/msw/brush.cpp -+ ${wxroot}/src/msw/button.cpp -+ ${wxroot}/src/msw/caret.cpp -+ ${wxroot}/src/msw/checkbox.cpp -+ ${wxroot}/src/msw/checklst.cpp -+ ${wxroot}/src/msw/choice.cpp -+ ${wxroot}/src/msw/clipbrd.cpp -+ ${wxroot}/src/msw/colordlg.cpp -+ ${wxroot}/src/msw/colour.cpp -+ ${wxroot}/src/msw/combo.cpp -+ ${wxroot}/src/msw/combobox.cpp -+ ${wxroot}/src/msw/control.cpp -+ ${wxroot}/src/msw/cursor.cpp -+ ${wxroot}/src/msw/data.cpp -+ ${wxroot}/src/msw/ole/dataobj.cpp -+ ${wxroot}/src/msw/dc.cpp -+ ${wxroot}/src/msw/dcclient.cpp -+ ${wxroot}/src/msw/dcmemory.cpp -+ ${wxroot}/src/msw/dcprint.cpp -+ ${wxroot}/src/msw/dcscreen.cpp -+ ${wxroot}/src/msw/dialog.cpp -+ ${wxroot}/src/msw/dialup.cpp -+ ${wxroot}/src/msw/dib.cpp -+ ${wxroot}/src/msw/dirdlg.cpp -+ ${wxroot}/src/msw/display.cpp -+ ${wxroot}/src/msw/dragimag.cpp -+ ${wxroot}/src/msw/ole/dropsrc.cpp -+ ${wxroot}/src/msw/ole/droptgt.cpp -+ ${wxroot}/src/msw/enhmeta.cpp -+ ${wxroot}/src/msw/evtloop.cpp -+ ${wxroot}/src/msw/fdrepdlg.cpp -+ ${wxroot}/src/msw/filedlg.cpp -+ ${wxroot}/src/msw/font.cpp -+ ${wxroot}/src/msw/fontdlg.cpp -+ ${wxroot}/src/msw/fontenum.cpp -+ ${wxroot}/src/msw/fontutil.cpp -+ ${wxroot}/src/msw/frame.cpp -+ ${wxroot}/src/msw/gauge.cpp -+ ${wxroot}/src/msw/gdiimage.cpp -+ ${wxroot}/src/msw/gdiobj.cpp -+ ${wxroot}/src/msw/gdiplus.cpp -+ ${wxroot}/src/msw/graphics.cpp -+ ${wxroot}/src/msw/graphicsd2d.cpp -+ ${wxroot}/src/msw/headerctrl.cpp -+ ${wxroot}/src/msw/helpchm.cpp -+ ${wxroot}/src/msw/helpwin.cpp -+ ${wxroot}/src/msw/icon.cpp -+ ${wxroot}/src/msw/imaglist.cpp -+ ${wxroot}/src/msw/iniconf.cpp -+ ${wxroot}/src/msw/listbox.cpp -+ ${wxroot}/src/msw/listctrl.cpp -+ ${wxroot}/src/msw/main.cpp -+ ${wxroot}/src/msw/mdi.cpp -+ ${wxroot}/src/msw/menu.cpp -+ ${wxroot}/src/msw/menuitem.cpp -+ ${wxroot}/src/msw/metafile.cpp -+ ${wxroot}/src/msw/minifram.cpp -+ ${wxroot}/src/msw/msgdlg.cpp -+ ${wxroot}/src/msw/nativdlg.cpp -+ ${wxroot}/src/msw/nativewin.cpp -+ ${wxroot}/src/msw/nonownedwnd.cpp -+ ${wxroot}/src/msw/notebook.cpp -+ ${wxroot}/src/msw/ole/oleutils.cpp -+ ${wxroot}/src/msw/ownerdrw.cpp -+ ${wxroot}/src/msw/palette.cpp -+ ${wxroot}/src/msw/panel.cpp -+ ${wxroot}/src/msw/pen.cpp -+ ${wxroot}/src/msw/popupwin.cpp -+ ${wxroot}/src/msw/printdlg.cpp -+ ${wxroot}/src/msw/printwin.cpp -+ ${wxroot}/src/msw/progdlg.cpp -+ ${wxroot}/src/msw/radiobox.cpp -+ ${wxroot}/src/msw/radiobut.cpp -+ ${wxroot}/src/msw/region.cpp -+ ${wxroot}/src/msw/renderer.cpp -+ ${wxroot}/src/msw/richmsgdlg.cpp -+ ${wxroot}/src/msw/ole/safearray.cpp -+ ${wxroot}/src/msw/scrolbar.cpp -+ ${wxroot}/src/msw/settings.cpp -+ ${wxroot}/src/msw/slider.cpp -+ ${wxroot}/src/msw/spinbutt.cpp -+ ${wxroot}/src/msw/spinctrl.cpp -+ ${wxroot}/src/msw/statbmp.cpp -+ ${wxroot}/src/msw/statbox.cpp -+ ${wxroot}/src/msw/statline.cpp -+ ${wxroot}/src/msw/stattext.cpp -+ ${wxroot}/src/msw/statusbar.cpp -+ ${wxroot}/src/msw/systhemectrl.cpp -+ ${wxroot}/src/msw/taskbarbutton.cpp -+ ${wxroot}/src/msw/textctrl.cpp -+ ${wxroot}/src/msw/textentry.cpp -+ ${wxroot}/src/msw/textmeasure.cpp -+ ${wxroot}/src/msw/tglbtn.cpp -+ ${wxroot}/src/msw/toolbar.cpp -+ ${wxroot}/src/msw/tooltip.cpp -+ ${wxroot}/src/msw/toplevel.cpp -+ ${wxroot}/src/msw/treectrl.cpp -+ ${wxroot}/src/msw/uiaction.cpp -+ ${wxroot}/src/msw/utilsgui.cpp -+ ${wxroot}/src/msw/rt/utilsrt.cpp -+ ${wxroot}/src/msw/utilswin.cpp -+ ${wxroot}/src/msw/ole/uuid.cpp -+ ${wxroot}/src/msw/uxtheme.cpp -+ #${wxroot}/src/msw/version.rc -+ ${wxroot}/src/msw/volume.cpp -+ ${wxroot}/src/msw/window.cpp -+ ) -+source_group("MSW Sources" FILES ${MSW_srcs}) -+list(APPEND ${lib_name}_libsrcs ${MSW_srcs}) -+######################## -+# Setup Headers -+set(Setup_hdrs -+ ${wxroot}/include/wx/msw/setup.h -+ ) -+source_group("Setup Headers" FILES ${Setup_hdrs}) -+list(APPEND ${lib_name}_libsrcs ${Setup_hdrs}) -+####################################### -+# library -+add_library(${lib_name} STATIC ${${lib_name}_libsrcs}) -+target_compile_definitions(${lib_name} PRIVATE wxUSE_BASE=0) -+target_link_libraries(${lib_name} PUBLIC base PRIVATE wxjpeg wxpng wxtiff) -+if(MSVC) -+ target_link_libraries(${lib_name} INTERFACE -+ rpcrt4 comctl32 # system libraries required by wxCore -+ gdiplus # wxUSE_GRAPHICS_CONTEXT set to 1 in setup.h -+ ) -+endif() -+set_wxtarget_properties(${lib_name}) -diff --git a/gl.cmake b/gl.cmake -new file mode 100644 -index 0000000..fd7e1e4 ---- /dev/null -+++ b/gl.cmake -@@ -0,0 +1,49 @@ -+set(lib_name gl) -+####################################### -+# library sources -+set(thisfile ${wxroot}/build/cmake/${lib_name}.cmake) -+source_group("" FILES ${thisfile}) -+list(APPEND ${lib_name}_libsrcs ${thisfile}) -+######################## -+# Common Headers -+set(Common_hdrs -+ ${wxroot}/include/wx/glcanvas.h -+ ) -+source_group("Common Headers" FILES ${Common_hdrs}) -+list(APPEND ${lib_name}_libsrcs ${Common_hdrs}) -+######################## -+# Common Sources -+set(Common_srcs -+ ${wxroot}/src/common/dummy.cpp -+ ${wxroot}/src/common/glcmn.cpp -+ ) -+source_group("Common Sources" FILES ${Common_srcs}) -+list(APPEND ${lib_name}_libsrcs ${Common_srcs}) -+######################## -+# MSW Headers -+set(MSW_hdrs -+ ${wxroot}/include/wx/msw/genrcdefs.h -+ ${wxroot}/include/wx/msw/glcanvas.h -+ ) -+source_group("MSW Headers" FILES ${MSW_hdrs}) -+list(APPEND ${lib_name}_libsrcs ${MSW_hdrs}) -+######################## -+# MSW Sources -+set(MSW_srcs -+ ${wxroot}/src/msw/glcanvas.cpp -+ #${wxroot}/src/msw/version.rc -+ ) -+source_group("MSW Sources" FILES ${MSW_srcs}) -+list(APPEND ${lib_name}_libsrcs ${MSW_srcs}) -+######################## -+# Setup Headers -+set(Setup_hdrs -+ ${wxroot}/include/wx/msw/setup.h -+ ) -+source_group("Setup Headers" FILES ${Setup_hdrs}) -+list(APPEND ${lib_name}_libsrcs ${Setup_hdrs}) -+####################################### -+# library -+add_library(${lib_name} STATIC ${${lib_name}_libsrcs}) -+target_link_libraries(${lib_name} PUBLIC core) -+set_wxtarget_properties(${lib_name}) -diff --git a/html.cmake b/html.cmake -new file mode 100644 -index 0000000..2e2eb63 ---- /dev/null -+++ b/html.cmake -@@ -0,0 +1,110 @@ -+set(lib_name html) -+####################################### -+# library sources -+set(thisfile ${wxroot}/build/cmake/${lib_name}.cmake) -+source_group("" FILES ${thisfile}) -+list(APPEND ${lib_name}_libsrcs ${thisfile}) -+######################## -+# Common Headers -+set(Common_hdrs -+ ${wxroot}/include/wx/htmllbox.h -+ ${wxroot}/include/wx/wxhtml.h -+ ) -+source_group("Common Headers" FILES ${Common_hdrs}) -+list(APPEND ${lib_name}_libsrcs ${Common_hdrs}) -+######################## -+# Common Sources -+set(Common_srcs -+ ${wxroot}/src/common/dummy.cpp -+ ) -+source_group("Common Sources" FILES ${Common_srcs}) -+list(APPEND ${lib_name}_libsrcs ${Common_srcs}) -+######################## -+# Generic Sources -+set(Generic_srcs -+ ${wxroot}/src/generic/htmllbox.cpp -+ ) -+source_group("Generic Sources" FILES ${Generic_srcs}) -+list(APPEND ${lib_name}_libsrcs ${Generic_srcs}) -+######################## -+# MSW Headers -+set(MSW_hdrs -+ ${wxroot}/include/wx/msw/genrcdefs.h -+ ${wxroot}/include/wx/msw/helpbest.h -+ ) -+source_group("MSW Headers" FILES ${MSW_hdrs}) -+list(APPEND ${lib_name}_libsrcs ${MSW_hdrs}) -+######################## -+# MSW Sources -+set(MSW_srcs -+ ${wxroot}/src/msw/helpbest.cpp -+ #${wxroot}/src/msw/version.rc -+ ) -+source_group("MSW Sources" FILES ${MSW_srcs}) -+list(APPEND ${lib_name}_libsrcs ${MSW_srcs}) -+######################## -+# Setup Headers -+set(Setup_hdrs -+ ${wxroot}/include/wx/msw/setup.h -+ ) -+source_group("Setup Headers" FILES ${Setup_hdrs}) -+list(APPEND ${lib_name}_libsrcs ${Setup_hdrs}) -+######################## -+# wxHTML Headers -+set(wxHTML_hdrs -+ ${wxroot}/include/wx/html/forcelnk.h -+ ${wxroot}/include/wx/html/helpctrl.h -+ ${wxroot}/include/wx/html/helpdata.h -+ ${wxroot}/include/wx/html/helpdlg.h -+ ${wxroot}/include/wx/html/helpfrm.h -+ ${wxroot}/include/wx/html/helpwnd.h -+ ${wxroot}/include/wx/html/htmlcell.h -+ ${wxroot}/include/wx/html/htmldefs.h -+ ${wxroot}/include/wx/html/htmlfilt.h -+ ${wxroot}/include/wx/html/htmlpars.h -+ ${wxroot}/include/wx/html/htmlproc.h -+ ${wxroot}/include/wx/html/htmltag.h -+ ${wxroot}/include/wx/html/htmlwin.h -+ ${wxroot}/include/wx/html/htmprint.h -+ ${wxroot}/include/wx/html/m_templ.h -+ ${wxroot}/include/wx/html/styleparams.h -+ ${wxroot}/include/wx/html/winpars.h -+ ) -+source_group("wxHTML Headers" FILES ${wxHTML_hdrs}) -+list(APPEND ${lib_name}_libsrcs ${wxHTML_hdrs}) -+######################## -+# wxHTML Sources -+set(wxHTML_srcs -+ ${wxroot}/src/html/chm.cpp -+ ${wxroot}/src/html/helpctrl.cpp -+ ${wxroot}/src/html/helpdata.cpp -+ ${wxroot}/src/html/helpdlg.cpp -+ ${wxroot}/src/html/helpfrm.cpp -+ ${wxroot}/src/html/helpwnd.cpp -+ ${wxroot}/src/html/htmlcell.cpp -+ ${wxroot}/src/html/htmlfilt.cpp -+ ${wxroot}/src/html/htmlpars.cpp -+ ${wxroot}/src/html/htmltag.cpp -+ ${wxroot}/src/html/htmlwin.cpp -+ ${wxroot}/src/html/htmprint.cpp -+ ${wxroot}/src/html/m_dflist.cpp -+ ${wxroot}/src/html/m_fonts.cpp -+ ${wxroot}/src/html/m_hline.cpp -+ ${wxroot}/src/html/m_image.cpp -+ ${wxroot}/src/html/m_layout.cpp -+ ${wxroot}/src/html/m_links.cpp -+ ${wxroot}/src/html/m_list.cpp -+ ${wxroot}/src/html/m_pre.cpp -+ ${wxroot}/src/html/m_span.cpp -+ ${wxroot}/src/html/m_style.cpp -+ ${wxroot}/src/html/m_tables.cpp -+ ${wxroot}/src/html/styleparams.cpp -+ ${wxroot}/src/html/winpars.cpp -+ ) -+source_group("wxHTML Sources" FILES ${wxHTML_srcs}) -+list(APPEND ${lib_name}_libsrcs ${wxHTML_srcs}) -+####################################### -+# library -+add_library(${lib_name} STATIC ${${lib_name}_libsrcs}) -+target_link_libraries(${lib_name} PUBLIC core) -+set_wxtarget_properties(${lib_name}) -diff --git a/media.cmake b/media.cmake -new file mode 100644 -index 0000000..024213f ---- /dev/null -+++ b/media.cmake -@@ -0,0 +1,50 @@ -+set(lib_name media) -+####################################### -+# library sources -+set(thisfile ${wxroot}/build/cmake/${lib_name}.cmake) -+source_group("" FILES ${thisfile}) -+list(APPEND ${lib_name}_libsrcs ${thisfile}) -+######################## -+# Common Headers -+set(Common_hdrs -+ ${wxroot}/include/wx/mediactrl.h -+ ) -+source_group("Common Headers" FILES ${Common_hdrs}) -+list(APPEND ${lib_name}_libsrcs ${Common_hdrs}) -+######################## -+# Common Sources -+set(Common_srcs -+ ${wxroot}/src/common/dummy.cpp -+ ${wxroot}/src/common/mediactrlcmn.cpp -+ ) -+source_group("Common Sources" FILES ${Common_srcs}) -+list(APPEND ${lib_name}_libsrcs ${Common_srcs}) -+######################## -+# MSW Headers -+set(MSW_hdrs -+ ${wxroot}/include/wx/msw/genrcdefs.h -+ ) -+source_group("MSW Headers" FILES ${MSW_hdrs}) -+list(APPEND ${lib_name}_libsrcs ${MSW_hdrs}) -+######################## -+# MSW Sources -+set(MSW_srcs -+ ${wxroot}/src/msw/mediactrl_am.cpp -+ ${wxroot}/src/msw/mediactrl_qt.cpp -+ ${wxroot}/src/msw/mediactrl_wmp10.cpp -+ #${wxroot}/src/msw/version.rc -+ ) -+source_group("MSW Sources" FILES ${MSW_srcs}) -+list(APPEND ${lib_name}_libsrcs ${MSW_srcs}) -+######################## -+# Setup Headers -+set(Setup_hdrs -+ ${wxroot}/include/wx/msw/setup.h -+ ) -+source_group("Setup Headers" FILES ${Setup_hdrs}) -+list(APPEND ${lib_name}_libsrcs ${Setup_hdrs}) -+####################################### -+# library -+add_library(${lib_name} STATIC ${${lib_name}_libsrcs}) -+target_link_libraries(${lib_name} PUBLIC core) -+set_wxtarget_properties(${lib_name}) -diff --git a/net.cmake b/net.cmake -new file mode 100644 -index 0000000..599e94d ---- /dev/null -+++ b/net.cmake -@@ -0,0 +1,69 @@ -+set(lib_name net) -+####################################### -+# library sources -+set(thisfile ${wxroot}/build/cmake/${lib_name}.cmake) -+source_group("" FILES ${thisfile}) -+list(APPEND ${lib_name}_libsrcs ${thisfile}) -+######################## -+# Common Headers -+set(Common_hdrs -+ ${wxroot}/include/wx/protocol/file.h -+ ${wxroot}/include/wx/fs_inet.h -+ ${wxroot}/include/wx/protocol/ftp.h -+ ${wxroot}/include/wx/protocol/http.h -+ ${wxroot}/include/wx/protocol/log.h -+ ${wxroot}/include/wx/protocol/protocol.h -+ ${wxroot}/include/wx/sckaddr.h -+ ${wxroot}/include/wx/sckipc.h -+ ${wxroot}/include/wx/sckstrm.h -+ ${wxroot}/include/wx/socket.h -+ ${wxroot}/include/wx/url.h -+ ) -+source_group("Common Headers" FILES ${Common_hdrs}) -+list(APPEND ${lib_name}_libsrcs ${Common_hdrs}) -+######################## -+# Common Sources -+set(Common_srcs -+ ${wxroot}/src/common/dummy.cpp -+ ${wxroot}/src/common/fs_inet.cpp -+ ${wxroot}/src/common/ftp.cpp -+ ${wxroot}/src/common/http.cpp -+ ${wxroot}/src/common/protocol.cpp -+ ${wxroot}/src/common/sckaddr.cpp -+ ${wxroot}/src/common/sckfile.cpp -+ ${wxroot}/src/common/sckipc.cpp -+ ${wxroot}/src/common/sckstrm.cpp -+ ${wxroot}/src/common/socket.cpp -+ ${wxroot}/src/common/url.cpp -+ ) -+source_group("Common Sources" FILES ${Common_srcs}) -+list(APPEND ${lib_name}_libsrcs ${Common_srcs}) -+######################## -+# MSW Headers -+set(MSW_hdrs -+ ${wxroot}/include/wx/msw/genrcdefs.h -+ ) -+source_group("MSW Headers" FILES ${MSW_hdrs}) -+list(APPEND ${lib_name}_libsrcs ${MSW_hdrs}) -+######################## -+# MSW Sources -+set(MSW_srcs -+ ${wxroot}/src/msw/sockmsw.cpp -+ ${wxroot}/src/msw/urlmsw.cpp -+ #${wxroot}/src/msw/version.rc -+ ) -+source_group("MSW Sources" FILES ${MSW_srcs}) -+list(APPEND ${lib_name}_libsrcs ${MSW_srcs}) -+######################## -+# Setup Headers -+set(Setup_hdrs -+ ${wxroot}/include/wx/msw/setup.h -+ ) -+source_group("Setup Headers" FILES ${Setup_hdrs}) -+list(APPEND ${lib_name}_libsrcs ${Setup_hdrs}) -+####################################### -+# library -+add_library(${lib_name} STATIC ${${lib_name}_libsrcs}) -+target_compile_definitions(${lib_name} PRIVATE wxUSE_GUI=0) -+target_link_libraries(${lib_name} PUBLIC base) -+set_wxtarget_properties(${lib_name}) -diff --git a/propgrid.cmake b/propgrid.cmake -new file mode 100644 -index 0000000..89dcd5d ---- /dev/null -+++ b/propgrid.cmake -@@ -0,0 +1,68 @@ -+set(lib_name propgrid) -+####################################### -+# library sources -+set(thisfile ${wxroot}/build/cmake/${lib_name}.cmake) -+source_group("" FILES ${thisfile}) -+list(APPEND ${lib_name}_libsrcs ${thisfile}) -+######################## -+# Common Headers -+set(Common_hdrs -+ ${wxroot}/include/wx/propgrid/advprops.h -+ ${wxroot}/include/wx/propgrid/editors.h -+ ${wxroot}/include/wx/propgrid/manager.h -+ ${wxroot}/include/wx/propgrid/property.h -+ ${wxroot}/include/wx/propgrid/propgrid.h -+ ${wxroot}/include/wx/propgrid/propgriddefs.h -+ ${wxroot}/include/wx/propgrid/propgridiface.h -+ ${wxroot}/include/wx/propgrid/propgridpagestate.h -+ ${wxroot}/include/wx/propgrid/props.h -+ ) -+source_group("Common Headers" FILES ${Common_hdrs}) -+list(APPEND ${lib_name}_libsrcs ${Common_hdrs}) -+######################## -+# Common Sources -+set(Common_srcs -+ ${wxroot}/src/common/dummy.cpp -+ ) -+source_group("Common Sources" FILES ${Common_srcs}) -+list(APPEND ${lib_name}_libsrcs ${Common_srcs}) -+######################## -+# MSW Headers -+set(MSW_hdrs -+ ${wxroot}/include/wx/msw/genrcdefs.h -+ ) -+source_group("MSW Headers" FILES ${MSW_hdrs}) -+list(APPEND ${lib_name}_libsrcs ${MSW_hdrs}) -+######################## -+# MSW Sources -+set(MSW_srcs -+ #${wxroot}/src/msw/version.rc -+ ) -+source_group("MSW Sources" FILES ${MSW_srcs}) -+list(APPEND ${lib_name}_libsrcs ${MSW_srcs}) -+######################## -+# Setup Headers -+set(Setup_hdrs -+ ${wxroot}/include/wx/msw/setup.h -+ ) -+source_group("Setup Headers" FILES ${Setup_hdrs}) -+list(APPEND ${lib_name}_libsrcs ${Setup_hdrs}) -+######################## -+# Source Files -+set(Source_srcs -+ ${wxroot}/src/propgrid/advprops.cpp -+ ${wxroot}/src/propgrid/editors.cpp -+ ${wxroot}/src/propgrid/manager.cpp -+ ${wxroot}/src/propgrid/property.cpp -+ ${wxroot}/src/propgrid/propgrid.cpp -+ ${wxroot}/src/propgrid/propgridiface.cpp -+ ${wxroot}/src/propgrid/propgridpagestate.cpp -+ ${wxroot}/src/propgrid/props.cpp -+ ) -+source_group("Source Files" FILES ${Source_srcs}) -+list(APPEND ${lib_name}_libsrcs ${Source_srcs}) -+####################################### -+# library -+add_library(${lib_name} STATIC ${${lib_name}_libsrcs}) -+target_link_libraries(${lib_name} PUBLIC adv) -+set_wxtarget_properties(${lib_name}) -diff --git a/qa.cmake b/qa.cmake -new file mode 100644 -index 0000000..e94fa84 ---- /dev/null -+++ b/qa.cmake -@@ -0,0 +1,54 @@ -+set(lib_name qa) -+####################################### -+# library sources -+set(thisfile ${wxroot}/build/cmake/${lib_name}.cmake) -+source_group("" FILES ${thisfile}) -+list(APPEND ${lib_name}_libsrcs ${thisfile}) -+######################## -+# Common Headers -+set(Common_hdrs -+ ${wxroot}/include/wx/debugrpt.h -+ ) -+source_group("Common Headers" FILES ${Common_hdrs}) -+list(APPEND ${lib_name}_libsrcs ${Common_hdrs}) -+######################## -+# Common Sources -+set(Common_srcs -+ ${wxroot}/src/common/debugrpt.cpp -+ ${wxroot}/src/common/dummy.cpp -+ ) -+source_group("Common Sources" FILES ${Common_srcs}) -+list(APPEND ${lib_name}_libsrcs ${Common_srcs}) -+######################## -+# Generic Sources -+set(Generic_srcs -+ ${wxroot}/src/generic/dbgrptg.cpp -+ ) -+source_group("Generic Sources" FILES ${Generic_srcs}) -+list(APPEND ${lib_name}_libsrcs ${Generic_srcs}) -+######################## -+# MSW Headers -+set(MSW_hdrs -+ ${wxroot}/include/wx/msw/genrcdefs.h -+ ) -+source_group("MSW Headers" FILES ${MSW_hdrs}) -+list(APPEND ${lib_name}_libsrcs ${MSW_hdrs}) -+######################## -+# MSW Sources -+set(MSW_srcs -+ #${wxroot}/src/msw/version.rc -+ ) -+source_group("MSW Sources" FILES ${MSW_srcs}) -+list(APPEND ${lib_name}_libsrcs ${MSW_srcs}) -+######################## -+# Setup Headers -+set(Setup_hdrs -+ ${wxroot}/include/wx/msw/setup.h -+ ) -+source_group("Setup Headers" FILES ${Setup_hdrs}) -+list(APPEND ${lib_name}_libsrcs ${Setup_hdrs}) -+####################################### -+# library -+add_library(${lib_name} STATIC ${${lib_name}_libsrcs}) -+target_link_libraries(${lib_name} PUBLIC core xml) -+set_wxtarget_properties(${lib_name}) -diff --git a/ribbon.cmake b/ribbon.cmake -new file mode 100644 -index 0000000..aff72e4 ---- /dev/null -+++ b/ribbon.cmake -@@ -0,0 +1,72 @@ -+set(lib_name ribbon) -+####################################### -+# library sources -+set(thisfile ${wxroot}/build/cmake/${lib_name}.cmake) -+source_group("" FILES ${thisfile}) -+list(APPEND ${lib_name}_libsrcs ${thisfile}) -+######################## -+# Common Headers -+set(Common_hdrs -+ ${wxroot}/include/wx/ribbon/art.h -+ ${wxroot}/include/wx/ribbon/art_internal.h -+ ${wxroot}/include/wx/ribbon/bar.h -+ ${wxroot}/include/wx/ribbon/buttonbar.h -+ ${wxroot}/include/wx/ribbon/control.h -+ ${wxroot}/include/wx/ribbon/gallery.h -+ ${wxroot}/include/wx/ribbon/page.h -+ ${wxroot}/include/wx/ribbon/panel.h -+ ${wxroot}/include/wx/ribbon/toolbar.h -+ ${wxroot}/include/wx/xrc/xh_ribbon.h -+ ) -+source_group("Common Headers" FILES ${Common_hdrs}) -+list(APPEND ${lib_name}_libsrcs ${Common_hdrs}) -+######################## -+# Common Sources -+set(Common_srcs -+ ${wxroot}/src/common/dummy.cpp -+ ) -+source_group("Common Sources" FILES ${Common_srcs}) -+list(APPEND ${lib_name}_libsrcs ${Common_srcs}) -+######################## -+# MSW Headers -+set(MSW_hdrs -+ ${wxroot}/include/wx/msw/genrcdefs.h -+ ) -+source_group("MSW Headers" FILES ${MSW_hdrs}) -+list(APPEND ${lib_name}_libsrcs ${MSW_hdrs}) -+######################## -+# MSW Sources -+set(MSW_srcs -+ #${wxroot}/src/msw/version.rc -+ ) -+source_group("MSW Sources" FILES ${MSW_srcs}) -+list(APPEND ${lib_name}_libsrcs ${MSW_srcs}) -+######################## -+# Setup Headers -+set(Setup_hdrs -+ ${wxroot}/include/wx/msw/setup.h -+ ) -+source_group("Setup Headers" FILES ${Setup_hdrs}) -+list(APPEND ${lib_name}_libsrcs ${Setup_hdrs}) -+######################## -+# Source Files -+set(Source_srcs -+ ${wxroot}/src/ribbon/art_aui.cpp -+ ${wxroot}/src/ribbon/art_internal.cpp -+ ${wxroot}/src/ribbon/art_msw.cpp -+ ${wxroot}/src/ribbon/bar.cpp -+ ${wxroot}/src/ribbon/buttonbar.cpp -+ ${wxroot}/src/ribbon/control.cpp -+ ${wxroot}/src/ribbon/gallery.cpp -+ ${wxroot}/src/ribbon/page.cpp -+ ${wxroot}/src/ribbon/panel.cpp -+ ${wxroot}/src/ribbon/toolbar.cpp -+ ${wxroot}/src/xrc/xh_ribbon.cpp -+ ) -+source_group("Source Files" FILES ${Source_srcs}) -+list(APPEND ${lib_name}_libsrcs ${Source_srcs}) -+####################################### -+# library -+add_library(${lib_name} STATIC ${${lib_name}_libsrcs}) -+target_link_libraries(${lib_name} PUBLIC core) -+set_wxtarget_properties(${lib_name}) -diff --git a/richtext.cmake b/richtext.cmake -new file mode 100644 -index 0000000..7ed1168 ---- /dev/null -+++ b/richtext.cmake -@@ -0,0 +1,85 @@ -+set(lib_name richtext) -+####################################### -+# library sources -+set(thisfile ${wxroot}/build/cmake/${lib_name}.cmake) -+source_group("" FILES ${thisfile}) -+list(APPEND ${lib_name}_libsrcs ${thisfile}) -+######################## -+# Common Headers -+set(Common_hdrs -+ ${wxroot}/include/wx/richtext/richtextbackgroundpage.h -+ ${wxroot}/include/wx/richtext/richtextborderspage.h -+ ${wxroot}/include/wx/richtext/richtextbuffer.h -+ ${wxroot}/include/wx/richtext/richtextbulletspage.h -+ ${wxroot}/include/wx/richtext/richtextctrl.h -+ ${wxroot}/include/wx/richtext/richtextdialogpage.h -+ ${wxroot}/include/wx/richtext/richtextfontpage.h -+ ${wxroot}/include/wx/richtext/richtextformatdlg.h -+ ${wxroot}/include/wx/richtext/richtexthtml.h -+ ${wxroot}/include/wx/richtext/richtextimagedlg.h -+ ${wxroot}/include/wx/richtext/richtextindentspage.h -+ ${wxroot}/include/wx/richtext/richtextliststylepage.h -+ ${wxroot}/include/wx/richtext/richtextmarginspage.h -+ ${wxroot}/include/wx/richtext/richtextprint.h -+ ${wxroot}/include/wx/richtext/richtextsizepage.h -+ ${wxroot}/include/wx/richtext/richtextstyledlg.h -+ ${wxroot}/include/wx/richtext/richtextstylepage.h -+ ${wxroot}/include/wx/richtext/richtextstyles.h -+ ${wxroot}/include/wx/richtext/richtextsymboldlg.h -+ ${wxroot}/include/wx/richtext/richtexttabspage.h -+ ${wxroot}/include/wx/richtext/richtextuicustomization.h -+ ${wxroot}/include/wx/richtext/richtextxml.h -+ ${wxroot}/include/wx/xrc/xh_richtext.h -+ ) -+source_group("Common Headers" FILES ${Common_hdrs}) -+list(APPEND ${lib_name}_libsrcs ${Common_hdrs}) -+######################## -+# Common Sources -+set(Common_srcs -+ ${wxroot}/src/common/dummy.cpp -+ ) -+source_group("Common Sources" FILES ${Common_srcs}) -+list(APPEND ${lib_name}_libsrcs ${Common_srcs}) -+######################## -+# MSW Headers -+set(MSW_hdrs -+ ${wxroot}/include/wx/msw/genrcdefs.h -+ ) -+source_group("MSW Headers" FILES ${MSW_hdrs}) -+list(APPEND ${lib_name}_libsrcs ${MSW_hdrs}) -+######################## -+# MSW Sources -+set(MSW_srcs -+ #${wxroot}/src/msw/version.rc -+ ) -+source_group("MSW Sources" FILES ${MSW_srcs}) -+list(APPEND ${lib_name}_libsrcs ${MSW_srcs}) -+######################## -+# Setup Headers -+set(Setup_hdrs -+ ${wxroot}/include/wx/msw/setup.h -+ ) -+source_group("Setup Headers" FILES ${Setup_hdrs}) -+list(APPEND ${lib_name}_libsrcs ${Setup_hdrs}) -+######################## -+# Source Files -+set(Source_srcs -+ ${wxroot}/src/richtext/richtextbuffer.cpp -+ ${wxroot}/src/richtext/richtextctrl.cpp -+ ${wxroot}/src/richtext/richtextformatdlg.cpp -+ ${wxroot}/src/richtext/richtexthtml.cpp -+ ${wxroot}/src/richtext/richtextimagedlg.cpp -+ ${wxroot}/src/richtext/richtextprint.cpp -+ ${wxroot}/src/richtext/richtextstyledlg.cpp -+ ${wxroot}/src/richtext/richtextstyles.cpp -+ ${wxroot}/src/richtext/richtextsymboldlg.cpp -+ ${wxroot}/src/richtext/richtextxml.cpp -+ ${wxroot}/src/xrc/xh_richtext.cpp -+ ) -+source_group("Source Files" FILES ${Source_srcs}) -+list(APPEND ${lib_name}_libsrcs ${Source_srcs}) -+####################################### -+# library -+add_library(${lib_name} STATIC ${${lib_name}_libsrcs}) -+target_link_libraries(${lib_name} PUBLIC adv html xml) -+set_wxtarget_properties(${lib_name}) -diff --git a/setup.h b/setup.h -new file mode 100644 -index 0000000..7ebaa17 ---- /dev/null -+++ b/setup.h -@@ -0,0 +1,17 @@ -+/* Filename: setup.h -+ * Description: This header is included by wxWidgets source code (your code -+ * shouldn't need to explicitly include this header). It includes the -+ * appropriate setup.h in the lib directory. -+ * Author: Scott M Anderson (aka smanders) -+ */ -+ -+#ifdef _MSC_VER -+# include -+# if wxCHECK_VERSION(3,1,0) -+# include "../../../../../lib/msw/wx-3.1/wx/setup.h" -+# else -+# error "This custom setup.h is specific to wx 3.1" -+# endif // wxCHECK_VERSION -+#else -+# error "This file should only be included when using Microsoft Visual C++" -+#endif // _MSC_VER -diff --git a/stc.cmake b/stc.cmake -new file mode 100644 -index 0000000..23bab98 ---- /dev/null -+++ b/stc.cmake -@@ -0,0 +1,56 @@ -+set(lib_name stc) -+####################################### -+# library sources -+set(thisfile ${wxroot}/build/cmake/${lib_name}.cmake) -+source_group("" FILES ${thisfile}) -+list(APPEND ${lib_name}_libsrcs ${thisfile}) -+######################## -+# Common Headers -+set(Common_hdrs -+ ${wxroot}/include/wx/stc/stc.h -+ ) -+source_group("Common Headers" FILES ${Common_hdrs}) -+list(APPEND ${lib_name}_libsrcs ${Common_hdrs}) -+######################## -+# Common Sources -+set(Common_srcs -+ ${wxroot}/src/common/dummy.cpp -+ ) -+source_group("Common Sources" FILES ${Common_srcs}) -+list(APPEND ${lib_name}_libsrcs ${Common_srcs}) -+######################## -+# MSW Headers -+set(MSW_hdrs -+ ${wxroot}/include/wx/msw/genrcdefs.h -+ ) -+source_group("MSW Headers" FILES ${MSW_hdrs}) -+list(APPEND ${lib_name}_libsrcs ${MSW_hdrs}) -+######################## -+# MSW Sources -+set(MSW_srcs -+ #${wxroot}/src/msw/version.rc -+ ) -+source_group("MSW Sources" FILES ${MSW_srcs}) -+list(APPEND ${lib_name}_libsrcs ${MSW_srcs}) -+######################## -+# Setup Headers -+set(Setup_hdrs -+ ${wxroot}/include/wx/msw/setup.h -+ ) -+source_group("Setup Headers" FILES ${Setup_hdrs}) -+list(APPEND ${lib_name}_libsrcs ${Setup_hdrs}) -+######################## -+# Source Files -+set(Source_srcs -+ ${wxroot}/src/stc/PlatWX.cpp -+ ${wxroot}/src/stc/ScintillaWX.cpp -+ ${wxroot}/src/stc/stc.cpp -+ ) -+source_group("Source Files" FILES ${Source_srcs}) -+list(APPEND ${lib_name}_libsrcs ${Source_srcs}) -+####################################### -+# library -+add_library(${lib_name} STATIC ${${lib_name}_libsrcs}) -+target_compile_definitions(${lib_name} PRIVATE __WX__ SCI_LEXER LINK_LEXERS) -+target_link_libraries(${lib_name} PUBLIC core PRIVATE wxscintilla) -+set_wxtarget_properties(${lib_name}) -diff --git a/webview.cmake b/webview.cmake -new file mode 100644 -index 0000000..41bf520 ---- /dev/null -+++ b/webview.cmake -@@ -0,0 +1,55 @@ -+set(lib_name webview) -+####################################### -+# library sources -+set(thisfile ${wxroot}/build/cmake/${lib_name}.cmake) -+source_group("" FILES ${thisfile}) -+list(APPEND ${lib_name}_libsrcs ${thisfile}) -+######################## -+# Common Headers -+set(Common_hdrs -+ ${wxroot}/include/wx/webview.h -+ ${wxroot}/include/wx/webviewarchivehandler.h -+ ${wxroot}/include/wx/webviewfshandler.h -+ ) -+source_group("Common Headers" FILES ${Common_hdrs}) -+list(APPEND ${lib_name}_libsrcs ${Common_hdrs}) -+######################## -+# Common Sources -+set(Common_srcs -+ ${wxroot}/src/common/dummy.cpp -+ ${wxroot}/src/common/webview.cpp -+ ${wxroot}/src/common/webviewarchivehandler.cpp -+ ${wxroot}/src/common/webviewfshandler.cpp -+ ) -+source_group("Common Sources" FILES ${Common_srcs}) -+list(APPEND ${lib_name}_libsrcs ${Common_srcs}) -+######################## -+# MSW Headers -+set(MSW_hdrs -+ ${wxroot}/include/wx/msw/genrcdefs.h -+ ${wxroot}/include/wx/msw/webview_ie.h -+ ${wxroot}/include/wx/msw/webview_missing.h -+ ${wxroot}/include/wx/msw/webviewhistoryitem_ie.h -+ ) -+source_group("MSW Headers" FILES ${MSW_hdrs}) -+list(APPEND ${lib_name}_libsrcs ${MSW_hdrs}) -+######################## -+# MSW Sources -+set(MSW_srcs -+ #${wxroot}/src/msw/version.rc -+ ${wxroot}/src/msw/webview_ie.cpp -+ ) -+source_group("MSW Sources" FILES ${MSW_srcs}) -+list(APPEND ${lib_name}_libsrcs ${MSW_srcs}) -+######################## -+# Setup Headers -+set(Setup_hdrs -+ ${wxroot}/include/wx/msw/setup.h -+ ) -+source_group("Setup Headers" FILES ${Setup_hdrs}) -+list(APPEND ${lib_name}_libsrcs ${Setup_hdrs}) -+####################################### -+# library -+add_library(${lib_name} STATIC ${${lib_name}_libsrcs}) -+target_link_libraries(${lib_name} PUBLIC core) -+set_wxtarget_properties(${lib_name}) -diff --git a/wx.cmake b/wx.cmake -new file mode 100644 -index 0000000..6c68c8c ---- /dev/null -+++ b/wx.cmake -@@ -0,0 +1,164 @@ -+set(wxroot ${CMAKE_SOURCE_DIR}) -+set(CMAKE_MODULE_PATH ${wxroot}/build/cmake ${CMAKE_MODULE_PATH}) -+include(GNUInstallDirs) -+include(xpflags) -+set_property(GLOBAL PROPERTY USE_FOLDERS ON) # enables MSVC Solution Folders -+add_definitions(-D_LIB) -+# reset any postfix setting done previously -+set(CMAKE_DEBUG_POSTFIX) -+set(CMAKE_RELEASE_POSTFIX) -+set(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}) -+string(REGEX REPLACE "include/wx-([0-9]*).([0-9]*)$" "\\1.\\2" wxDotVer ${CMAKE_INSTALL_INCLUDEDIR}) -+if(wxDotVer STREQUAL CMAKE_INSTALL_INCLUDEDIR) -+ set(wxDotVer 0.0) # default CMAKE_INSTALL_INCLUDEDIR, not passed in, or doesn't include wx-X.X -+endif() -+string(REGEX REPLACE "([0-9])\\.([0-9])?" "\\1\\2" wxVer ${wxDotVer}) -+####################################### -+# setup.h -+set(wxsetup ${wxroot}/include/wx/msw/setup.h) -+if(NOT EXISTS ${LIBRARY_OUTPUT_PATH}/wx) -+ execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory ${LIBRARY_OUTPUT_PATH}/wx) -+endif() -+execute_process(COMMAND ${CMAKE_COMMAND} -E copy_if_different ${wxsetup} ${LIBRARY_OUTPUT_PATH}/wx) -+####################################### -+# set_wx_target_properties function -+# @param[in] target : cmake target -+function(set_wxtarget_properties target) -+ if(MSVC) -+ set(toolset vc) -+ set(wxbasename wxmsw) -+ else() -+ set(toolset cc) -+ set(wxbasename wxcc) -+ endif() -+ if(COMMAND xpGetCompilerPrefix) -+ xpGetCompilerPrefix(toolset) -+ endif() -+ set(unicode u) -+ if(XP_BUILD_STATIC_RT) # from wxflags.cmake include, xpCommonFlags, xpopts.cmake -+ set(static s) -+ endif() -+ if(${target} MATCHES "base") -+ set_property(TARGET ${target} PROPERTY FOLDER wxbase_libs) -+ set_target_properties(${target} PROPERTIES -+ OUTPUT_NAME wxbase${wxVer}${toolset}${unicode}${static}x -+ DEBUG_OUTPUT_NAME wxbase${wxVer}${toolset}${unicode}${static}d -+ RELEASE_OUTPUT_NAME wxbase${wxVer}${toolset}${unicode}${static} -+ COMPILE_FLAGS /W4 -+ ) -+ install(FILES ${wxsetup} DESTINATION ${CMAKE_INSTALL_LIBDIR}/msw/wx-${wxDotVer}/wx) -+ elseif(${target} MATCHES "net" OR ${target} MATCHES "xml") -+ set_property(TARGET ${target} PROPERTY FOLDER wxbase_libs) -+ set_target_properties(${target} PROPERTIES -+ OUTPUT_NAME wxbase${wxVer}${toolset}${unicode}${static}x_${target} -+ DEBUG_OUTPUT_NAME wxbase${wxVer}${toolset}${unicode}${static}d_${target} -+ RELEASE_OUTPUT_NAME wxbase${wxVer}${toolset}${unicode}${static}_${target} -+ COMPILE_FLAGS /W4 -+ ) -+ elseif(${target} MATCHES "^wx") # any target that starts with "wx" -+ get_target_property(_defs ${target} COMPILE_DEFINITIONS) -+ list(FIND _defs UNICODE isUnicode) -+ if(NOT isUnicode EQUAL -1) -+ set(unicode u) -+ else() -+ set(unicode "") -+ endif() -+ set_property(TARGET ${target} PROPERTY FOLDER wxthirdparty_libs) -+ set_target_properties(${target} PROPERTIES -+ OUTPUT_NAME ${target}${wxVer}_${toolset}${unicode}${static}x -+ DEBUG_OUTPUT_NAME ${target}${wxVer}_${toolset}${unicode}${static}d -+ RELEASE_OUTPUT_NAME ${target}${wxVer}_${toolset}${unicode}${static} -+ COMPILE_FLAGS /W1 -+ ) -+ else() -+ set_property(TARGET ${target} PROPERTY FOLDER ${wxbasename}_libs) -+ set_target_properties(${target} PROPERTIES -+ OUTPUT_NAME ${wxbasename}${wxVer}${toolset}${unicode}${static}x_${target} -+ DEBUG_OUTPUT_NAME ${wxbasename}${wxVer}${toolset}${unicode}${static}d_${target} -+ RELEASE_OUTPUT_NAME ${wxbasename}${wxVer}${toolset}${unicode}${static}_${target} -+ COMPILE_FLAGS /W4 -+ ) -+ endif() -+ # NOTE: It appears /MACHINE needs to be specified if target has an .rc -+ if(MSVC AND CMAKE_SIZEOF_VOID_P EQUAL 8) # 64-bit -+ # http://public.kitware.com/Bug/view.php?id=11240 -+ set_target_properties(${target} PROPERTIES STATIC_LIBRARY_FLAGS "/MACHINE:X64") -+ elseif(MSVC) -+ # MSVC defaults to X86, but specifying it here avoids a link warning (LNK4068) -+ set_target_properties(${target} PROPERTIES STATIC_LIBRARY_FLAGS "/MACHINE:X86") -+ endif() -+ target_include_directories(${target} PUBLIC $) -+ if(MSVC) -+ target_include_directories(${target} PUBLIC $) -+ target_compile_definitions(${target} PUBLIC $) -+ endif() -+ install(TARGETS ${lib_name} EXPORT ${PROJECT_NAME}-targets -+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} -+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} -+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} -+ ) -+endfunction() -+####################################### -+# wx libraries -+# NOTE: ordered by library dependencies -+# see http://docs.wxwidgets.org/3.1.1/page_libs.html -+set(wxlibs -+ wxexpat -+ wxjpeg -+ wxpng -+ wxregex -+ wxscintilla -+ wxtiff -+ wxzlib -+ #### -+ base -+ #### -+ net -+ xml -+ core -+ #### -+ adv -+ gl -+ html -+ media -+ ribbon -+ stc -+ webview -+ #### -+ aui -+ propgrid -+ qa -+ richtext -+ xrc -+ ) -+foreach(lib ${wxlibs}) -+ include(${lib}) -+endforeach() -+####################################### -+# wx headers -+file(GLOB wxhdrs ${wxroot}/include/wx/*.h) -+file(GLOB wxcpps ${wxroot}/include/wx/*.cpp) -+install(DIRECTORY -+ ${wxroot}/include/wx/aui -+ ${wxroot}/include/wx/generic -+ ${wxroot}/include/wx/html -+ ${wxroot}/include/wx/meta -+ ${wxroot}/include/wx/msw -+ ${wxroot}/include/wx/persist -+ ${wxroot}/include/wx/propgrid -+ ${wxroot}/include/wx/protocol -+ ${wxroot}/include/wx/ribbon -+ ${wxroot}/include/wx/richtext -+ ${wxroot}/include/wx/stc -+ ${wxroot}/include/wx/xml -+ ${wxroot}/include/wx/xrc -+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/wx -+ PATTERN ".cvsignore" EXCLUDE -+ ) -+install(FILES ${wxhdrs} ${wxcpps} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/wx) -+set(customsetuph ${wxroot}/build/cmake/setup.h) -+install(FILES ${customsetuph} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/wx/msvc/wx) -+if(NOT DEFINED XP_INSTALL_CMAKEDIR) -+ set(XP_INSTALL_CMAKEDIR ${CMAKE_INSTALL_DATADIR}/cmake) -+endif() -+install(EXPORT ${PROJECT_NAME}-targets DESTINATION ${XP_INSTALL_CMAKEDIR} NAMESPACE wx::) -diff --git a/wxexpat.cmake b/wxexpat.cmake -new file mode 100644 -index 0000000..afcea3c ---- /dev/null -+++ b/wxexpat.cmake -@@ -0,0 +1,23 @@ -+set(lib_name wxexpat) -+####################################### -+# library sources -+set(thisfile ${wxroot}/build/cmake/${lib_name}.cmake) -+source_group("" FILES ${thisfile}) -+list(APPEND ${lib_name}_libsrcs ${thisfile}) -+######################## -+# Source Files -+set(Source_srcs -+ ${wxroot}/src/expat/lib/xmlparse.c -+ ${wxroot}/src/expat/lib/xmlrole.c -+ ${wxroot}/src/expat/lib/xmltok.c -+ ) -+source_group("Source Files" FILES ${Source_srcs}) -+list(APPEND ${lib_name}_libsrcs ${Source_srcs}) -+####################################### -+# library -+add_library(${lib_name} STATIC ${${lib_name}_libsrcs}) -+target_include_directories(${lib_name} PUBLIC $ -+ PRIVATE ${wxroot}/src/expat -+ ) -+target_compile_definitions(${lib_name} PRIVATE COMPILED_FROM_DSP) -+set_wxtarget_properties(${lib_name}) -diff --git a/wxjpeg.cmake b/wxjpeg.cmake -new file mode 100644 -index 0000000..1da11ea ---- /dev/null -+++ b/wxjpeg.cmake -@@ -0,0 +1,63 @@ -+set(lib_name wxjpeg) -+####################################### -+# library sources -+set(thisfile ${wxroot}/build/cmake/${lib_name}.cmake) -+source_group("" FILES ${thisfile}) -+list(APPEND ${lib_name}_libsrcs ${thisfile}) -+######################## -+# Source Files -+set(Source_srcs -+ ${wxroot}/src/jpeg/jcapimin.c -+ ${wxroot}/src/jpeg/jcapistd.c -+ ${wxroot}/src/jpeg/jccoefct.c -+ ${wxroot}/src/jpeg/jccolor.c -+ ${wxroot}/src/jpeg/jcdctmgr.c -+ ${wxroot}/src/jpeg/jchuff.c -+ ${wxroot}/src/jpeg/jcinit.c -+ ${wxroot}/src/jpeg/jcmainct.c -+ ${wxroot}/src/jpeg/jcmarker.c -+ ${wxroot}/src/jpeg/jcmaster.c -+ ${wxroot}/src/jpeg/jcomapi.c -+ ${wxroot}/src/jpeg/jcparam.c -+ ${wxroot}/src/jpeg/jcphuff.c -+ ${wxroot}/src/jpeg/jcprepct.c -+ ${wxroot}/src/jpeg/jcsample.c -+ ${wxroot}/src/jpeg/jctrans.c -+ ${wxroot}/src/jpeg/jdapimin.c -+ ${wxroot}/src/jpeg/jdapistd.c -+ ${wxroot}/src/jpeg/jdatadst.c -+ ${wxroot}/src/jpeg/jdatasrc.c -+ ${wxroot}/src/jpeg/jdcoefct.c -+ ${wxroot}/src/jpeg/jdcolor.c -+ ${wxroot}/src/jpeg/jddctmgr.c -+ ${wxroot}/src/jpeg/jdhuff.c -+ ${wxroot}/src/jpeg/jdinput.c -+ ${wxroot}/src/jpeg/jdmainct.c -+ ${wxroot}/src/jpeg/jdmarker.c -+ ${wxroot}/src/jpeg/jdmaster.c -+ ${wxroot}/src/jpeg/jdmerge.c -+ ${wxroot}/src/jpeg/jdphuff.c -+ ${wxroot}/src/jpeg/jdpostct.c -+ ${wxroot}/src/jpeg/jdsample.c -+ ${wxroot}/src/jpeg/jdtrans.c -+ ${wxroot}/src/jpeg/jerror.c -+ ${wxroot}/src/jpeg/jfdctflt.c -+ ${wxroot}/src/jpeg/jfdctfst.c -+ ${wxroot}/src/jpeg/jfdctint.c -+ ${wxroot}/src/jpeg/jidctflt.c -+ ${wxroot}/src/jpeg/jidctfst.c -+ ${wxroot}/src/jpeg/jidctint.c -+ ${wxroot}/src/jpeg/jidctred.c -+ ${wxroot}/src/jpeg/jmemmgr.c -+ ${wxroot}/src/jpeg/jmemnobs.c -+ ${wxroot}/src/jpeg/jquant1.c -+ ${wxroot}/src/jpeg/jquant2.c -+ ${wxroot}/src/jpeg/jutils.c -+ ) -+source_group("Source Files" FILES ${Source_srcs}) -+list(APPEND ${lib_name}_libsrcs ${Source_srcs}) -+####################################### -+# library -+add_library(${lib_name} STATIC ${${lib_name}_libsrcs}) -+target_include_directories(${lib_name} PUBLIC $) -+set_wxtarget_properties(${lib_name}) -diff --git a/wxpng.cmake b/wxpng.cmake -new file mode 100644 -index 0000000..7cec8be ---- /dev/null -+++ b/wxpng.cmake -@@ -0,0 +1,33 @@ -+set(lib_name wxpng) -+####################################### -+# library sources -+set(thisfile ${wxroot}/build/cmake/${lib_name}.cmake) -+source_group("" FILES ${thisfile}) -+list(APPEND ${lib_name}_libsrcs ${thisfile}) -+######################## -+# Source Files -+set(Source_srcs -+ ${wxroot}/src/png/png.c -+ ${wxroot}/src/png/pngerror.c -+ ${wxroot}/src/png/pngget.c -+ ${wxroot}/src/png/pngmem.c -+ ${wxroot}/src/png/pngpread.c -+ ${wxroot}/src/png/pngread.c -+ ${wxroot}/src/png/pngrio.c -+ ${wxroot}/src/png/pngrtran.c -+ ${wxroot}/src/png/pngrutil.c -+ ${wxroot}/src/png/pngset.c -+ ${wxroot}/src/png/pngtrans.c -+ ${wxroot}/src/png/pngwio.c -+ ${wxroot}/src/png/pngwrite.c -+ ${wxroot}/src/png/pngwtran.c -+ ${wxroot}/src/png/pngwutil.c -+ ) -+source_group("Source Files" FILES ${Source_srcs}) -+list(APPEND ${lib_name}_libsrcs ${Source_srcs}) -+####################################### -+# library -+add_library(${lib_name} STATIC ${${lib_name}_libsrcs}) -+target_include_directories(${lib_name} PUBLIC $) -+target_link_libraries(${lib_name} PRIVATE wxzlib) -+set_wxtarget_properties(${lib_name}) -diff --git a/wxregex.cmake b/wxregex.cmake -new file mode 100644 -index 0000000..c54ed94 ---- /dev/null -+++ b/wxregex.cmake -@@ -0,0 +1,32 @@ -+set(lib_name wxregex) -+####################################### -+# library sources -+set(thisfile ${wxroot}/build/cmake/${lib_name}.cmake) -+source_group("" FILES ${thisfile}) -+list(APPEND ${lib_name}_libsrcs ${thisfile}) -+######################## -+# Header Files -+set(Header_srcs -+ ${wxroot}/include/wx/msw/genrcdefs.h -+ ${wxroot}/include/wx/msw/setup.h -+ ) -+source_group("Header Files" FILES ${Header_srcs}) -+list(APPEND ${lib_name}_libsrcs ${Header_srcs}) -+######################## -+# Source Files -+set(Source_srcs -+ ${wxroot}/src/regex/regcomp.c -+ ${wxroot}/src/regex/regerror.c -+ ${wxroot}/src/regex/regexec.c -+ ${wxroot}/src/regex/regfree.c -+ ) -+source_group("Source Files" FILES ${Source_srcs}) -+list(APPEND ${lib_name}_libsrcs ${Source_srcs}) -+####################################### -+# library -+add_library(${lib_name} STATIC ${${lib_name}_libsrcs}) -+target_compile_definitions(${lib_name} PRIVATE __WXMSW__ UNICODE _UNICODE) -+target_include_directories(${lib_name} PUBLIC $ -+ PRIVATE ${wxroot}/include ${LIBRARY_OUTPUT_PATH} # find setup.h -+ ) -+set_wxtarget_properties(${lib_name}) -diff --git a/wxscintilla.cmake b/wxscintilla.cmake -new file mode 100644 -index 0000000..02cbe5e ---- /dev/null -+++ b/wxscintilla.cmake -@@ -0,0 +1,165 @@ -+set(lib_name wxscintilla) -+####################################### -+# library sources -+set(thisfile ${wxroot}/build/cmake/${lib_name}.cmake) -+source_group("" FILES ${thisfile}) -+list(APPEND ${lib_name}_libsrcs ${thisfile}) -+######################## -+# Header Files -+set(Header_srcs -+ ${wxroot}/include/wx/msw/genrcdefs.h -+ ${wxroot}/include/wx/msw/setup.h -+ ) -+source_group("Header Files" FILES ${Header_srcs}) -+list(APPEND ${lib_name}_libsrcs ${Header_srcs}) -+######################## -+# Source Files -+set(Source_srcs -+ ${wxroot}/src/stc/scintilla/lexlib/Accessor.cxx -+ ${wxroot}/src/stc/scintilla/src/AutoComplete.cxx -+ ${wxroot}/src/stc/scintilla/src/CallTip.cxx -+ ${wxroot}/src/stc/scintilla/src/CaseConvert.cxx -+ ${wxroot}/src/stc/scintilla/src/CaseFolder.cxx -+ ${wxroot}/src/stc/scintilla/src/Catalogue.cxx -+ ${wxroot}/src/stc/scintilla/src/CellBuffer.cxx -+ ${wxroot}/src/stc/scintilla/lexlib/CharacterCategory.cxx -+ ${wxroot}/src/stc/scintilla/lexlib/CharacterSet.cxx -+ ${wxroot}/src/stc/scintilla/src/CharClassify.cxx -+ ${wxroot}/src/stc/scintilla/src/ContractionState.cxx -+ ${wxroot}/src/stc/scintilla/src/Decoration.cxx -+ ${wxroot}/src/stc/scintilla/src/Document.cxx -+ ${wxroot}/src/stc/scintilla/src/EditModel.cxx -+ ${wxroot}/src/stc/scintilla/src/Editor.cxx -+ ${wxroot}/src/stc/scintilla/src/EditView.cxx -+ ${wxroot}/src/stc/scintilla/src/ExternalLexer.cxx -+ ${wxroot}/src/stc/scintilla/src/Indicator.cxx -+ ${wxroot}/src/stc/scintilla/src/KeyMap.cxx -+ ${wxroot}/src/stc/scintilla/lexers/LexA68k.cxx -+ ${wxroot}/src/stc/scintilla/lexers/LexAbaqus.cxx -+ ${wxroot}/src/stc/scintilla/lexers/LexAda.cxx -+ ${wxroot}/src/stc/scintilla/lexers/LexAPDL.cxx -+ ${wxroot}/src/stc/scintilla/lexers/LexAsm.cxx -+ ${wxroot}/src/stc/scintilla/lexers/LexAsn1.cxx -+ ${wxroot}/src/stc/scintilla/lexers/LexASY.cxx -+ ${wxroot}/src/stc/scintilla/lexers/LexAU3.cxx -+ ${wxroot}/src/stc/scintilla/lexers/LexAVE.cxx -+ ${wxroot}/src/stc/scintilla/lexers/LexAVS.cxx -+ ${wxroot}/src/stc/scintilla/lexers/LexBaan.cxx -+ ${wxroot}/src/stc/scintilla/lexers/LexBash.cxx -+ ${wxroot}/src/stc/scintilla/lexers/LexBasic.cxx -+ ${wxroot}/src/stc/scintilla/lexers/LexBibTeX.cxx -+ ${wxroot}/src/stc/scintilla/lexers/LexBullant.cxx -+ ${wxroot}/src/stc/scintilla/lexers/LexCaml.cxx -+ ${wxroot}/src/stc/scintilla/lexers/LexCLW.cxx -+ ${wxroot}/src/stc/scintilla/lexers/LexCmake.cxx -+ ${wxroot}/src/stc/scintilla/lexers/LexCOBOL.cxx -+ ${wxroot}/src/stc/scintilla/lexers/LexCoffeeScript.cxx -+ ${wxroot}/src/stc/scintilla/lexers/LexConf.cxx -+ ${wxroot}/src/stc/scintilla/lexers/LexCPP.cxx -+ ${wxroot}/src/stc/scintilla/lexers/LexCrontab.cxx -+ ${wxroot}/src/stc/scintilla/lexers/LexCsound.cxx -+ ${wxroot}/src/stc/scintilla/lexers/LexCSS.cxx -+ ${wxroot}/src/stc/scintilla/lexers/LexD.cxx -+ ${wxroot}/src/stc/scintilla/lexers/LexDMAP.cxx -+ ${wxroot}/src/stc/scintilla/lexers/LexDMIS.cxx -+ ${wxroot}/src/stc/scintilla/lexers/LexECL.cxx -+ ${wxroot}/src/stc/scintilla/lexers/LexEiffel.cxx -+ ${wxroot}/src/stc/scintilla/lexlib/LexerBase.cxx -+ ${wxroot}/src/stc/scintilla/lexers/LexErlang.cxx -+ ${wxroot}/src/stc/scintilla/lexlib/LexerModule.cxx -+ ${wxroot}/src/stc/scintilla/lexlib/LexerNoExceptions.cxx -+ ${wxroot}/src/stc/scintilla/lexlib/LexerSimple.cxx -+ ${wxroot}/src/stc/scintilla/lexers/LexEScript.cxx -+ ${wxroot}/src/stc/scintilla/lexers/LexFlagship.cxx -+ ${wxroot}/src/stc/scintilla/lexers/LexForth.cxx -+ ${wxroot}/src/stc/scintilla/lexers/LexFortran.cxx -+ ${wxroot}/src/stc/scintilla/lexers/LexGAP.cxx -+ ${wxroot}/src/stc/scintilla/lexers/LexGui4Cli.cxx -+ ${wxroot}/src/stc/scintilla/lexers/LexHaskell.cxx -+ ${wxroot}/src/stc/scintilla/lexers/LexHex.cxx -+ ${wxroot}/src/stc/scintilla/lexers/LexHTML.cxx -+ ${wxroot}/src/stc/scintilla/lexers/LexInno.cxx -+ ${wxroot}/src/stc/scintilla/lexers/LexKix.cxx -+ ${wxroot}/src/stc/scintilla/lexers/LexKVIrc.cxx -+ ${wxroot}/src/stc/scintilla/lexers/LexLaTeX.cxx -+ ${wxroot}/src/stc/scintilla/lexers/LexLisp.cxx -+ ${wxroot}/src/stc/scintilla/lexers/LexLout.cxx -+ ${wxroot}/src/stc/scintilla/lexers/LexLua.cxx -+ ${wxroot}/src/stc/scintilla/lexers/LexMagik.cxx -+ ${wxroot}/src/stc/scintilla/lexers/LexMarkdown.cxx -+ ${wxroot}/src/stc/scintilla/lexers/LexMatlab.cxx -+ ${wxroot}/src/stc/scintilla/lexers/LexMetapost.cxx -+ ${wxroot}/src/stc/scintilla/lexers/LexMMIXAL.cxx -+ ${wxroot}/src/stc/scintilla/lexers/LexModula.cxx -+ ${wxroot}/src/stc/scintilla/lexers/LexMPT.cxx -+ ${wxroot}/src/stc/scintilla/lexers/LexMSSQL.cxx -+ ${wxroot}/src/stc/scintilla/lexers/LexMySQL.cxx -+ ${wxroot}/src/stc/scintilla/lexers/LexNimrod.cxx -+ ${wxroot}/src/stc/scintilla/lexers/LexNsis.cxx -+ ${wxroot}/src/stc/scintilla/lexers/LexOpal.cxx -+ ${wxroot}/src/stc/scintilla/lexers/LexOScript.cxx -+ ${wxroot}/src/stc/scintilla/lexers/LexOthers.cxx -+ ${wxroot}/src/stc/scintilla/lexers/LexPascal.cxx -+ ${wxroot}/src/stc/scintilla/lexers/LexPB.cxx -+ ${wxroot}/src/stc/scintilla/lexers/LexPerl.cxx -+ ${wxroot}/src/stc/scintilla/lexers/LexPLM.cxx -+ ${wxroot}/src/stc/scintilla/lexers/LexPO.cxx -+ ${wxroot}/src/stc/scintilla/lexers/LexPOV.cxx -+ ${wxroot}/src/stc/scintilla/lexers/LexPowerPro.cxx -+ ${wxroot}/src/stc/scintilla/lexers/LexPowerShell.cxx -+ ${wxroot}/src/stc/scintilla/lexers/LexProgress.cxx -+ ${wxroot}/src/stc/scintilla/lexers/LexPS.cxx -+ ${wxroot}/src/stc/scintilla/lexers/LexPython.cxx -+ ${wxroot}/src/stc/scintilla/lexers/LexR.cxx -+ ${wxroot}/src/stc/scintilla/lexers/LexRebol.cxx -+ ${wxroot}/src/stc/scintilla/lexers/LexRegistry.cxx -+ ${wxroot}/src/stc/scintilla/lexers/LexRuby.cxx -+ ${wxroot}/src/stc/scintilla/lexers/LexRust.cxx -+ ${wxroot}/src/stc/scintilla/lexers/LexScriptol.cxx -+ ${wxroot}/src/stc/scintilla/lexers/LexSmalltalk.cxx -+ ${wxroot}/src/stc/scintilla/lexers/LexSML.cxx -+ ${wxroot}/src/stc/scintilla/lexers/LexSorcus.cxx -+ ${wxroot}/src/stc/scintilla/lexers/LexSpecman.cxx -+ ${wxroot}/src/stc/scintilla/lexers/LexSpice.cxx -+ ${wxroot}/src/stc/scintilla/lexers/LexSQL.cxx -+ ${wxroot}/src/stc/scintilla/lexers/LexSTTXT.cxx -+ ${wxroot}/src/stc/scintilla/lexers/LexTACL.cxx -+ ${wxroot}/src/stc/scintilla/lexers/LexTADS3.cxx -+ ${wxroot}/src/stc/scintilla/lexers/LexTAL.cxx -+ ${wxroot}/src/stc/scintilla/lexers/LexTCL.cxx -+ ${wxroot}/src/stc/scintilla/lexers/LexTCMD.cxx -+ ${wxroot}/src/stc/scintilla/lexers/LexTeX.cxx -+ ${wxroot}/src/stc/scintilla/lexers/LexTxt2tags.cxx -+ ${wxroot}/src/stc/scintilla/lexers/LexVB.cxx -+ ${wxroot}/src/stc/scintilla/lexers/LexVerilog.cxx -+ ${wxroot}/src/stc/scintilla/lexers/LexVHDL.cxx -+ ${wxroot}/src/stc/scintilla/lexers/LexVisualProlog.cxx -+ ${wxroot}/src/stc/scintilla/lexers/LexYAML.cxx -+ ${wxroot}/src/stc/scintilla/src/LineMarker.cxx -+ ${wxroot}/src/stc/scintilla/src/MarginView.cxx -+ ${wxroot}/src/stc/scintilla/src/PerLine.cxx -+ ${wxroot}/src/stc/scintilla/src/PositionCache.cxx -+ ${wxroot}/src/stc/scintilla/lexlib/PropSetSimple.cxx -+ ${wxroot}/src/stc/scintilla/src/RESearch.cxx -+ ${wxroot}/src/stc/scintilla/src/RunStyles.cxx -+ ${wxroot}/src/stc/scintilla/src/ScintillaBase.cxx -+ ${wxroot}/src/stc/scintilla/src/Selection.cxx -+ ${wxroot}/src/stc/scintilla/src/Style.cxx -+ ${wxroot}/src/stc/scintilla/lexlib/StyleContext.cxx -+ ${wxroot}/src/stc/scintilla/src/UniConversion.cxx -+ ${wxroot}/src/stc/scintilla/src/ViewStyle.cxx -+ ${wxroot}/src/stc/scintilla/lexlib/WordList.cxx -+ ${wxroot}/src/stc/scintilla/src/XPM.cxx -+ ) -+source_group("Source Files" FILES ${Source_srcs}) -+list(APPEND ${lib_name}_libsrcs ${Source_srcs}) -+####################################### -+# library -+add_library(${lib_name} STATIC ${${lib_name}_libsrcs}) -+target_compile_definitions(${lib_name} PRIVATE SCI_LEXER LINK_LEXERS __WXMSW__) -+target_include_directories(${lib_name} PUBLIC -+ $ -+ $ -+ $ -+ ) -+set_wxtarget_properties(${lib_name}) -diff --git a/wxtiff.cmake b/wxtiff.cmake -new file mode 100644 -index 0000000..48b7f37 ---- /dev/null -+++ b/wxtiff.cmake -@@ -0,0 +1,54 @@ -+set(lib_name wxtiff) -+####################################### -+# library sources -+set(thisfile ${wxroot}/build/cmake/${lib_name}.cmake) -+source_group("" FILES ${thisfile}) -+list(APPEND ${lib_name}_libsrcs ${thisfile}) -+######################## -+# Source Files -+set(Source_srcs -+ ${wxroot}/src/tiff/libtiff/tif_aux.c -+ ${wxroot}/src/tiff/libtiff/tif_close.c -+ ${wxroot}/src/tiff/libtiff/tif_codec.c -+ ${wxroot}/src/tiff/libtiff/tif_color.c -+ ${wxroot}/src/tiff/libtiff/tif_compress.c -+ ${wxroot}/src/tiff/libtiff/tif_dir.c -+ ${wxroot}/src/tiff/libtiff/tif_dirinfo.c -+ ${wxroot}/src/tiff/libtiff/tif_dirread.c -+ ${wxroot}/src/tiff/libtiff/tif_dirwrite.c -+ ${wxroot}/src/tiff/libtiff/tif_dumpmode.c -+ ${wxroot}/src/tiff/libtiff/tif_error.c -+ ${wxroot}/src/tiff/libtiff/tif_extension.c -+ ${wxroot}/src/tiff/libtiff/tif_fax3.c -+ ${wxroot}/src/tiff/libtiff/tif_fax3sm.c -+ ${wxroot}/src/tiff/libtiff/tif_flush.c -+ ${wxroot}/src/tiff/libtiff/tif_getimage.c -+ ${wxroot}/src/tiff/libtiff/tif_jpeg.c -+ ${wxroot}/src/tiff/libtiff/tif_luv.c -+ ${wxroot}/src/tiff/libtiff/tif_lzw.c -+ ${wxroot}/src/tiff/libtiff/tif_next.c -+ ${wxroot}/src/tiff/libtiff/tif_ojpeg.c -+ ${wxroot}/src/tiff/libtiff/tif_open.c -+ ${wxroot}/src/tiff/libtiff/tif_packbits.c -+ ${wxroot}/src/tiff/libtiff/tif_pixarlog.c -+ ${wxroot}/src/tiff/libtiff/tif_predict.c -+ ${wxroot}/src/tiff/libtiff/tif_print.c -+ ${wxroot}/src/tiff/libtiff/tif_read.c -+ ${wxroot}/src/tiff/libtiff/tif_strip.c -+ ${wxroot}/src/tiff/libtiff/tif_swab.c -+ ${wxroot}/src/tiff/libtiff/tif_thunder.c -+ ${wxroot}/src/tiff/libtiff/tif_tile.c -+ ${wxroot}/src/tiff/libtiff/tif_version.c -+ ${wxroot}/src/tiff/libtiff/tif_warning.c -+ ${wxroot}/src/tiff/libtiff/tif_win32.c -+ ${wxroot}/src/tiff/libtiff/tif_write.c -+ ${wxroot}/src/tiff/libtiff/tif_zip.c -+ ) -+source_group("Source Files" FILES ${Source_srcs}) -+list(APPEND ${lib_name}_libsrcs ${Source_srcs}) -+####################################### -+# library -+add_library(${lib_name} STATIC ${${lib_name}_libsrcs}) -+target_include_directories(${lib_name} PUBLIC $) -+target_link_libraries(${lib_name} PRIVATE wxjpeg wxzlib) -+set_wxtarget_properties(${lib_name}) -diff --git a/wxwidgets-targets.cmake b/wxwidgets-targets.cmake -new file mode 100644 -index 0000000..df3c201 ---- /dev/null -+++ b/wxwidgets-targets.cmake -@@ -0,0 +1,152 @@ -+# wx_all_libs: list of all wx libraries, must be defined before including this file -+if(UNIX) -+ # compute the installation prefix relative to this file -+ get_filename_component(_IMPORT_PREFIX "${CMAKE_CURRENT_LIST_FILE}" PATH) -+ while(NOT EXISTS ${_IMPORT_PREFIX}/bin/wx-config) -+ get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH) -+ if(_IMPORT_PREFIX STREQUAL "/") -+ message(FATAL_ERROR "wxwidgets-targets: invalid wx installation") -+ endif() -+ endwhile() -+ unset(_filename CACHE) # temp variable in FindwxWidgets.cmake script -+ unset(wxWidgets_CONFIG_EXECUTABLE CACHE) -+ set(wxWidgets_CONFIG_EXECUTABLE ${_IMPORT_PREFIX}/bin/wx-config) -+ execute_process(COMMAND sh "${wxWidgets_CONFIG_EXECUTABLE}" --prefix=${_IMPORT_PREFIX} --version -+ OUTPUT_VARIABLE wxVER OUTPUT_STRIP_TRAILING_WHITESPACE ERROR_QUIET -+ ) -+ string(REGEX REPLACE "([0-9])\\.([0-9])\\.([0-9])?" "\\1.\\2" wxREL ${wxVER}) -+ set(wxWidgets_CONFIG_OPTIONS --prefix=${_IMPORT_PREFIX} --version=${wxREL}) -+ find_package(wxWidgets BYPASS_PROVIDER REQUIRED ${wx_all_libs}) -+ if(XP_WXDEBUG) -+ message(STATUS "wxWidgets_INCLUDE_DIRS: ${wxWidgets_INCLUDE_DIRS}") -+ #message(STATUS "wxWidgets_LIBRARIES: ${wxWidgets_LIBRARIES}") -+ #message(STATUS "wxWidgets_LIBRARY_DIRS: ${wxWidgets_LIBRARY_DIRS}") -+ message(STATUS "wxWidgets_DEFINITIONS: ${wxWidgets_DEFINITIONS}") -+ message(STATUS "wxWidgets_CXX_FLAGS: ${wxWidgets_CXX_FLAGS}") -+ endif() -+ mark_as_advanced(wxWidgets_USE_DEBUG) -+ mark_as_advanced(wxWidgets_wxrc_EXECUTABLE) -+ mark_as_advanced(_filename) -+ #if(DEFINED wxWidgets_CXX_FLAGS) -+ # # -pthread from wxWidgets_CXX_FLAGS, was from include(${wxWidgets_USE_FILE}) -+ # xpListAppendIfDne(CMAKE_CXX_FLAGS ${wxWidgets_CXX_FLAGS}) -+ #endif() -+ ################## -+ include(CheckLibraryExists) -+ function(checkLibraryConcat lib symbol liblist) -+ string(TOUPPER ${lib} LIB) -+ check_library_exists("${lib}" "${symbol}" "" XP_WX_HAS_${LIB}) -+ if(XP_WX_HAS_${LIB}) -+ list(APPEND ${liblist} ${lib}) -+ set(${liblist} ${${liblist}} PARENT_SCOPE) -+ endif() -+ endfunction() -+ ######## -+ function(getLibname target _ret) -+ set(unicode u) -+ if(${target} STREQUAL "base") -+ set(${_ret} wx_${target}${unicode}-${wxREL} PARENT_SCOPE) -+ elseif(${target} STREQUAL "net" OR ${target} STREQUAL "xml") -+ set(${_ret} wx_base${unicode}_${target}-${wxREL} PARENT_SCOPE) -+ elseif(${target} MATCHES "^wx") # any target that starts with "wx" -+ if(NOT ${target} STREQUAL "wxregex") -+ unset(unicode) -+ endif() -+ set(${_ret} ${target}${unicode}-${wxREL} PARENT_SCOPE) -+ else() -+ set(${_ret} ${wxbasename}_${target}-${wxREL} PARENT_SCOPE) -+ endif() -+ endfunction() -+ ################## -+ execute_process(COMMAND sh "${wxWidgets_CONFIG_EXECUTABLE}" --prefix=${_IMPORT_PREFIX} -+ --version=${wxREL} --basename --debug=no -+ OUTPUT_VARIABLE wxbasename OUTPUT_STRIP_TRAILING_WHITESPACE ERROR_QUIET -+ ) -+ if(wxbasename MATCHES wx_gtk) -+ if(wxbasename MATCHES wx_gtk2) -+ # NOTE: previously used pkg-config to find GTK2 and GTK3... -+ # but hit an issue building externpro on CentOS 6 and using that build of -+ # externpro for another project building on CentOS 7: pkg-config with GTK2 -+ # didn't return gthread-2.0 and resulted in a link error -+ # libwx_gtk2u_core-3.1.a(corelib_gtk_app.o): undefined reference to symbol 'g_thread_init' -+ # //lib64/libgthread-2.0.so.0: error adding symbols: DSO missing from command line -+ find_package(GTK2 REQUIRED) -+ if(GTK2_FOUND) -+ list(APPEND wxWidgets_INCLUDE_DIRS ${GTK2_INCLUDE_DIRS}) -+ set(_wx_core_libs ${GTK2_TARGETS}) -+ endif() -+ elseif(wxbasename MATCHES wx_gtk3) -+ find_package(PkgConfig) -+ pkg_check_modules(GTK REQUIRED gtk+-3.0) -+ if(GTK_FOUND) -+ list(APPEND wxWidgets_INCLUDE_DIRS ${GTK_INCLUDE_DIRS}) -+ set(_wx_core_libs ${GTK_LIBRARIES}) -+ foreach(lib ${GTK_LIBRARIES}) -+ if(DEFINED pkgcfg_lib_GTK_${lib}) -+ mark_as_advanced(pkgcfg_lib_GTK_${lib}) -+ endif() -+ endforeach() -+ endif() -+ else() -+ message(FATAL_ERROR "unsupported gtk: ${wxbasename}") -+ endif() -+ checkLibraryConcat(X11 XGetWindowAttributes _wx_core_libs) -+ checkLibraryConcat(Xxf86vm XF86VidModeGetAllModeLines _wx_core_libs) -+ checkLibraryConcat(SM SmcOpenConnection _wx_core_libs) -+ endif() -+ set(_wx_adv_deps core) -+ set(_wx_aui_deps adv html) -+ set(_wx_base_link wxregex wxzlib) -+ set(_wx_core_deps base) -+ set(_wx_core_link wxjpeg wxpng wxtiff) -+ set(_wx_gl_deps core) -+ #set(_wx_gl_libs GL GLU) # TODO determine if needed -+ set(_wx_html_deps core) -+ set(_wx_net_deps base) -+ set(_wx_propgrid_deps adv) -+ set(_wx_richtext_deps adv html xml) -+ set(_wx_wxpng_link wxzlib) -+ set(_wx_wxtiff_link wxjpeg wxzlib) -+ set(_wx_xml_deps base) -+ set(_wx_xml_link wxexpat) -+ set(THREADS_PREFER_PTHREAD_FLAG ON) -+ find_package(Threads REQUIRED) -+ set(_wx_base_libs Threads::Threads) -+ checkLibraryConcat(dl dlclose _wx_base_libs) -+ checkLibraryConcat(m pow _wx_base_libs) -+ # standard way is to get these _wx_link libs from 'wx-config --libs' -+ set(_wx_link wxexpat wxjpeg wxpng wxregex wxscintilla wxtiff wxzlib) -+ foreach(lib ${wx_all_libs} ${_wx_link}) -+ if(NOT TARGET wx::${lib}) -+ add_library(wx::${lib} STATIC IMPORTED) -+ getLibname(${lib} ${lib}filename) -+ set(${lib}_RELEASE ${_IMPORT_PREFIX}/lib/lib${${lib}filename}.a) -+ if(EXISTS "${${lib}_RELEASE}") -+ set_property(TARGET wx::${lib} APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE) -+ set_target_properties(wx::${lib} PROPERTIES -+ IMPORTED_LINK_INTERFACE_LANGUAGES_RELEASE "C;CXX" -+ IMPORTED_LOCATION_RELEASE "${${lib}_RELEASE}" -+ INTERFACE_COMPILE_DEFINITIONS "${wxWidgets_DEFINITIONS}" -+ INTERFACE_INCLUDE_DIRECTORIES "${wxWidgets_INCLUDE_DIRS}" -+ ) -+ if(_wx_${lib}_deps OR _wx_${lib}_link OR _wx_${lib}_libs) -+ unset(linkLibs) -+ foreach(dep ${_wx_${lib}_deps}) -+ list(APPEND linkLibs wx::${dep}) -+ endforeach() -+ foreach(dep ${_wx_${lib}_link}) -+ list(APPEND linkLibs \$) -+ endforeach() -+ foreach(dep ${_wx_${lib}_libs}) -+ list(APPEND linkLibs \$) -+ endforeach() -+ set_target_properties(wx::${lib} PROPERTIES -+ INTERFACE_LINK_LIBRARIES "${linkLibs}" -+ ) -+ endif() -+ endif() -+ endif() -+ endforeach() -+ # cleanup temporary variables -+ set(_IMPORT_PREFIX) -+endif() -diff --git a/wxzlib.cmake b/wxzlib.cmake -new file mode 100644 -index 0000000..39febae ---- /dev/null -+++ b/wxzlib.cmake -@@ -0,0 +1,32 @@ -+set(lib_name wxzlib) -+####################################### -+# library sources -+set(thisfile ${wxroot}/build/cmake/${lib_name}.cmake) -+source_group("" FILES ${thisfile}) -+list(APPEND ${lib_name}_libsrcs ${thisfile}) -+######################## -+# Source Files -+set(Source_srcs -+ ${wxroot}/src/zlib/adler32.c -+ ${wxroot}/src/zlib/compress.c -+ ${wxroot}/src/zlib/crc32.c -+ ${wxroot}/src/zlib/deflate.c -+ ${wxroot}/src/zlib/gzclose.c -+ ${wxroot}/src/zlib/gzlib.c -+ ${wxroot}/src/zlib/gzread.c -+ ${wxroot}/src/zlib/gzwrite.c -+ ${wxroot}/src/zlib/infback.c -+ ${wxroot}/src/zlib/inffast.c -+ ${wxroot}/src/zlib/inflate.c -+ ${wxroot}/src/zlib/inftrees.c -+ ${wxroot}/src/zlib/trees.c -+ ${wxroot}/src/zlib/uncompr.c -+ ${wxroot}/src/zlib/zutil.c -+ ) -+source_group("Source Files" FILES ${Source_srcs}) -+list(APPEND ${lib_name}_libsrcs ${Source_srcs}) -+####################################### -+# library -+add_library(${lib_name} STATIC ${${lib_name}_libsrcs}) -+target_include_directories(${lib_name} PUBLIC $) -+set_wxtarget_properties(${lib_name}) -diff --git a/xml.cmake b/xml.cmake -new file mode 100644 -index 0000000..4dd6bca ---- /dev/null -+++ b/xml.cmake -@@ -0,0 +1,56 @@ -+set(lib_name xml) -+####################################### -+# library sources -+set(thisfile ${wxroot}/build/cmake/${lib_name}.cmake) -+source_group("" FILES ${thisfile}) -+list(APPEND ${lib_name}_libsrcs ${thisfile}) -+######################## -+# Common Headers -+set(Common_hdrs -+ ${wxroot}/include/wx/xml/xml.h -+ ${wxroot}/include/wx/xtixml.h -+ ) -+source_group("Common Headers" FILES ${Common_hdrs}) -+list(APPEND ${lib_name}_libsrcs ${Common_hdrs}) -+######################## -+# Common Sources -+set(Common_srcs -+ ${wxroot}/src/common/dummy.cpp -+ ${wxroot}/src/common/xtixml.cpp -+ ) -+source_group("Common Sources" FILES ${Common_srcs}) -+list(APPEND ${lib_name}_libsrcs ${Common_srcs}) -+######################## -+# MSW Headers -+set(MSW_hdrs -+ ${wxroot}/include/wx/msw/genrcdefs.h -+ ) -+source_group("MSW Headers" FILES ${MSW_hdrs}) -+list(APPEND ${lib_name}_libsrcs ${MSW_hdrs}) -+######################## -+# MSW Sources -+set(MSW_srcs -+ #${wxroot}/src/msw/version.rc -+ ) -+source_group("MSW Sources" FILES ${MSW_srcs}) -+list(APPEND ${lib_name}_libsrcs ${MSW_srcs}) -+######################## -+# Setup Headers -+set(Setup_hdrs -+ ${wxroot}/include/wx/msw/setup.h -+ ) -+source_group("Setup Headers" FILES ${Setup_hdrs}) -+list(APPEND ${lib_name}_libsrcs ${Setup_hdrs}) -+######################## -+# Source Files -+set(Source_srcs -+ ${wxroot}/src/xml/xml.cpp -+ ) -+source_group("Source Files" FILES ${Source_srcs}) -+list(APPEND ${lib_name}_libsrcs ${Source_srcs}) -+####################################### -+# library -+add_library(${lib_name} STATIC ${${lib_name}_libsrcs}) -+target_compile_definitions(${lib_name} PRIVATE wxUSE_GUI=0) -+target_link_libraries(${lib_name} PUBLIC base PRIVATE wxexpat) -+set_wxtarget_properties(${lib_name}) -diff --git a/xrc.cmake b/xrc.cmake -new file mode 100644 -index 0000000..bb51bd9 ---- /dev/null -+++ b/xrc.cmake -@@ -0,0 +1,184 @@ -+set(lib_name xrc) -+####################################### -+# library sources -+set(thisfile ${wxroot}/build/cmake/${lib_name}.cmake) -+source_group("" FILES ${thisfile}) -+list(APPEND ${lib_name}_libsrcs ${thisfile}) -+######################## -+# Common Headers -+set(Common_hdrs -+ ${wxroot}/include/wx/xrc/xh_activityindicator.h -+ ${wxroot}/include/wx/xrc/xh_all.h -+ ${wxroot}/include/wx/xrc/xh_animatctrl.h -+ ${wxroot}/include/wx/xrc/xh_bannerwindow.h -+ ${wxroot}/include/wx/xrc/xh_bmp.h -+ ${wxroot}/include/wx/xrc/xh_bmpbt.h -+ ${wxroot}/include/wx/xrc/xh_bmpcbox.h -+ ${wxroot}/include/wx/xrc/xh_bttn.h -+ ${wxroot}/include/wx/xrc/xh_cald.h -+ ${wxroot}/include/wx/xrc/xh_chckb.h -+ ${wxroot}/include/wx/xrc/xh_chckl.h -+ ${wxroot}/include/wx/xrc/xh_choic.h -+ ${wxroot}/include/wx/xrc/xh_choicbk.h -+ ${wxroot}/include/wx/xrc/xh_clrpicker.h -+ ${wxroot}/include/wx/xrc/xh_cmdlinkbn.h -+ ${wxroot}/include/wx/xrc/xh_collpane.h -+ ${wxroot}/include/wx/xrc/xh_combo.h -+ ${wxroot}/include/wx/xrc/xh_comboctrl.h -+ ${wxroot}/include/wx/xrc/xh_datectrl.h -+ ${wxroot}/include/wx/xrc/xh_dirpicker.h -+ ${wxroot}/include/wx/xrc/xh_dlg.h -+ ${wxroot}/include/wx/xrc/xh_editlbox.h -+ ${wxroot}/include/wx/xrc/xh_filectrl.h -+ ${wxroot}/include/wx/xrc/xh_filepicker.h -+ ${wxroot}/include/wx/xrc/xh_fontpicker.h -+ ${wxroot}/include/wx/xrc/xh_frame.h -+ ${wxroot}/include/wx/xrc/xh_gauge.h -+ ${wxroot}/include/wx/xrc/xh_gdctl.h -+ ${wxroot}/include/wx/xrc/xh_grid.h -+ ${wxroot}/include/wx/xrc/xh_html.h -+ ${wxroot}/include/wx/xrc/xh_htmllbox.h -+ ${wxroot}/include/wx/xrc/xh_hyperlink.h -+ ${wxroot}/include/wx/xrc/xh_listb.h -+ ${wxroot}/include/wx/xrc/xh_listbk.h -+ ${wxroot}/include/wx/xrc/xh_listc.h -+ ${wxroot}/include/wx/xrc/xh_mdi.h -+ ${wxroot}/include/wx/xrc/xh_menu.h -+ ${wxroot}/include/wx/xrc/xh_notbk.h -+ ${wxroot}/include/wx/xrc/xh_odcombo.h -+ ${wxroot}/include/wx/xrc/xh_panel.h -+ ${wxroot}/include/wx/xrc/xh_propdlg.h -+ ${wxroot}/include/wx/xrc/xh_radbt.h -+ ${wxroot}/include/wx/xrc/xh_radbx.h -+ ${wxroot}/include/wx/xrc/xh_scrol.h -+ ${wxroot}/include/wx/xrc/xh_scwin.h -+ ${wxroot}/include/wx/xrc/xh_simplebook.h -+ ${wxroot}/include/wx/xrc/xh_sizer.h -+ ${wxroot}/include/wx/xrc/xh_slidr.h -+ ${wxroot}/include/wx/xrc/xh_spin.h -+ ${wxroot}/include/wx/xrc/xh_split.h -+ ${wxroot}/include/wx/xrc/xh_srchctrl.h -+ ${wxroot}/include/wx/xrc/xh_statbar.h -+ ${wxroot}/include/wx/xrc/xh_stbmp.h -+ ${wxroot}/include/wx/xrc/xh_stbox.h -+ ${wxroot}/include/wx/xrc/xh_stlin.h -+ ${wxroot}/include/wx/xrc/xh_sttxt.h -+ ${wxroot}/include/wx/xrc/xh_text.h -+ ${wxroot}/include/wx/xrc/xh_tglbtn.h -+ ${wxroot}/include/wx/xrc/xh_timectrl.h -+ ${wxroot}/include/wx/xrc/xh_toolb.h -+ ${wxroot}/include/wx/xrc/xh_toolbk.h -+ ${wxroot}/include/wx/xrc/xh_tree.h -+ ${wxroot}/include/wx/xrc/xh_treebk.h -+ ${wxroot}/include/wx/xrc/xh_unkwn.h -+ ${wxroot}/include/wx/xrc/xh_wizrd.h -+ ${wxroot}/include/wx/xrc/xmlres.h -+ ) -+source_group("Common Headers" FILES ${Common_hdrs}) -+list(APPEND ${lib_name}_libsrcs ${Common_hdrs}) -+######################## -+# Common Sources -+set(Common_srcs -+ ${wxroot}/src/common/dummy.cpp -+ ) -+source_group("Common Sources" FILES ${Common_srcs}) -+list(APPEND ${lib_name}_libsrcs ${Common_srcs}) -+######################## -+# MSW Headers -+set(MSW_hdrs -+ ${wxroot}/include/wx/msw/genrcdefs.h -+ ) -+source_group("MSW Headers" FILES ${MSW_hdrs}) -+list(APPEND ${lib_name}_libsrcs ${MSW_hdrs}) -+######################## -+# MSW Sources -+set(MSW_srcs -+ #${wxroot}/src/msw/version.rc -+ ) -+source_group("MSW Sources" FILES ${MSW_srcs}) -+list(APPEND ${lib_name}_libsrcs ${MSW_srcs}) -+######################## -+# Setup Headers -+set(Setup_hdrs -+ ${wxroot}/include/wx/msw/setup.h -+ ) -+source_group("Setup Headers" FILES ${Setup_hdrs}) -+list(APPEND ${lib_name}_libsrcs ${Setup_hdrs}) -+######################## -+# Source Files -+set(Source_srcs -+ ${wxroot}/src/xrc/xh_activityindicator.cpp -+ ${wxroot}/src/xrc/xh_animatctrl.cpp -+ ${wxroot}/src/xrc/xh_bannerwindow.cpp -+ ${wxroot}/src/xrc/xh_bmp.cpp -+ ${wxroot}/src/xrc/xh_bmpbt.cpp -+ ${wxroot}/src/xrc/xh_bmpcbox.cpp -+ ${wxroot}/src/xrc/xh_bttn.cpp -+ ${wxroot}/src/xrc/xh_cald.cpp -+ ${wxroot}/src/xrc/xh_chckb.cpp -+ ${wxroot}/src/xrc/xh_chckl.cpp -+ ${wxroot}/src/xrc/xh_choic.cpp -+ ${wxroot}/src/xrc/xh_choicbk.cpp -+ ${wxroot}/src/xrc/xh_clrpicker.cpp -+ ${wxroot}/src/xrc/xh_cmdlinkbn.cpp -+ ${wxroot}/src/xrc/xh_collpane.cpp -+ ${wxroot}/src/xrc/xh_combo.cpp -+ ${wxroot}/src/xrc/xh_comboctrl.cpp -+ ${wxroot}/src/xrc/xh_datectrl.cpp -+ ${wxroot}/src/xrc/xh_dirpicker.cpp -+ ${wxroot}/src/xrc/xh_dlg.cpp -+ ${wxroot}/src/xrc/xh_editlbox.cpp -+ ${wxroot}/src/xrc/xh_filectrl.cpp -+ ${wxroot}/src/xrc/xh_filepicker.cpp -+ ${wxroot}/src/xrc/xh_fontpicker.cpp -+ ${wxroot}/src/xrc/xh_frame.cpp -+ ${wxroot}/src/xrc/xh_gauge.cpp -+ ${wxroot}/src/xrc/xh_gdctl.cpp -+ ${wxroot}/src/xrc/xh_grid.cpp -+ ${wxroot}/src/xrc/xh_html.cpp -+ ${wxroot}/src/xrc/xh_htmllbox.cpp -+ ${wxroot}/src/xrc/xh_hyperlink.cpp -+ ${wxroot}/src/xrc/xh_listb.cpp -+ ${wxroot}/src/xrc/xh_listbk.cpp -+ ${wxroot}/src/xrc/xh_listc.cpp -+ ${wxroot}/src/xrc/xh_mdi.cpp -+ ${wxroot}/src/xrc/xh_menu.cpp -+ ${wxroot}/src/xrc/xh_notbk.cpp -+ ${wxroot}/src/xrc/xh_odcombo.cpp -+ ${wxroot}/src/xrc/xh_panel.cpp -+ ${wxroot}/src/xrc/xh_propdlg.cpp -+ ${wxroot}/src/xrc/xh_radbt.cpp -+ ${wxroot}/src/xrc/xh_radbx.cpp -+ ${wxroot}/src/xrc/xh_scrol.cpp -+ ${wxroot}/src/xrc/xh_scwin.cpp -+ ${wxroot}/src/xrc/xh_simplebook.cpp -+ ${wxroot}/src/xrc/xh_sizer.cpp -+ ${wxroot}/src/xrc/xh_slidr.cpp -+ ${wxroot}/src/xrc/xh_spin.cpp -+ ${wxroot}/src/xrc/xh_split.cpp -+ ${wxroot}/src/xrc/xh_srchctrl.cpp -+ ${wxroot}/src/xrc/xh_statbar.cpp -+ ${wxroot}/src/xrc/xh_stbmp.cpp -+ ${wxroot}/src/xrc/xh_stbox.cpp -+ ${wxroot}/src/xrc/xh_stlin.cpp -+ ${wxroot}/src/xrc/xh_sttxt.cpp -+ ${wxroot}/src/xrc/xh_text.cpp -+ ${wxroot}/src/xrc/xh_tglbtn.cpp -+ ${wxroot}/src/xrc/xh_timectrl.cpp -+ ${wxroot}/src/xrc/xh_toolb.cpp -+ ${wxroot}/src/xrc/xh_toolbk.cpp -+ ${wxroot}/src/xrc/xh_tree.cpp -+ ${wxroot}/src/xrc/xh_treebk.cpp -+ ${wxroot}/src/xrc/xh_unkwn.cpp -+ ${wxroot}/src/xrc/xh_wizrd.cpp -+ ${wxroot}/src/xrc/xmladv.cpp -+ ${wxroot}/src/xrc/xmlres.cpp -+ ${wxroot}/src/xrc/xmlrsall.cpp -+ ) -+source_group("Source Files" FILES ${Source_srcs}) -+list(APPEND ${lib_name}_libsrcs ${Source_srcs}) -+####################################### -+# library -+add_library(${lib_name} STATIC ${${lib_name}_libsrcs}) -+target_link_libraries(${lib_name} PUBLIC adv html xml) -+set_wxtarget_properties(${lib_name}) diff --git a/patches/wxx.plotctrl.patch b/patches/wxx.plotctrl.patch deleted file mode 100644 index 861e197..0000000 --- a/patches/wxx.plotctrl.patch +++ /dev/null @@ -1,537 +0,0 @@ -diff --git a/art/ledgreen.xpm b/art/ledgreen.xpm -index fba2bda..453f51b 100644 ---- a/art/ledgreen.xpm -+++ b/art/ledgreen.xpm -@@ -1,5 +1,5 @@ - /* XPM */ --static char * ledgreen_xpm[] = { -+static const char * ledgreen_xpm[] = { - "15 15 99 2", - " c None", - ". c #012B00", -diff --git a/art/ledgrey.xpm b/art/ledgrey.xpm -index f0c3c2c..42469fc 100644 ---- a/art/ledgrey.xpm -+++ b/art/ledgrey.xpm -@@ -1,5 +1,5 @@ - /* XPM */ --static char *ledgrey_xpm[]={ -+static const char *ledgrey_xpm[]={ - "15 15 75 2", - "Qt c None", - ".# c #000000", -diff --git a/build/CMakeLists.txt b/build/CMakeLists.txt -new file mode 100644 -index 0000000..3a88ded ---- /dev/null -+++ b/build/CMakeLists.txt -@@ -0,0 +1,64 @@ -+set(lib_name plotctrl) -+####################################### -+set(plot_srcs -+ ../src/fourier.c -+ ../src/fparser.cpp -+ ../src/fpoptimizer.cc -+ ../src/lm_lsqr.cpp -+ ../src/plotctrl.cpp -+ ../src/plotcurv.cpp -+ ../src/plotdata.cpp -+ ../src/plotdraw.cpp -+ ../src/plotfunc.cpp -+ ../src/plotmark.cpp -+ ../src/plotprnt.cpp -+ ) -+list(APPEND ${lib_name}_libsrcs ${plot_srcs}) -+######################## -+set(plot_hdrs -+ ../include/wx/plotctrl/fourier.h -+ ../include/wx/plotctrl/fparser.h -+ ../include/wx/plotctrl/lm_lsqr.h -+ ../include/wx/plotctrl/plotctrl.h -+ ../include/wx/plotctrl/plotcurv.h -+ ../include/wx/plotctrl/plotdata.h -+ ../include/wx/plotctrl/plotdefs.h -+ ../include/wx/plotctrl/plotdraw.h -+ ../include/wx/plotctrl/plotfunc.h -+ ../include/wx/plotctrl/plotmark.h -+ ../include/wx/plotctrl/plotprnt.h -+ ) -+list(APPEND ${lib_name}_libsrcs ${plot_hdrs}) -+####################################### -+if(DEFINED WX_SOURCE) -+ message(STATUS "WX_SOURCE: ${WX_SOURCE}") # passed-in via externpro -+endif() -+####################################### -+add_library(${lib_name} STATIC ${${lib_name}_libsrcs}) -+target_include_directories(${lib_name} PUBLIC $ -+ $ -+ PRIVATE -+ # wxplotctrl plotdraw.cpp needs to include wx/gtk/dcclient.h when building against gtk2 -+ ${WX_SOURCE}/include # TODO should be removed when building against gtk2 becomes obsolete -+ ) -+target_link_libraries(${lib_name} PUBLIC things) -+list(TRANSFORM WXX_OUTPUT_NAME REPLACE "@TARGET@" "${lib_name}") -+set_target_properties(${lib_name} PROPERTIES OUTPUT_NAME ${WXX_OUTPUT_NAME}) -+####################################### -+install(TARGETS ${lib_name} EXPORT ${targetsFile} -+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} -+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} -+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} -+ ) -+install(FILES ${plot_hdrs} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/wx/${lib_name}) -+####################################### -+set(samples_plotctrl_srcs -+ ../samples/plotctrl/wxplotctrl.cpp -+ ../samples/plotctrl/wxplotctrl.rc -+ ) -+foreach(sample -+ samples_plotctrl -+ ) -+ add_executable(${sample} WIN32 ${${sample}_srcs}) -+ target_link_libraries(${sample} PRIVATE ${lib_name}) -+endforeach() -diff --git a/include/wx/plotctrl/plotctrl.h b/include/wx/plotctrl/plotctrl.h -index 26f3afb..30a701d 100644 ---- a/include/wx/plotctrl/plotctrl.h -+++ b/include/wx/plotctrl/plotctrl.h -@@ -22,6 +22,7 @@ - #include "wx/plotctrl/plotmark.h" - #include "wx/plotctrl/plotfunc.h" - #include "wx/things/range.h" -+#include "wx/window.h" - - class WXDLLEXPORT wxDC; - class WXDLLEXPORT wxNotifyEvent; -diff --git a/include/wx/plotctrl/plotcurv.h b/include/wx/plotctrl/plotcurv.h -index 6b8c9d5..73ca1a1 100644 ---- a/include/wx/plotctrl/plotcurv.h -+++ b/include/wx/plotctrl/plotcurv.h -@@ -43,7 +43,7 @@ extern double LinearInterpolateX( double x0, double y0, - //---------------------------------------------------------------------------- - - // defines wxArrayDouble for use as necessary --WX_DEFINE_USER_EXPORTED_ARRAY_DOUBLE(double, wxArrayDouble, class WXDLLIMPEXP_PLOTCTRL); -+//WX_DEFINE_USER_EXPORTED_ARRAY_DOUBLE(double, wxArrayDouble, class WXDLLIMPEXP_PLOTCTRL); - - // wxNullPlotBounds = wxRect2DDouble(0,0,0,0) - WXDLLIMPEXP_DATA_PLOTCTRL(extern const wxRect2DDouble) wxNullPlotBounds; -@@ -102,7 +102,11 @@ public: - wxArrayGenericPen m_pens; - static wxArrayGenericPen sm_defaultPens; - -+#if wxUSE_STD_CONTAINERS -+ wxArrayString m_optionNames; -+#else - wxSortedArrayString m_optionNames; -+#endif - wxArrayString m_optionValues; - }; - -diff --git a/include/wx/plotctrl/plotdefs.h b/include/wx/plotctrl/plotdefs.h -index a794fec..c571a46 100644 ---- a/include/wx/plotctrl/plotdefs.h -+++ b/include/wx/plotctrl/plotdefs.h -@@ -14,6 +14,7 @@ - - #include "wx/defs.h" - #include "wx/geometry.h" -+#include "wx/wxcrtvararg.h" - - // ---------------------------------------------------------------------------- - // DLLIMPEXP macros -diff --git a/include/wx/plotctrl/plotdraw.h b/include/wx/plotctrl/plotdraw.h -index 70d410e..6c3d748 100644 ---- a/include/wx/plotctrl/plotdraw.h -+++ b/include/wx/plotctrl/plotdraw.h -@@ -20,6 +20,8 @@ - #include "wx/things/genergdi.h" - #include "wx/things/range.h" - -+#include -+ - class WXDLLEXPORT wxDC; - - class WXDLLIMPEXP_THINGS wxRangeIntSelection; -diff --git a/samples/plotctrl/wxplotctrl.cpp b/samples/plotctrl/wxplotctrl.cpp -index 18497c7..62b9523 100644 ---- a/samples/plotctrl/wxplotctrl.cpp -+++ b/samples/plotctrl/wxplotctrl.cpp -@@ -240,7 +240,7 @@ void wxPlotCtrlFrame::OnMenu(wxCommandEvent& event) - wxT(""), - wxT(""), - wxT("All files (*)|*"), -- wxOPEN | wxFILE_MUST_EXIST); -+ wxFD_OPEN | wxFD_FILE_MUST_EXIST); - - if (fileDialog.ShowModal() == wxID_OK) - { -diff --git a/samples/plotctrl/wxplotctrl.rc b/samples/plotctrl/wxplotctrl.rc -index 306a634..774fbfb 100644 ---- a/samples/plotctrl/wxplotctrl.rc -+++ b/samples/plotctrl/wxplotctrl.rc -@@ -2,5 +2,5 @@ - - #define wxUSE_NO_MANIFEST 0 - --#include "wx/msw/wx.rc" -+//#include "wx/msw/wx.rc" - -diff --git a/src/fourier.c b/src/fourier.c -index 8b72bb4..63a8fa0 100644 ---- a/src/fourier.c -+++ b/src/fourier.c -@@ -67,7 +67,8 @@ unsigned NumberOfBitsNeeded ( unsigned PowerOfTwo ) - return i; - } - -- return 0; -+ // unreachable code... -+ // return 0; - } - - unsigned ReverseBits ( unsigned index, unsigned NumBits ) -diff --git a/src/plotctrl.cpp b/src/plotctrl.cpp -index a8beb1c..7586fce 100644 ---- a/src/plotctrl.cpp -+++ b/src/plotctrl.cpp -@@ -32,6 +32,7 @@ - #include "wx/textctrl.h" - #endif // WX_PRECOMP - -+#include "wx/dcclient.h" - #include "wx/splitter.h" - #include "wx/math.h" - #include "wx/image.h" -@@ -298,7 +299,7 @@ void wxPlotCtrlArea::OnPaint( wxPaintEvent &WXUNUSED(event) ) - if (m_bitmap.Ok()) - dc.DrawBitmap(m_bitmap, 0, 0, false); - -- if (m_owner->GetCrossHairCursor() && m_owner->GetPlotAreaRect().Inside(m_mousePt)) -+ if (m_owner->GetCrossHairCursor() && m_owner->GetPlotAreaRect().Contains(m_mousePt)) - m_owner->DrawCrosshairCursor( &dc, m_mousePt ); - - m_owner->DrawMouseMarker(&dc, m_owner->GetAreaMouseMarker(), m_mouseRect); -@@ -576,8 +577,13 @@ bool wxPlotCtrl::Create( wxWindow *parent, wxWindowID win_id, - { - m_axisFontSize.x = 6; - m_axisFontSize.y = 12; -+#if wxCHECK_VERSION(2,9,0) // concatenating mismatched strings -+ wxFAIL_MSG("Can't determine the font size for the axis! I'll guess.\n" -+ "The display might be corrupted, however you may continue."); -+#else - wxFAIL_MSG(wxT("Can't determine the font size for the axis! I'll guess.\n" - "The display might be corrupted, however you may continue.")); -+#endif - } - - m_xAxisDrawer->SetTickFont(axisFont); -@@ -643,7 +649,7 @@ void wxPlotCtrl::DrawActiveBitmap( wxDC* dc ) - int top = m_yAxisScrollbar->GetRect().GetBottom(); - wxRect rect(left, top, size.x - left, size.y - top); - // clear background -- dc->SetBrush(wxBrush(GetBackgroundColour(), wxSOLID)); -+ dc->SetBrush(wxBrush(GetBackgroundColour(), wxBRUSHSTYLE_SOLID)); - dc->SetPen(*wxTRANSPARENT_PEN); - dc->DrawRectangle(rect); - // center the bitmap -@@ -691,7 +697,7 @@ void wxPlotCtrl::SetPlotWinMouseCursor(int cursorid) - { - if (cursorid == m_mouse_cursorid) return; - m_mouse_cursorid = cursorid; -- SetCursor(wxCursor(cursorid)); -+ SetCursor(wxCursor(static_cast(cursorid))); - } - - void wxPlotCtrl::OnMouse( wxMouseEvent &event ) -@@ -705,9 +711,9 @@ void wxPlotCtrl::OnMouse( wxMouseEvent &event ) - wxSize size(GetClientSize()); - wxPoint mousePt(event.GetPosition()); - -- if ((m_show_title && m_titleRect.Inside(mousePt)) || -- (m_show_xlabel && m_xLabelRect.Inside(mousePt)) || -- (m_show_ylabel && m_yLabelRect.Inside(mousePt))) -+ if ((m_show_title && m_titleRect.Contains(mousePt)) || -+ (m_show_xlabel && m_xLabelRect.Contains(mousePt)) || -+ (m_show_ylabel && m_yLabelRect.Contains(mousePt))) - { - SetPlotWinMouseCursor(wxCURSOR_IBEAM); - } -@@ -716,11 +722,11 @@ void wxPlotCtrl::OnMouse( wxMouseEvent &event ) - - if (event.ButtonDClick(1) && !IsTextCtrlShown()) - { -- if (m_show_title && m_titleRect.Inside(mousePt)) -+ if (m_show_title && m_titleRect.Contains(mousePt)) - ShowTextCtrl(wxPLOTCTRL_EDIT_TITLE, true); -- else if (m_show_xlabel && m_xLabelRect.Inside(mousePt)) -+ else if (m_show_xlabel && m_xLabelRect.Contains(mousePt)) - ShowTextCtrl(wxPLOTCTRL_EDIT_XAXIS, true); -- else if (m_show_ylabel && m_yLabelRect.Inside(mousePt)) -+ else if (m_show_ylabel && m_yLabelRect.Contains(mousePt)) - ShowTextCtrl(wxPLOTCTRL_EDIT_YAXIS, true); - } - } -@@ -2274,7 +2280,7 @@ void wxPlotCtrl::SetAreaMouseCursor(int cursorid) - else if (cursorid == CURSOR_GRAB) - m_area->SetCursor(s_grabCursor); - else -- m_area->SetCursor(wxCursor(cursorid)); -+ m_area->SetCursor(wxCursor(static_cast(cursorid))); - } - - void wxPlotCtrl::OnSize( wxSizeEvent& ) -@@ -2514,8 +2520,8 @@ void wxPlotCtrl::DrawAreaWindow( wxDC *dc, const wxRect &rect ) - - dc->SetClippingRegion(refreshRect); - -- dc->SetBrush( wxBrush(GetBackgroundColour(), wxSOLID) ); -- dc->SetPen( wxPen(GetBorderColour(), m_area_border_width, wxSOLID) ); -+ dc->SetBrush( wxBrush(GetBackgroundColour(), wxBRUSHSTYLE_SOLID) ); -+ dc->SetPen( wxPen(GetBorderColour(), m_area_border_width, wxPENSTYLE_SOLID) ); - dc->DrawRectangle(clientRect); - - DrawTickMarks( dc, refreshRect ); -@@ -2552,7 +2558,7 @@ void wxPlotCtrl::DrawAreaWindow( wxDC *dc, const wxRect &rect ) - - // refresh border - dc->SetBrush( *wxTRANSPARENT_BRUSH ); -- dc->SetPen( wxPen(GetBorderColour(), m_area_border_width, wxSOLID) ); -+ dc->SetPen( wxPen(GetBorderColour(), m_area_border_width, wxPENSTYLE_SOLID) ); - dc->DrawRectangle(clientRect); - - dc->SetPen( wxNullPen ); -@@ -2566,10 +2572,14 @@ void wxPlotCtrl::DrawMouseMarker( wxDC *dc, int type, const wxRect &rect ) - if ((rect.width == 0) || (rect.height == 0)) - return; - -+#if wxCHECK_VERSION(2,9,0) -+ wxRasterOperationMode logical_fn = dc->GetLogicalFunction(); -+#else - int logical_fn = dc->GetLogicalFunction(); -+#endif - dc->SetLogicalFunction( wxINVERT ); - dc->SetBrush( *wxTRANSPARENT_BRUSH ); -- dc->SetPen(*wxThePenList->FindOrCreatePen(*wxBLACK, 1, wxDOT)); -+ dc->SetPen(*wxThePenList->FindOrCreatePen(*wxBLACK, 1, wxPENSTYLE_DOT)); - - switch (type) - { -@@ -2614,7 +2624,11 @@ void wxPlotCtrl::DrawCrosshairCursor( wxDC *dc, const wxPoint &pos ) - wxCHECK_RET(dc, wxT("invalid window")); - - dc->SetPen(*wxBLACK_PEN); -+#if wxCHECK_VERSION(2,9,0) -+ wxRasterOperationMode logical_fn = dc->GetLogicalFunction(); -+#else - int logical_fn = dc->GetLogicalFunction(); -+#endif - dc->SetLogicalFunction( wxINVERT ); - - dc->CrossHair(pos.x, pos.y); -@@ -2746,7 +2760,7 @@ void wxPlotCtrl::DrawCurveCursor( wxDC *dc ) - void wxPlotCtrl::DrawTickMarks( wxDC *dc, const wxRect& rect ) - { - wxRect clientRect(GetPlotAreaRect()); -- dc->SetPen( wxPen(GetGridColour(), 1, wxSOLID) ); -+ dc->SetPen( wxPen(GetGridColour(), 1, wxPENSTYLE_SOLID) ); - - int xtick_length = GetDrawGrid() ? clientRect.height : 10; - int ytick_length = GetDrawGrid() ? clientRect.width : 10; -@@ -3330,7 +3344,7 @@ void wxPlotCtrl::ProcessAreaEVT_MOUSE_EVENTS( wxMouseEvent &event ) - // Move the origin - if (m_area_mouse_func == wxPLOTCTRL_MOUSE_PAN) - { -- if (!m_areaClientRect.Inside(event.GetPosition())) -+ if (!m_areaClientRect.Contains(event.GetPosition())) - { - StartMouseTimer(ID_AREA_TIMER); - } -@@ -3514,12 +3528,12 @@ void wxPlotCtrl::OnChar(wxKeyEvent &event) - switch (event.GetKeyCode()) - { - // cursor keys moves the plot origin around -- case WXK_LEFT : SetOrigin(m_viewRect.GetLeft() - m_viewRect.m_width/10.0, m_viewRect.GetTop()); return; -- case WXK_RIGHT : SetOrigin(m_viewRect.GetLeft() + m_viewRect.m_width/10.0, m_viewRect.GetTop()); return; -- case WXK_UP : SetOrigin(m_viewRect.GetLeft(), m_viewRect.GetTop() + m_viewRect.m_height/10.0); return; -- case WXK_DOWN : SetOrigin(m_viewRect.GetLeft(), m_viewRect.GetTop() - m_viewRect.m_height/10.0); return; -- case WXK_PRIOR : SetOrigin(m_viewRect.GetLeft(), m_viewRect.GetTop() + m_viewRect.m_height/2.0); return; -- case WXK_NEXT : SetOrigin(m_viewRect.GetLeft(), m_viewRect.GetTop() - m_viewRect.m_height/2.0); return; -+ case WXK_LEFT : SetOrigin(m_viewRect.GetLeft() - m_viewRect.m_width/10.0, m_viewRect.GetTop()); return; -+ case WXK_RIGHT : SetOrigin(m_viewRect.GetLeft() + m_viewRect.m_width/10.0, m_viewRect.GetTop()); return; -+ case WXK_UP : SetOrigin(m_viewRect.GetLeft(), m_viewRect.GetTop() + m_viewRect.m_height/10.0); return; -+ case WXK_DOWN : SetOrigin(m_viewRect.GetLeft(), m_viewRect.GetTop() - m_viewRect.m_height/10.0); return; -+ case WXK_PAGEUP : SetOrigin(m_viewRect.GetLeft(), m_viewRect.GetTop() + m_viewRect.m_height/2.0); return; -+ case WXK_PAGEDOWN : SetOrigin(m_viewRect.GetLeft(), m_viewRect.GetTop() - m_viewRect.m_height/2.0); return; - - // Center the plot on the cursor point, or 0,0 - case WXK_HOME : -diff --git a/src/plotcurv.cpp b/src/plotcurv.cpp -index 9f72820..790e6df 100644 ---- a/src/plotcurv.cpp -+++ b/src/plotcurv.cpp -@@ -107,9 +107,9 @@ void InitPlotCurveDefaultPens() - if (!s_init_default_pens) - { - s_init_default_pens = true; -- wxPlotCurveRefData::sm_defaultPens.Add(wxGenericPen( wxGenericColour( 0, 0, 0), 1, wxSOLID )); -- wxPlotCurveRefData::sm_defaultPens.Add(wxGenericPen( wxGenericColour( 0, 0, 255), 1, wxSOLID )); -- wxPlotCurveRefData::sm_defaultPens.Add(wxGenericPen( wxGenericColour(255, 0, 0), 1, wxSOLID )); -+ wxPlotCurveRefData::sm_defaultPens.Add(wxGenericPen( wxGenericColour( 0, 0, 0), 1, wxPENSTYLE_SOLID )); -+ wxPlotCurveRefData::sm_defaultPens.Add(wxGenericPen( wxGenericColour( 0, 0, 255), 1, wxPENSTYLE_SOLID )); -+ wxPlotCurveRefData::sm_defaultPens.Add(wxGenericPen( wxGenericColour(255, 0, 0), 1, wxPENSTYLE_SOLID )); - } - } - -@@ -236,7 +236,17 @@ int wxPlotCurve::SetOption(const wxString& name, const wxString& value, bool upd - int n = M_PLOTCURVEDATA->m_optionNames.Index(name); - if (n == wxNOT_FOUND) - { -+#if wxUSE_STD_CONTAINERS -+ // following suggestion from wxWidgets "Container Classes" documentatation: -+ // http://docs.wxwidgets.org/3.0/overview_container.html#overview_container_std -+ // avoid use of wxSortedArrayString by using a normal array and called its -+ // Sort() method when needed -+ M_PLOTCURVEDATA->m_optionNames.Add(name); -+ M_PLOTCURVEDATA->m_optionNames.Sort(); -+ n = M_PLOTCURVEDATA->m_optionNames.Index(name); -+#else - n = M_PLOTCURVEDATA->m_optionNames.Add(name); -+#endif - M_PLOTCURVEDATA->m_optionValues.Insert(value, n); - } - else if (update) -diff --git a/src/plotdata.cpp b/src/plotdata.cpp -index f452eed..37a4e86 100644 ---- a/src/plotdata.cpp -+++ b/src/plotdata.cpp -@@ -774,9 +774,15 @@ bool wxPlotData::LoadFile( const wxString &filename, int x_col, int y_col, int o - while (select_cols && !stop_load ) - { - wxString colStr = wxGetTextFromUser( -+#if wxCHECK_VERSION(2,9,0) // concatenating mismatched strings -+ wxString::Format("Data file: '%s'\n%d columns found.\n" -+ "Enter x and y cols separated by a space starting from 1.\n" -+ "If x = y then x values are 0,1,2... and y is given col.", filename.c_str(), n), -+#else - wxString::Format(wxT("Data file: '%s'\n%d columns found.\n" - "Enter x and y cols separated by a space starting from 1.\n" - "If x = y then x values are 0,1,2... and y is given col."), filename.c_str(), n), -+#endif - wxT("Enter two columns of data file to use")); - - if (colStr.IsEmpty()) -@@ -805,8 +811,9 @@ bool wxPlotData::LoadFile( const wxString &filename, int x_col, int y_col, int o - } - else - { -+ //static_cast(*)'s added by SC@SDL on 10/8/07 for Solaris wxplotctrl build: - int ret = wxMessageBox( -- wxString::Format(wxT("Invalid data columns '%d %d', limited to 1 to %d"), xcol+1, ycol+1, n), -+ wxString::Format(wxT("Invalid data columns '%d %d', limited to 1 to %d"), static_cast(xcol+1), static_cast(ycol+1), n), - wxT("Invalid data columns"), wxOK|wxCANCEL|wxICON_ERROR); - if (ret == wxCANCEL) - stop_load = true; -@@ -836,11 +843,19 @@ bool wxPlotData::LoadFile( const wxString &filename, int x_col, int y_col, int o - } - - wxMessageBox( -+#if wxCHECK_VERSION(2,9,0) // concatenating mismatched strings -+ wxString::Format("Loading cols (%d,%d) aborted after %d points\n\n" -+ "First 100 characters of offending line number: %d\n" -+ "\"%s\"\n\n" -+ "# for comments, blank lines Ok, comma, tab, space for separators\n" -+ "7 4\n33 2.5e-2\n...\n", -+#else - wxString::Format(wxT("Loading cols (%d,%d) aborted after %d points\n\n" - "First 100 characters of offending line number: %d\n" - "\"%s\"\n\n" - "# for comments, blank lines Ok, comma, tab, space for separators\n" - "7 4\n33 2.5e-2\n...\n"), -+#endif - x_col, y_col, points, line_number, wxstr.Left(100).c_str()), - wxT("Error loading ")+filename, wxOK|wxICON_ERROR); - stop_load = true; -@@ -2906,8 +2921,8 @@ void wxPlotData::SetSymbol( wxPlotSymbol_Type type, wxPlotPen_Type colour_type, - } - } - --wxBitmap wxPlotData::CreateSymbol( wxPlotSymbol_Type type, wxPlotPen_Type colour_type, int width, int height, -- const wxPen *pen, const wxBrush *brush) -+wxBitmap wxPlotData::CreateSymbol( wxPlotSymbol_Type type, wxPlotPen_Type WXUNUSED(colour_type), int width, int height, -+ const wxPen *WXUNUSED(pen), const wxBrush *WXUNUSED(brush)) - { - wxBitmap b(width, height); - -diff --git a/src/plotdraw.cpp b/src/plotdraw.cpp -index 1cf748c..7f320aa 100644 ---- a/src/plotdraw.cpp -+++ b/src/plotdraw.cpp -@@ -23,6 +23,7 @@ - #include "wx/dcmemory.h" - #endif // WX_PRECOMP - -+#include "wx/dcclient.h" - #include "wx/math.h" - - #include "wx/plotctrl/plotdraw.h" -@@ -54,11 +55,32 @@ - // Consts - //----------------------------------------------------------------------------- - -+#ifdef __WXGTK3__ -+#undef wxPLOTCTRL_FAST_GRAPHICS -+#define wxPLOTCTRL_FAST_GRAPHICS 0 -+#endif -+ - #if defined(__WXGTK__) && wxPLOTCTRL_FAST_GRAPHICS - - extern "C" { - #include - } -+#if wxCHECK_VERSION(2,9,0) -+ #include -+ #define INITIALIZE_FAST_GRAPHICS \ -+ double dc_scale_x = 1, dc_scale_y = 1; \ -+ dc->GetUserScale( &dc_scale_x, &dc_scale_y ); \ -+ wxPoint dc_origin = dc->GetDeviceOrigin(); \ -+ wxDCImpl *dcImpl = dc->GetImpl(); \ -+ wxWindowDCImpl *winDC = wxDynamicCast(dcImpl, wxWindowDCImpl); \ -+ GdkWindow *window = NULL; \ -+ GdkGC *pen = NULL; \ -+ if (winDC && (dc_scale_x == 1.0) && (dc_scale_y == 1.0) && (dc_origin == wxPoint(0,0))) \ -+ { \ -+ window = winDC->m_gdkwindow; \ -+ pen = winDC->m_penGC; \ -+ } -+#else - #define INITIALIZE_FAST_GRAPHICS \ - double dc_scale_x = 1, dc_scale_y = 1; \ - dc->GetUserScale( &dc_scale_x, &dc_scale_y ); \ -@@ -71,6 +93,7 @@ extern "C" { - window = winDC->m_window; \ - pen = winDC->m_penGC; \ - } -+#endif - - // inline void wxPLOTCTRL_DRAW_LINE(wxDC *dc, GdkWindow *win, GdkGC *pen, int x0, int y0, int x1, int y1) - #define wxPLOTCTRL_DRAW_LINE(dc, win, pen, x0, y0, x1, y1) \ -@@ -486,8 +509,8 @@ wxPlotDrawerAxisBase::wxPlotDrawerAxisBase(wxPlotCtrl* owner) - m_tickColour = wxGenericColour(0,0,0); - m_labelColour = wxGenericColour(0,0,0); - -- m_tickPen = wxGenericPen(m_tickColour, wxSOLID); -- m_backgroundBrush = wxGenericBrush(wxGenericColour(255,255,255), wxSOLID); -+ m_tickPen = wxGenericPen(m_tickColour, wxPENSTYLE_SOLID); -+ m_backgroundBrush = wxGenericBrush(wxGenericColour(255,255,255), wxBRUSHSTYLE_SOLID); - } - - //----------------------------------------------------------------------------- -@@ -495,7 +518,7 @@ wxPlotDrawerAxisBase::wxPlotDrawerAxisBase(wxPlotCtrl* owner) - //----------------------------------------------------------------------------- - IMPLEMENT_ABSTRACT_CLASS(wxPlotDrawerArea, wxPlotDrawerBase) - --void wxPlotDrawerArea::Draw(wxDC *dc, bool refresh) -+void wxPlotDrawerArea::Draw(wxDC *WXUNUSED(dc), bool WXUNUSED(refresh)) - { - } - diff --git a/patches/wxx.things.patch b/patches/wxx.things.patch deleted file mode 100644 index 286ecad..0000000 --- a/patches/wxx.things.patch +++ /dev/null @@ -1,944 +0,0 @@ -diff --git a/build/CMakeLists.txt b/build/CMakeLists.txt -new file mode 100644 -index 0000000..e361b61 ---- /dev/null -+++ b/build/CMakeLists.txt -@@ -0,0 +1,64 @@ -+set(lib_name things) -+####################################### -+set(things_srcs -+ ../src/block.cpp -+ ../src/bmpcombo.cpp -+ ../src/dropdown.cpp -+ ../src/filebrws.cpp -+ ../src/genergdi.cpp -+ ../src/geometry.cpp -+ ../src/menubtn.cpp -+ ../src/optvalue.cpp -+ ../src/range.cpp -+ ../src/spinctld.cpp -+ ../src/toggle.cpp -+ ) -+list(APPEND ${lib_name}_libsrcs ${things_srcs}) -+######################## -+set(things_hdrs -+ ../include/wx/things/block.h -+ ../include/wx/things/bmpcombo.h -+ ../include/wx/things/dropdown.h -+ ../include/wx/things/filebrws.h -+ ../include/wx/things/genergdi.h -+ ../include/wx/things/geometry.h -+ ../include/wx/things/medsort.h -+ ../include/wx/things/menubtn.h -+ ../include/wx/things/optvalue.h -+ ../include/wx/things/range.h -+ ../include/wx/things/spinctld.h -+ ../include/wx/things/thingdef.h -+ ../include/wx/things/toggle.h -+ ) -+list(APPEND ${lib_name}_libsrcs ${things_hdrs}) -+####################################### -+add_library(${lib_name} STATIC ${${lib_name}_libsrcs}) -+target_include_directories(${lib_name} PUBLIC $ -+ $ -+ ) -+target_link_libraries(${lib_name} PUBLIC wx::core) -+list(TRANSFORM WXX_OUTPUT_NAME REPLACE "@TARGET@" "${lib_name}") -+set_target_properties(${lib_name} PROPERTIES OUTPUT_NAME ${WXX_OUTPUT_NAME}) -+####################################### -+install(TARGETS ${lib_name} EXPORT ${targetsFile} -+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} -+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} -+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} -+ ) -+install(FILES ${things_hdrs} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/wx/${lib_name}) -+####################################### -+set(samples_filebrws_srcs -+ ../samples/filebrws/wxfilebrowser.cpp -+ ../samples/filebrws/wxfilebrowser.rc -+ ) -+set(samples_things_srcs -+ ../samples/things/thingsdemo.cpp -+ ../samples/things/thingsdemo.rc -+ ) -+foreach(sample -+ samples_filebrws -+ samples_things -+ ) -+ add_executable(${sample} WIN32 ${${sample}_srcs}) -+ target_link_libraries(${sample} PRIVATE ${lib_name}) -+endforeach() -diff --git a/include/wx/things/bmpcombo.h b/include/wx/things/bmpcombo.h -index 8bcb9f1..55dbc7e 100644 ---- a/include/wx/things/bmpcombo.h -+++ b/include/wx/things/bmpcombo.h -@@ -26,6 +26,7 @@ arrows. - #ifndef _WX_BMPCOMBO_H_ - #define _WX_BMPCOMBO_H_ - -+#ifndef __WXMAC__ - #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) - #pragma interface "bmpcombo.h" - #endif -@@ -33,6 +34,8 @@ arrows. - #include "wx/things/thingdef.h" - #include "wx/things/dropdown.h" - -+#include -+ - class WXDLLEXPORT wxMenu; - class WXDLLEXPORT wxBitmap; - class WXDLLEXPORT wxKeyEvent; -@@ -220,4 +223,5 @@ private: - DECLARE_EVENT_TABLE() - }; - -+#endif // NOT __WXMAC__ - #endif // _WX_BMPCOMBO_H_ -diff --git a/include/wx/things/dropdown.h b/include/wx/things/dropdown.h -index 45fa697..a45a994 100644 ---- a/include/wx/things/dropdown.h -+++ b/include/wx/things/dropdown.h -@@ -33,6 +33,7 @@ DoShowPopup() - this is called from ShowPopup after creating the m_popupWin. - #ifndef _WX_DROPDOWNBASE_H_ - #define _WX_DROPDOWNBASE_H_ - -+#ifndef __WXMAC__ - #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) - #pragma interface "dropdown.h" - #endif -@@ -40,6 +41,8 @@ DoShowPopup() - this is called from ShowPopup after creating the m_popupWin. - #include "wx/popupwin.h" - #include "wx/things/thingdef.h" - -+#include -+ - class WXDLLEXPORT wxTimer; - class WXDLLEXPORT wxTimerEvent; - class WXDLLEXPORT wxCustomButton; -@@ -164,4 +167,5 @@ private: - DECLARE_EVENT_TABLE() - }; - -+#endif // NOT __WXMAC__ - #endif // _WX_DROPDOWNBASE_H_ -diff --git a/include/wx/things/filebrws.h b/include/wx/things/filebrws.h -index babc42f..579993b 100644 ---- a/include/wx/things/filebrws.h -+++ b/include/wx/things/filebrws.h -@@ -18,7 +18,11 @@ - #include "wx/dirctrl.h" - #include "wx/filedlg.h" - #include "wx/textdlg.h" -+#if wxCHECK_VERSION(2,9,0) -+#include "wx/generic/filectrlg.h" -+#else - #include "wx/generic/filedlgg.h" -+#endif - #include "wx/things/thingdef.h" - - class WXDLLEXPORT wxCheckBox; -@@ -31,7 +35,11 @@ class WXDLLEXPORT wxListEvent; - class WXDLLEXPORT wxToolBar; - class WXDLLEXPORT wxBitmapButton; - class WXDLLEXPORT wxConfigBase; -+#if wxCHECK_VERSION(2,9,0) -+class WXDLLEXPORT wxFileListCtrl; -+#else - class WXDLLEXPORT wxFileCtrl; -+#endif - class WXDLLEXPORT wxFileName; - - class WXDLLIMPEXP_THINGS wxFileBrowser; -@@ -285,7 +293,11 @@ protected : - void OnTreeItemActivation(wxTreeEvent &event); - void OnTreeRightClick(wxTreeEvent& event); - -+#if wxCHECK_VERSION(2,9,0) -+ // wxFileListCtrl events -+#else - // wxFileCtrl events - a wxListCtrl -+#endif - void OnListColClick(wxListEvent &event); - void OnListItemActivated(wxListEvent &event); - void OnListItemSelected(wxListEvent &event); -@@ -322,7 +334,11 @@ protected : - - wxSplitterWindow *m_splitterWin; - wxGenericDirCtrl *m_dirCtrl; -+#if wxCHECK_VERSION(2,9,0) -+ wxFileListCtrl *m_fileCtrl; -+#else - wxFileCtrl *m_fileCtrl; -+#endif - - wxMenu *m_listMenu; // popup menu in listctrl - wxMenu *m_treeMenu; // popup menu in treectrl -diff --git a/include/wx/things/genergdi.h b/include/wx/things/genergdi.h -index 4b9f74b..e97a8ad 100644 ---- a/include/wx/things/genergdi.h -+++ b/include/wx/things/genergdi.h -@@ -150,11 +150,11 @@ public: - wxGenericPen() : wxObject() {} - wxGenericPen( const wxGenericPen &pen ) : wxObject() { Create(pen); } - wxGenericPen( const wxPen &pen ) : wxObject() { Create(pen); } -- wxGenericPen( const wxGenericColour &colour, int width = 1, int style = wxSOLID, -- int cap = wxCAP_ROUND, int join = wxJOIN_ROUND ) : wxObject() -+ wxGenericPen( const wxGenericColour &colour, int width = 1, wxPenStyle style = wxPENSTYLE_SOLID, -+ wxPenCap cap = wxCAP_ROUND, wxPenJoin join = wxJOIN_ROUND ) : wxObject() - { Create(colour, width, style, cap, join); } -- wxGenericPen( const wxColour &colour, int width = 1, int style = wxSOLID, -- int cap = wxCAP_ROUND, int join = wxJOIN_ROUND ) : wxObject() -+ wxGenericPen( const wxColour &colour, int width = 1, wxPenStyle style = wxPENSTYLE_SOLID, -+ wxPenCap cap = wxCAP_ROUND, wxPenJoin join = wxJOIN_ROUND ) : wxObject() - { Create(colour, width, style, cap, join); } - - virtual ~wxGenericPen() {} -@@ -168,10 +168,10 @@ public: - // Use these to detach this pen from it's refed copies. - void Create( const wxGenericPen &pen ); - void Create( const wxPen &pen ); -- void Create( const wxGenericColour &colour, int width = 1, int style = wxSOLID, -- int cap = wxCAP_ROUND, int join = wxJOIN_ROUND ); -- void Create( const wxColour &colour, int width = 1, int style = wxSOLID, -- int cap = wxCAP_ROUND, int join = wxJOIN_ROUND ); -+ void Create( const wxGenericColour &colour, int width = 1, wxPenStyle style = wxPENSTYLE_SOLID, -+ wxPenCap cap = wxCAP_ROUND, wxPenJoin join = wxJOIN_ROUND ); -+ void Create( const wxColour &colour, int width = 1, wxPenStyle style = wxPENSTYLE_SOLID, -+ wxPenCap cap = wxCAP_ROUND, wxPenJoin join = wxJOIN_ROUND ); - - // ----------------------------------------------------------------------- - // Set the values of the refed data. -@@ -181,9 +181,9 @@ public: - void SetColour( const wxGenericColour &colour ); - void SetColour( const wxColour &colour ); - void SetColour( int red, int green, int blue, int alpha=255 ); -- void SetCap( int capStyle ); -- void SetJoin( int joinStyle ); -- void SetStyle( int style ); -+ void SetCap( wxPenCap capStyle ); -+ void SetJoin( wxPenJoin joinStyle ); -+ void SetStyle( wxPenStyle style ); - void SetWidth( int width ); - void SetDashes( int number_of_dashes, const wxDash *dash ); - -@@ -194,9 +194,9 @@ public: - wxGenericColour GetGenericColour() const; - wxColour GetColour() const; - int GetWidth() const; -- int GetStyle() const; -- int GetCap() const; -- int GetJoin() const; -+ wxPenStyle GetStyle() const; -+ wxPenCap GetCap() const; -+ wxPenJoin GetJoin() const; - int GetDashes(wxDash **ptr) const; - int GetDashCount() const; - wxDash* GetDash() const; -@@ -243,9 +243,9 @@ public: - wxGenericBrush() : wxObject() {} - wxGenericBrush( const wxGenericBrush &brush ) : wxObject() { Create(brush); } - wxGenericBrush( const wxBrush &brush ) : wxObject() { Create(brush); } -- wxGenericBrush( const wxGenericColour &colour, int style = wxSOLID) -+ wxGenericBrush( const wxGenericColour &colour, wxBrushStyle style = wxBRUSHSTYLE_SOLID) - : wxObject() { Create(colour, style); } -- wxGenericBrush( const wxColour &colour, int style = wxSOLID) -+ wxGenericBrush( const wxColour &colour, wxBrushStyle style = wxBRUSHSTYLE_SOLID) - : wxObject() { Create(colour, style); } - wxGenericBrush( const wxBitmap& stipple ) : wxObject() { Create(stipple); } - -@@ -260,8 +260,8 @@ public: - // Use these to detach this pen from it's refed copies. - void Create( const wxGenericBrush &brush ); - void Create( const wxBrush &brush ); -- void Create( const wxGenericColour &colour, int style = wxSOLID ); -- void Create( const wxColour &colour, int style = wxSOLID ); -+ void Create( const wxGenericColour &colour, wxBrushStyle style = wxBRUSHSTYLE_SOLID ); -+ void Create( const wxColour &colour, wxBrushStyle style = wxBRUSHSTYLE_SOLID ); - void Create( const wxBitmap &stipple ); - - // ----------------------------------------------------------------------- -@@ -272,7 +272,7 @@ public: - void SetColour( const wxGenericColour &colour ); - void SetColour( const wxColour &colour ); - void SetColour( int red, int green, int blue, int alpha=255 ); -- void SetStyle( int style ); -+ void SetStyle( wxBrushStyle style ); - void SetStipple( const wxBitmap& stipple ); - - // ----------------------------------------------------------------------- -@@ -281,11 +281,11 @@ public: - - wxGenericColour GetGenericColour() const; - wxColour GetColour() const; -- int GetStyle() const; -+ wxBrushStyle GetStyle() const; - wxBitmap* GetStipple() const; - - bool IsHatch() const -- { return (GetStyle()>=wxFIRST_HATCH) && (GetStyle()<=wxLAST_HATCH); } -+ { return (GetStyle()>=wxBRUSHSTYLE_FIRST_HATCH) && (GetStyle()<=wxBRUSHSTYLE_LAST_HATCH); } - - // ----------------------------------------------------------------------- - // Equivalency tests -diff --git a/include/wx/things/optvalue.h b/include/wx/things/optvalue.h -index b8c6a4d..df8b14b 100644 ---- a/include/wx/things/optvalue.h -+++ b/include/wx/things/optvalue.h -@@ -20,6 +20,10 @@ class WXDLLIMPEXP_THINGS wxOptionValue; - #include "wx/dynarray.h" - WX_DECLARE_OBJARRAY_WITH_DECL(wxOptionValue, wxArrayOptionValue, class WXDLLIMPEXP_THINGS); - -+#include -+#include -+#include -+ - //---------------------------------------------------------------------------- - // Global wxString utilities - //---------------------------------------------------------------------------- -diff --git a/include/wx/things/range.h b/include/wx/things/range.h -index a4dffce..cb84ee4 100644 ---- a/include/wx/things/range.h -+++ b/include/wx/things/range.h -@@ -16,6 +16,8 @@ - - #include "wx/things/thingdef.h" - -+#include -+ - class WXDLLIMPEXP_THINGS wxRangeInt; - class WXDLLIMPEXP_THINGS wxRangeDouble; - class WXDLLIMPEXP_THINGS wxRangeIntSelection; -diff --git a/include/wx/things/toggle.h b/include/wx/things/toggle.h -index 3dcfc1e..454ddd2 100644 ---- a/include/wx/things/toggle.h -+++ b/include/wx/things/toggle.h -@@ -74,6 +74,9 @@ You have to #include "wx/tglbtn.h" for EVT_TOGGLEBUTTON - - #include "wx/things/thingdef.h" - -+#include -+#include -+ - class WXDLLEXPORT wxTimer; - class WXDLLEXPORT wxTimerEvent; - -@@ -227,6 +230,7 @@ protected: - int m_down; // toggle state if m_down%2 then depressed - bool m_focused; // mouse in window - long m_button_style; -+ bool m_fit; // resize the button to fit - - // the bitmaps for various states - wxBitmap m_bmpLabel, -diff --git a/samples/filebrws/wxfilebrowser.cpp b/samples/filebrws/wxfilebrowser.cpp -index 4f48fa9..028abc2 100644 ---- a/samples/filebrws/wxfilebrowser.cpp -+++ b/samples/filebrws/wxfilebrowser.cpp -@@ -29,7 +29,7 @@ - #include "wx/things/filebrws.h" - - /* XPM */ --static char *mondrian_xpm[] = { -+static const char *mondrian_xpm[] = { - /* columns rows colors chars-per-pixel */ - "32 32 6 1", - " c Black", -@@ -229,7 +229,9 @@ void MyFrame::OnGenericFileDlg( wxCommandEvent &WXUNUSED(event) ) - //wxLog *oldLog; - //oldLog = wxLog::SetActiveTarget(&log); - -- wxGenericFileDialog fileDialog(this, wxT("Select a file")); -+ // wxGenericFileDialog isn't part of any standard wx library -+ //wxGenericFileDialog fileDialog(this, wxT("Select a file")); -+ wxFileDialog fileDialog(this, wxT("Select a file")); - - //log.Flush(); - //wxLog::SetActiveTarget(oldLog); -diff --git a/samples/things/thingsdemo.cpp b/samples/things/thingsdemo.cpp -index 08eb021..fac8ea8 100644 ---- a/samples/things/thingsdemo.cpp -+++ b/samples/things/thingsdemo.cpp -@@ -33,7 +33,7 @@ - #include "wx/things/bmpcombo.h" - - /* XPM */ --static char *mondrian_xpm[] = { -+static const char *mondrian_xpm[] = { - /* columns rows colors chars-per-pixel */ - "32 32 6 1", - " c Black", -diff --git a/samples/things/thingsdemo.rc b/samples/things/thingsdemo.rc -index b86c4e2..dd66039 100644 ---- a/samples/things/thingsdemo.rc -+++ b/samples/things/thingsdemo.rc -@@ -1 +1 @@ --#include "wx/msw/wx.rc" -+//#include "wx/msw/wx.rc" -diff --git a/src/block.cpp b/src/block.cpp -index 19f1638..e7ce995 100644 ---- a/src/block.cpp -+++ b/src/block.cpp -@@ -23,6 +23,7 @@ - #endif // WX_PRECOMP - - #include "wx/things/block.h" -+#include "wx/wxcrtvararg.h" - - // use this to check to see if there is any overlap after minimizing - //#define CHECK_BLOCK_OVERLAP 1 -diff --git a/src/bmpcombo.cpp b/src/bmpcombo.cpp -index 5b3f031..635aa49 100644 ---- a/src/bmpcombo.cpp -+++ b/src/bmpcombo.cpp -@@ -9,6 +9,7 @@ - // Licence: wxWidgets licence - ///////////////////////////////////////////////////////////////////////////// - -+#ifndef __WXMAC__ - #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) - #pragma implementation "bmpcombo.h" - #endif -@@ -202,7 +203,7 @@ void wxBitmapComboLabel::OnPaint( wxPaintEvent &WXUNUSED(event) ) - dc.SetFont(m_bmpCombo->GetFont()); - //dc.SetBackground(*wxTheBrushList->FindOrCreateBrush(GetBackgroundColour(), wxSOLID)); - //dc.Clear(); -- dc.SetBrush(*wxTheBrushList->FindOrCreateBrush(GetBackgroundColour(), wxSOLID)); -+ dc.SetBrush(*wxTheBrushList->FindOrCreateBrush(GetBackgroundColour(), wxBRUSHSTYLE_SOLID)); - dc.SetPen(*wxTRANSPARENT_PEN); - dc.DrawRectangle(wxRect(wxPoint(0,0), GetClientSize())); - -@@ -577,3 +578,5 @@ bool wxBitmapComboBox::SetBackgroundColour(const wxColour &colour) - } - return DropDownBase::SetBackgroundColour(colour); - } -+ -+#endif // NOT __WXMAC__ -diff --git a/src/dropdown.cpp b/src/dropdown.cpp -index 6450cb8..d4743af 100644 ---- a/src/dropdown.cpp -+++ b/src/dropdown.cpp -@@ -9,6 +9,7 @@ - // Licence: wxWidgets licence - ///////////////////////////////////////////////////////////////////////////// - -+#ifndef __WXMAC__ - #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) - #pragma implementation "dropdown.h" - #endif -@@ -29,6 +30,7 @@ - #include "wx/things/dropdown.h" - #include "wx/things/toggle.h" - #include "wx/renderer.h" -+#include "wx/wxcrtvararg.h" - - /* XPM */ - static const char *down_arrow_xpm_data[] = { -@@ -147,7 +149,7 @@ void DropDownPopup::OnTimer( wxTimerEvent &WXUNUSED(event) ) - //wxPrintf(wxT("**DropDownPopup::OnTimer mouse %d %d -- %d %d %d\n"), m_mouse.x, m_mouse.y, m_popped_handler, m_child, m_handlerPopup); fflush(stdout); - // pop the event handler if inside the child window or - // restore the event handler if not in the child window -- if (clientRect.Inside(m_mouse)) -+ if (clientRect.Contains(m_mouse)) - PopPopupHandler(child); - else - PushPopupHandler(child); -@@ -167,7 +169,7 @@ void DropDownPopup::OnIdle( wxIdleEvent& event ) - //wxPrintf(wxT("**DropDownPopup::OnIdle mouse %d %d -- %d %d %d\n"), m_mouse.x, m_mouse.y, m_popped_handler, m_child, m_handlerPopup); fflush(stdout); - // pop the event handler if inside the child window or - // restore the event handler if not in the child window -- if (clientRect.Inside(m_mouse)) -+ if (clientRect.Contains(m_mouse)) - PopPopupHandler(child); - else - PushPopupHandler(child); -@@ -183,7 +185,11 @@ void DropDownPopup::OnMouse( wxMouseEvent& event ) - - void DropDownPopup::OnKeyDown( wxKeyEvent &event ) - { -+#if wxCHECK_VERSION(2,9,0) -+ if (GetChild() && GetChild()->ProcessWindowEvent(event)) -+#else - if (GetChild() && GetChild()->ProcessEvent(event)) -+#endif - event.Skip(false); - else - event.Skip(true); -@@ -253,7 +259,7 @@ bool DropDownPopup::ProcessLeftDown( wxMouseEvent &event ) - } - } - -- if (GetClientRect().Inside(m_mouse)) -+ if (GetClientRect().Contains(m_mouse)) - return false; - - Dismiss(); -@@ -403,3 +409,4 @@ void DropDownBase::OnDropButton( wxCommandEvent &WXUNUSED(event)) - else - ShowPopup(); - } -+#endif // NOT __WXMAC__ -diff --git a/src/filebrws.cpp b/src/filebrws.cpp -index f984875..d37000d 100644 ---- a/src/filebrws.cpp -+++ b/src/filebrws.cpp -@@ -353,7 +353,12 @@ int CopyDir(const wxString& fromDir, const wxString& toDir) - // first make sure that the source dir exists - if(!wxDir::Exists(from)) - { -+#if wxCHECK_VERSION(2,9,0) - wxLogError(from + wxT(" does not exist. Can not copy directory.")); -+#else -+ // https://groups.google.com/forum/?fromgroups=#!topic/wx-users/sV-_jhhQ3jE -+ wxLogError(from + wxT(" does not exist. Can not copy directory."), NULL); -+#endif - return 0; - } - -@@ -545,7 +550,7 @@ void OpenWithDialog::OnButton(wxCommandEvent& event) - wxFileNameFromPath(startPath), - wxEmptyString, - filters, -- wxOPEN|wxFILE_MUST_EXIST ); -+ wxFD_OPEN|wxFD_FILE_MUST_EXIST ); - if (!fileName.IsEmpty()) - { - fileName += wxT(" \"") + m_fileData.GetFilePath() + wxT("\""); -@@ -990,9 +995,15 @@ bool wxFileBrowser::Create( wxWindow *parent, const wxWindowID id, - - m_dirCtrl->Show(true); - -+#if wxCHECK_VERSION(2,9,0) -+ m_fileCtrl = new wxFileListCtrl(m_splitterWin, wxID_ANY, GetWild(), false, -+ wxDefaultPosition, wxSize(50,50), -+ wxNO_BORDER|wxLC_SINGLE_SEL|FBStyleToLCStyle(style)); -+#else - m_fileCtrl = new wxFileCtrl(m_splitterWin, wxID_ANY, GetWild(), false, - wxDefaultPosition, wxSize(50,50), - wxNO_BORDER|wxLC_SINGLE_SEL|FBStyleToLCStyle(style)); -+#endif - m_fileCtrl->Show(true); - m_fileCtrl->GoToDir(m_path); - -@@ -1040,7 +1051,11 @@ void wxFileBrowser::OnSize( wxSizeEvent &event ) - GtkWidget *widget = GTK_WIDGET(win->m_widget); - //gtk_widget_set_usize(widget, size.x, size.y); this is deprecated use below - gtk_widget_set_size_request(widget, size.x, size.y); -+#ifdef __WXGTK3__ -+ if (gtk_widget_get_visible(widget)) -+#else - if (GTK_WIDGET_VISIBLE(widget)) -+#endif - gtk_widget_queue_resize(widget); - } - #endif //__WXGTK__ -@@ -2165,7 +2180,7 @@ void wxFileBrowser::OnListMenu(wxCommandEvent &event) - wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); - - wxScrolledWindow *scrWin = new wxScrolledWindow(&dialog, -1); -- wxStaticBitmap *statBitmap = new wxStaticBitmap(scrWin, -1, wxBitmap(image)); -+ //wxStaticBitmap *statBitmap = new wxStaticBitmap(scrWin, -1, wxBitmap(image)); - - // not necessary in MSW - int ext = 0; //dialog.GetSize().GetWidth() - dialog.GetClientSize().GetWidth(); -diff --git a/src/genergdi.cpp b/src/genergdi.cpp -index 3f74e05..f72ceaf 100644 ---- a/src/genergdi.cpp -+++ b/src/genergdi.cpp -@@ -22,6 +22,9 @@ - #include "wx/things/genergdi.h" - #include "wx/tokenzr.h" - -+//This next line added by SC@SDL on 10/5/07 for Solaris compile: -+#include -+ - const wxGenericColour wxNullGenericColour; - const wxGenericPen wxNullGenericPen; - const wxGenericBrush wxNullGenericBrush; -@@ -261,8 +264,8 @@ IMPLEMENT_DYNAMIC_CLASS(wxGenericPen, wxObject) - class wxGenericPenRefData : public wxObjectRefData - { - public: -- wxGenericPenRefData(int width = 1, int style = wxSOLID, -- int cap = wxCAP_ROUND, int join = wxJOIN_ROUND) -+ wxGenericPenRefData(int width = 1, wxPenStyle style = wxPENSTYLE_SOLID, -+ wxPenCap cap = wxCAP_ROUND, wxPenJoin join = wxJOIN_ROUND) - : wxObjectRefData(), m_width(width), m_style(style), - m_cap(cap), m_join(join), - m_dash_count(0), m_dash(NULL) {} -@@ -283,9 +286,9 @@ public: - - wxGenericColour m_colour; - int m_width; -- int m_style; -- int m_cap; -- int m_join; -+ wxPenStyle m_style; -+ wxPenCap m_cap; -+ wxPenJoin m_join; - - int m_dash_count; // don't arbitrarily adjust these! - wxDash *m_dash; -@@ -313,15 +316,15 @@ void wxGenericPen::Create( const wxPen &pen ) - m_refData = new wxGenericPenRefData; - Set(pen); - } --void wxGenericPen::Create(const wxGenericColour &colour, int width, int style, -- int cap, int join ) -+void wxGenericPen::Create(const wxGenericColour &colour, int width, wxPenStyle style, -+ wxPenCap cap, wxPenJoin join ) - { - UnRef(); - m_refData = new wxGenericPenRefData(width, style, cap, join); - M_GPENDATA->m_colour = colour; - } --void wxGenericPen::Create(const wxColour &colour, int width, int style, -- int cap, int join ) -+void wxGenericPen::Create(const wxColour &colour, int width, wxPenStyle style, -+ wxPenCap cap, wxPenJoin join) - { - Create(wxGenericColour(colour), width, style, cap, join); - } -@@ -367,17 +370,17 @@ void wxGenericPen::SetColour( int red, int green, int blue, int alpha ) - { - SetColour(wxGenericColour(red, green, blue, alpha)); - } --void wxGenericPen::SetCap( int capStyle ) -+void wxGenericPen::SetCap( wxPenCap capStyle ) - { - wxCHECK_RET(Ok(), wxT("Invalid generic pen")); - M_GPENDATA->m_cap = capStyle; - } --void wxGenericPen::SetJoin( int joinStyle ) -+void wxGenericPen::SetJoin( wxPenJoin joinStyle ) - { - wxCHECK_RET(Ok(), wxT("Invalid generic pen")); - M_GPENDATA->m_join = joinStyle; - } --void wxGenericPen::SetStyle( int style ) -+void wxGenericPen::SetStyle( wxPenStyle style ) - { - wxCHECK_RET(Ok(), wxT("Invalid generic pen")); - M_GPENDATA->m_style = style; -@@ -439,17 +442,17 @@ int wxGenericPen::GetWidth() const - wxCHECK_MSG(Ok(), 1, wxT("Invalid generic pen")); - return M_GPENDATA->m_width; - } --int wxGenericPen::GetStyle() const -+wxPenStyle wxGenericPen::GetStyle() const - { -- wxCHECK_MSG(Ok(), wxSOLID, wxT("Invalid generic pen")); -+ wxCHECK_MSG(Ok(), wxPENSTYLE_SOLID, wxT("Invalid generic pen")); - return M_GPENDATA->m_style; - } --int wxGenericPen::GetCap() const -+wxPenCap wxGenericPen::GetCap() const - { - wxCHECK_MSG(Ok(), wxCAP_ROUND, wxT("Invalid generic pen")); - return M_GPENDATA->m_cap; - } --int wxGenericPen::GetJoin() const -+wxPenJoin wxGenericPen::GetJoin() const - { - wxCHECK_MSG(Ok(), wxJOIN_ROUND, wxT("Invalid generic pen")); - return M_GPENDATA->m_join; -@@ -567,7 +570,7 @@ class wxGenericBrushRefData : public wxObjectRefData - { - public: - wxGenericBrushRefData(const wxGenericColour& c = wxNullGenericColour, -- int style = wxSOLID) : wxObjectRefData(), -+ wxBrushStyle style = wxBRUSHSTYLE_SOLID) : wxObjectRefData(), - m_colour(c), m_style(style) {} - - wxGenericBrushRefData(const wxGenericBrushRefData& data) : wxObjectRefData(), -@@ -576,7 +579,7 @@ public: - ~wxGenericBrushRefData() { } - - wxGenericColour m_colour; -- int m_style; -+ wxBrushStyle m_style; - wxBitmap m_stipple; - }; - -@@ -602,12 +605,12 @@ void wxGenericBrush::Create( const wxBrush &brush ) - m_refData = new wxGenericBrushRefData; - Set(brush); - } --void wxGenericBrush::Create(const wxGenericColour &colour, int style) -+void wxGenericBrush::Create(const wxGenericColour &colour, wxBrushStyle style) - { - UnRef(); - m_refData = new wxGenericBrushRefData(colour, style); - } --void wxGenericBrush::Create(const wxColour &colour, int style) -+void wxGenericBrush::Create(const wxColour &colour, wxBrushStyle style) - { - Create(wxGenericColour(colour), style); - } -@@ -616,7 +619,7 @@ void wxGenericBrush::Create( const wxBitmap &stipple ) - UnRef(); - wxCHECK_RET(stipple.Ok(), wxT("Invalid bitmap in wxGenericBrush::Create")); - -- int style = stipple.GetMask() ? wxSTIPPLE_MASK_OPAQUE : wxSTIPPLE; -+ wxBrushStyle style = stipple.GetMask() ? wxBRUSHSTYLE_STIPPLE_MASK_OPAQUE : wxBRUSHSTYLE_STIPPLE; - m_refData = new wxGenericBrushRefData(wxNullGenericColour, style); - M_GBRUSHDATA->m_stipple = stipple; - } -@@ -652,7 +655,7 @@ void wxGenericBrush::SetColour( int red, int green, int blue, int alpha ) - { - SetColour(wxGenericColour(red, green, blue, alpha)); - } --void wxGenericBrush::SetStyle( int style ) -+void wxGenericBrush::SetStyle( wxBrushStyle style ) - { - wxCHECK_RET(Ok(), wxT("Invalid generic brush")); - M_GBRUSHDATA->m_style = style; -@@ -661,7 +664,7 @@ void wxGenericBrush::SetStipple(const wxBitmap& stipple) - { - wxCHECK_RET(Ok(), wxT("Invalid generic brush")); - M_GBRUSHDATA->m_stipple = stipple; -- M_GBRUSHDATA->m_style = stipple.GetMask() ? wxSTIPPLE_MASK_OPAQUE : wxSTIPPLE; -+ M_GBRUSHDATA->m_style = stipple.GetMask() ? wxBRUSHSTYLE_STIPPLE_MASK_OPAQUE : wxBRUSHSTYLE_STIPPLE; - - } - -@@ -684,9 +687,9 @@ wxColour wxGenericBrush::GetColour() const - wxCHECK_MSG(Ok(), wxNullColour, wxT("Invalid generic brush")); - return M_GBRUSHDATA->m_colour.GetColour(); - } --int wxGenericBrush::GetStyle() const -+wxBrushStyle wxGenericBrush::GetStyle() const - { -- wxCHECK_MSG(Ok(), wxSOLID, wxT("Invalid generic brush")); -+ wxCHECK_MSG(Ok(), wxBRUSHSTYLE_SOLID, wxT("Invalid generic brush")); - return M_GBRUSHDATA->m_style; - } - wxBitmap* wxGenericBrush::GetStipple() const -@@ -701,7 +704,7 @@ bool wxGenericBrush::IsSameAs(const wxGenericBrush& brush) const - wxGenericBrushRefData *bData = (wxGenericBrushRefData*)brush.GetRefData(); - return (M_GBRUSHDATA->m_colour == bData->m_colour) && - (M_GBRUSHDATA->m_style == bData->m_style) && -- (M_GBRUSHDATA->m_stipple == bData->m_stipple); -+ (M_GBRUSHDATA->m_stipple.IsSameAs(bData->m_stipple)); - } - bool wxGenericBrush::IsSameAs(const wxBrush& brush) const - { -diff --git a/src/menubtn.cpp b/src/menubtn.cpp -index b83b5cb..589780b 100644 ---- a/src/menubtn.cpp -+++ b/src/menubtn.cpp -@@ -81,7 +81,7 @@ public: - { - wxPoint p = GetParent()->ScreenToClient(wxGetMousePosition()); - -- if (GetRect().Inside(p) || labelBut->GetRect().Inside(p)) -+ if (GetRect().Contains(p) || labelBut->GetRect().Contains(p)) - { - m_focused = true; - -@@ -125,7 +125,7 @@ public: - { - wxPoint p = GetParent()->ScreenToClient(wxGetMousePosition()); - -- if (GetRect().Inside(p) || dropBut->GetRect().Inside(p)) -+ if (GetRect().Contains(p) || dropBut->GetRect().Contains(p)) - { - m_focused = true; - -@@ -247,7 +247,15 @@ void wxMenuButton::OnButton( wxCommandEvent &event) - bool check_next = false; - - // find the next available radio item to check -+#if wxUSE_STD_CONTAINERS -+ // as described in wxWidgets "Container Classes" documentation -+ // http://docs.wxwidgets.org/3.0/overview_container.html#overview_container_std -+ // wxList::compatibility_iterator must be used instead of wxList::Node* when -+ // iterating over the list contents -+ for (wxMenuItemList::compatibility_iterator node = items.GetFirst(); node; node = node->GetNext()) -+#else - for (wxMenuItemList::Node *node = items.GetFirst(); node; node = node->GetNext()) -+#endif - { - wxMenuItem *mi = (wxMenuItem*)node->GetData(); - if (mi && (mi->GetKind() == wxITEM_RADIO)) -@@ -287,7 +295,15 @@ int wxMenuButton::GetSelection() const - - const wxMenuItemList &items = m_menu->GetMenuItems(); - -+#if wxUSE_STD_CONTAINERS -+ // as described in wxWidgets "Container Classes" documentation -+ // http://docs.wxwidgets.org/3.0/overview_container.html#overview_container_std -+ // wxList::compatibility_iterator must be used instead of wxList::Node* when -+ // iterating over the list contents -+ for (wxMenuItemList::compatibility_iterator node = items.GetFirst(); node; node = node->GetNext()) -+#else - for (wxMenuItemList::Node *node = items.GetFirst(); node; node = node->GetNext()) -+#endif - { - wxMenuItem *mi = (wxMenuItem*)node->GetData(); - if (mi && (mi->GetKind() == wxITEM_RADIO)) -diff --git a/src/optvalue.cpp b/src/optvalue.cpp -index 02ea640..0f1fdb4 100644 ---- a/src/optvalue.cpp -+++ b/src/optvalue.cpp -@@ -25,6 +25,7 @@ - - #include "wx/tokenzr.h" - #include "wx/things/optvalue.h" -+#include "wx/wxcrtvararg.h" - - #include "wx/arrimpl.cpp" - WX_DEFINE_OBJARRAY(wxArrayOptionValue); -diff --git a/src/spinctld.cpp b/src/spinctld.cpp -index 214d80c..e23999e 100644 ---- a/src/spinctld.cpp -+++ b/src/spinctld.cpp -@@ -25,6 +25,11 @@ - #include "wx/things/spinctld.h" - #include - -+//These 3 lines added by SC@SDL on 10/5/07 for Solaris compile: -+#if defined(__sun__) -+#include -+#endif -+ - #if wxCHECK_VERSION(2,5,0) - #include "wx/math.h" - #else -@@ -188,7 +193,7 @@ bool wxSpinCtrlDbl::Create( wxWindow *parent, wxWindowID id, - wxTE_NOHIDESEL|wxTE_PROCESS_ENTER, validator); - - DoSetSize( pos.x, pos.y, width, height ); -- SetBestSize(wxSize(width, height)); -+ SetInitialSize(wxSize(width, height)); - - m_min = min; - m_max = max; -@@ -339,14 +344,14 @@ void wxSpinCtrlDbl::OnChar( wxKeyEvent &event ) - DoSendEvent(); - break; - } -- case WXK_PRIOR : // pg-up -+ case WXK_PAGEUP : - { - if (m_textCtrl && m_textCtrl->IsModified()) SyncSpinToText(false); - SetValue( m_value + m_increment * 10.0 * modifier ); - DoSendEvent(); - break; - } -- case WXK_NEXT : // pg-down -+ case WXK_PAGEDOWN : - { - if (m_textCtrl && m_textCtrl->IsModified()) SyncSpinToText(false); - SetValue( m_value - m_increment * 10.0 * modifier ); -diff --git a/src/toggle.cpp b/src/toggle.cpp -index 9765308..41dd56b 100644 ---- a/src/toggle.cpp -+++ b/src/toggle.cpp -@@ -60,6 +60,7 @@ void wxCustomButton::Init() - m_timer = NULL; - m_eventType = 0; - m_button_style = wxCUSTBUT_TOGGLE|wxCUSTBUT_BOTTOM; -+ m_fit = false; - } - - bool wxCustomButton::Create(wxWindow* parent, wxWindowID id, -@@ -82,7 +83,7 @@ bool wxCustomButton::Create(wxWindow* parent, wxWindowID id, - - wxSize bestSize = DoGetBestSize(); - SetSize(wxSize(size.x<0 ? bestSize.x:size.x, size.y<0 ? bestSize.y:size.y)); -- SetBestSize(GetSize()); -+ SetInitialSize(GetSize()); - - CalcLayout(true); - return true; -@@ -124,6 +125,7 @@ bool wxCustomButton::SetButtonStyle(long style) - void wxCustomButton::SetLabel( const wxString &label ) - { - wxControl::SetLabel(label); -+ if (m_fit) SetMinSize(DoGetBestSize()); - CalcLayout(true); - } - -@@ -153,7 +155,7 @@ void wxCustomButton::OnMouseEvents(wxMouseEvent& event) - - m_eventType = wxEVT_LEFT_UP; - -- if (wxRect(wxPoint(0,0), GetSize()).Inside(event.GetPosition())) -+ if (wxRect(wxPoint(0,0), GetSize()).Contains(event.GetPosition())) - { - if ((m_button_style & wxCUSTBUT_BUTTON) && (m_down > 0)) - { -@@ -188,7 +190,7 @@ void wxCustomButton::OnMouseEvents(wxMouseEvent& event) - - m_eventType = wxEVT_RIGHT_UP; - -- if (wxRect(wxPoint(0,0), GetSize()).Inside(event.GetPosition())) -+ if (wxRect(wxPoint(0,0), GetSize()).Contains(event.GetPosition())) - { - if ((m_button_style & wxCUSTBUT_BUTTON) && (m_down > 0)) - { -@@ -283,6 +285,15 @@ void wxCustomButton::SendEvent() - eventOut.SetEventObject(this); - GetEventHandler()->ProcessEvent(eventOut); - } -+ else if (((m_button_style & wxCUSTBUT_BUTTON) && (m_eventType == wxEVT_RIGHT_UP)) || -+ ((m_button_style & wxCUSTBUT_TOGGLE) && (m_eventType == wxEVT_RIGHT_UP))) -+ { -+ wxContextMenuEvent eventOut(wxEVT_CONTEXT_MENU, GetId()); -+ eventOut.SetInt(0); -+ eventOut.SetExtraLong(m_eventType); -+ eventOut.SetEventObject(this); -+ GetEventHandler()->ProcessEvent(eventOut); -+ } - else - { - wxCommandEvent eventOut(wxEVT_COMMAND_BUTTON_CLICKED, GetId()); -@@ -372,8 +383,6 @@ void wxCustomButton::Redraw() - - void wxCustomButton::Paint( wxDC &dc ) - { -- dc.BeginDrawing(); -- - int w, h; - GetSize(&w,&h); - -@@ -412,7 +421,7 @@ void wxCustomButton::Paint( wxDC &dc ) - foreColour = wxSystemSettings::GetColour(wxSYS_COLOUR_GRAYTEXT); - } - -- wxBrush brush(backColour, wxSOLID); -+ wxBrush brush(backColour, wxBRUSHSTYLE_SOLID); - dc.SetBackground(brush); - dc.SetBrush(brush); - dc.SetPen(*wxTRANSPARENT_PEN); -@@ -452,7 +461,6 @@ void wxCustomButton::Paint( wxDC &dc ) - dc.SetBackground(wxNullBrush); - dc.SetBrush(wxNullBrush); - dc.SetPen(wxNullPen); -- dc.EndDrawing(); - } - - void wxCustomButton::OnSize( wxSizeEvent &event ) -@@ -465,18 +473,21 @@ void wxCustomButton::SetMargins(const wxSize &margin, bool fit) - { - m_labelMargin = margin; - m_bitmapMargin = margin; -+ m_fit = fit; - CalcLayout(true); - if (fit) SetSize(DoGetBestSize()); - } - void wxCustomButton::SetLabelMargin(const wxSize &margin, bool fit) - { - m_labelMargin = margin; -+ m_fit = fit; - CalcLayout(true); - if (fit) SetSize(DoGetBestSize()); - } - void wxCustomButton::SetBitmapMargin(const wxSize &margin, bool fit) - { - m_bitmapMargin = margin; -+ m_fit = fit; - CalcLayout(true); - if (fit) SetSize(DoGetBestSize()); - } diff --git a/patches/wxx.tlc.patch b/patches/wxx.tlc.patch deleted file mode 100644 index 7af2b53..0000000 --- a/patches/wxx.tlc.patch +++ /dev/null @@ -1,247 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -new file mode 100644 -index 0000000..3d357df ---- /dev/null -+++ b/CMakeLists.txt -@@ -0,0 +1,39 @@ -+set(lib_name tlc) # wxTreeListCtrl -+####################################### -+set(treelist_srcs -+ src/treelistctrl.cpp -+ ) -+list(APPEND ${lib_name}_libsrcs ${treelist_srcs}) -+######################## -+set(treelist_hdrs -+ include/wx/treelistctrl.h -+ ) -+list(APPEND ${lib_name}_libsrcs ${treelist_hdrs}) -+####################################### -+add_library(${lib_name} STATIC ${${lib_name}_libsrcs}) -+target_include_directories(${lib_name} PUBLIC $ -+ $ -+ ) -+target_link_libraries(${lib_name} PUBLIC wx::core) -+list(TRANSFORM WXX_OUTPUT_NAME REPLACE "@TARGET@" "${lib_name}") -+set_target_properties(${lib_name} PROPERTIES OUTPUT_NAME ${WXX_OUTPUT_NAME}) -+####################################### -+install(TARGETS ${lib_name} EXPORT ${targetsFile} -+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} -+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} -+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} -+ ) -+install(FILES ${treelist_hdrs} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/wx/treelistctrl) -+####################################### -+set(samples_treelisttest_srcs -+ samples/treelisttest/BuildInfo.txt -+ samples/treelisttest/treelisttest.cpp -+ samples/treelisttest/treelisttest.rc -+ samples/treelisttest/treelisttest.xpm -+ ) -+foreach(sample -+ samples_treelisttest -+ ) -+ add_executable(${sample} WIN32 ${${sample}_srcs}) -+ target_link_libraries(${sample} PRIVATE ${lib_name}) -+endforeach() -diff --git a/samples/treelisttest/treelisttest.cpp b/samples/treelisttest/treelisttest.cpp -index 1b51cb1..453608b 100644 ---- a/samples/treelisttest/treelisttest.cpp -+++ b/samples/treelisttest/treelisttest.cpp -@@ -412,7 +412,7 @@ AppAbout::AppAbout (wxWindow *parent, - wxBoxSizer *totalpane = new wxBoxSizer (wxVERTICAL); - totalpane->Add (0, 10); - wxStaticText *appname = new wxStaticText(this, -1, APP_NAME); -- appname->SetFont (wxFont (20, wxDEFAULT, wxNORMAL, wxBOLD)); -+ appname->SetFont (wxFont (20, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD)); - totalpane->Add (appname, 0, wxALIGN_CENTER | wxLEFT | wxRIGHT, 40); - totalpane->Add (0, 10); - totalpane->Add (aboutpane, 0, wxEXPAND | wxLEFT | wxRIGHT | wxBOTTOM, 10); -@@ -592,7 +592,8 @@ AppFrame::AppFrame (const wxString &title) - CheckStyle (myID_ITEMEDIT, wxTR_EDIT_LABELS); - CheckStyle (myID_ITEMVIRTUAL, wxTR_VIRTUAL); - CheckStyle (myID_SELECTMULTIPLE, wxTR_MULTIPLE); -- CheckStyle (myID_SELECTEXTENDED, wxTR_EXTENDED); -+ // https://comp.soft-sys.wxwindows.narkive.com/DDowWbRY/wxtreectrl-multiple-selection#post2 -+ CheckStyle (myID_SELECTEXTENDED, wxTR_MULTIPLE); - - // initialize tree - m_treelist->SetBackgroundColour(wxColour(240,240,240)); -@@ -866,7 +867,7 @@ void AppFrame::OnSelectMultiple (wxCommandEvent &event) { - } - - void AppFrame::OnSelectExtended (wxCommandEvent &event) { -- ToggleStyle (event.GetId(), wxTR_EXTENDED); -+ ToggleStyle (event.GetId(), wxTR_MULTIPLE); - } - - void AppFrame::OnGetCount (wxCommandEvent &WXUNUSED(event)) { -@@ -1007,7 +1008,7 @@ const wxChar *name; - int flags, col; - wxTreeItemId item = m_treelist->HitTest(p, flags, col); - wxLogMessage("HitTest() pos=%4d,%4d item=<%X> flags=<%X> col=<%d>", -- event.GetPoint().x, event.GetPoint().y, (unsigned int)(item.m_pItem), flags, col); -+ event.GetPoint().x, event.GetPoint().y, (intptr_t)(item.m_pItem), flags, col); - name = _("wxEVT_COMMAND_TREE_ITEM_MIDDLE_CLICK"); - } else - if (event.GetEventType() == wxEVT_COMMAND_TREE_SEL_CHANGED) { -@@ -1034,7 +1035,7 @@ const wxChar *name; - } - wxLogMessage(_("TREE type=<%s (%d)> item=<%X> label=<%s> col=<%d> isOK=%s keycode=<%d> point=<%d, %d> isEditCancelled=<%s>"), - name, event.GetEventType(), -- (unsigned int)(event.GetItem().m_pItem), event.GetLabel().c_str(), event.GetInt(), event.GetItem().IsOk() ? _("true") : _("false"), -+ (intptr_t)(event.GetItem().m_pItem), event.GetLabel().c_str(), event.GetInt(), event.GetItem().IsOk() ? _("true") : _("false"), - event.GetKeyCode(), event.GetPoint().x, event.GetPoint().y, event.IsEditCancelled() ? _("true") : _("false") - ); - -@@ -1044,7 +1045,7 @@ const wxChar *name; - wxArrayTreeItemIds aId; - for (unsigned int i=0; iGetSelections(aId); i++) { - wxString s; -- s.Printf(_("%X "), (unsigned int)(aId[i].m_pItem)); -+ s.Printf(_("%X "), (intptr_t)(aId[i].m_pItem)); - sSel += s; - } - // wxLogMessage(_("selected: ") + sSel); -diff --git a/src/treelistctrl.cpp b/src/treelistctrl.cpp -index 4189e37..10def35 100644 ---- a/src/treelistctrl.cpp -+++ b/src/treelistctrl.cpp -@@ -50,10 +50,6 @@ - #include - #include - --#ifdef __WXMAC__ --#include "wx/mac/private.h" --#endif -- - #include "wx/treelistctrl.h" - - #include // only required for debugging purpose -@@ -1289,7 +1285,7 @@ void wxTreeListHeaderWindow::DoDrawRect( wxDC *dc, int x, int y, int w, int h ) - #if !wxCHECK_VERSION(2, 5, 0) - wxPen pen (wxSystemSettings::GetSystemColour (wxSYS_COLOUR_BTNSHADOW ), 1, wxSOLID); - #else -- wxPen pen (wxSystemSettings::GetColour (wxSYS_COLOUR_BTNSHADOW ), 1, wxSOLID); -+ wxPen pen (wxSystemSettings::GetColour (wxSYS_COLOUR_BTNSHADOW ), 1, wxPENSTYLE_SOLID); - #endif - - const int m_corner = 1; -@@ -1487,7 +1483,7 @@ void wxTreeListHeaderWindow::DrawCurrent() - - wxScreenDC dc; - dc.SetLogicalFunction (wxINVERT); -- dc.SetPen (wxPen (*wxBLACK, 2, wxSOLID)); -+ dc.SetPen (wxPen (*wxBLACK, 2, wxPENSTYLE_SOLID)); - dc.SetBrush (*wxTRANSPARENT_BRUSH); - - AdjustDC(dc); -@@ -1969,8 +1965,8 @@ void wxTreeListMainWindow::Init() { - m_hilightBrush = new wxBrush (wxSystemSettings::GetSystemColour (wxSYS_COLOUR_HIGHLIGHT), wxSOLID); - m_hilightUnfocusedBrush = new wxBrush (wxSystemSettings::GetSystemColour (wxSYS_COLOUR_BTNSHADOW), wxSOLID); - #else -- m_hilightBrush = new wxBrush (wxSystemSettings::GetColour (wxSYS_COLOUR_HIGHLIGHT), wxSOLID); -- m_hilightUnfocusedBrush = new wxBrush (wxSystemSettings::GetColour (wxSYS_COLOUR_BTNSHADOW), wxSOLID); -+ m_hilightBrush = new wxBrush (wxSystemSettings::GetColour (wxSYS_COLOUR_HIGHLIGHT), wxBRUSHSTYLE_SOLID); -+ m_hilightUnfocusedBrush = new wxBrush (wxSystemSettings::GetColour (wxSYS_COLOUR_BTNSHADOW), wxBRUSHSTYLE_SOLID); - #endif - - m_imageListNormal = (wxImageList *) NULL; -@@ -2004,7 +2000,7 @@ void wxTreeListMainWindow::Init() { - m_boldFont = wxFont( m_normalFont.GetPointSize(), - m_normalFont.GetFamily(), - m_normalFont.GetStyle(), -- wxBOLD, -+ wxFONTWEIGHT_BOLD, - m_normalFont.GetUnderlined(), - m_normalFont.GetFaceName(), - m_normalFont.GetEncoding()); -@@ -2023,8 +2019,6 @@ bool wxTreeListMainWindow::Create (wxTreeListCtrl *parent, - const wxString& name) { - - #ifdef __WXMAC__ -- if (style & wxTR_HAS_BUTTONS) style |= wxTR_MAC_BUTTONS; -- if (style & wxTR_HAS_BUTTONS) style &= ~wxTR_HAS_BUTTONS; - style &= ~wxTR_LINES_AT_ROOT; - style |= wxTR_NO_LINES; - -@@ -2067,7 +2061,7 @@ bool wxTreeListMainWindow::Create (wxTreeListCtrl *parent, - } - #else - //? m_dottedPen = wxPen( *wxGREY_PEN, 1, wxDOT ); // too slow under XFree86 -- m_dottedPen = wxPen( _T("grey"), 0, 0 ); // Bitmap based pen is not supported by GTK! -+ m_dottedPen = wxPen( _T("grey"), 0, wxPENSTYLE_DOT ); // Bitmap based pen is not supported by GTK! - #endif - - m_owner = parent; -@@ -2334,7 +2328,7 @@ bool wxTreeListMainWindow::SetFont (const wxFont &font) { - m_boldFont = wxFont (m_normalFont.GetPointSize(), - m_normalFont.GetFamily(), - m_normalFont.GetStyle(), -- wxBOLD, -+ wxFONTWEIGHT_BOLD, - m_normalFont.GetUnderlined(), - m_normalFont.GetFaceName()); - CalculateLineHeight(); -@@ -3392,7 +3386,7 @@ void wxTreeListMainWindow::PaintItem (wxTreeListItem *item, wxDC& dc) { - - // determine background and show it - // in wxTR_FULL_ROW_HIGHLIGHT mode, some drawing can be done already now -- dc.SetBrush (wxBrush ( colBg, wxSOLID)); -+ dc.SetBrush (wxBrush ( colBg, wxBRUSHSTYLE_SOLID)); - dc.SetPen (*wxTRANSPARENT_PEN); - if (HasFlag (wxTR_FULL_ROW_HIGHLIGHT)) { - if (item->IsSelected()) { -@@ -3482,7 +3476,7 @@ void wxTreeListMainWindow::PaintItem (wxTreeListItem *item, wxDC& dc) { - if (item->IsSelected() && i == GetMainColumn()) { - // draw normal background - dc.SetPen (*wxTRANSPARENT_PEN); -- dc.SetBrush (wxBrush ( colBg, wxSOLID)); -+ dc.SetBrush (wxBrush ( colBg, wxBRUSHSTYLE_SOLID)); - dc.DrawRectangle (x_colstart, item->GetY() + off_h, col_w, total_h - off_h); - // draw selection & optionally cursor - dc.SetPen (drawCursor ? *wxBLACK_PEN : *wxTRANSPARENT_PEN); -@@ -3493,7 +3487,7 @@ void wxTreeListMainWindow::PaintItem (wxTreeListItem *item, wxDC& dc) { - } else { - // draw normal background & optionally cursor - dc.SetPen (drawCursor && i != GetMainColumn() ? *wxBLACK_PEN : *wxTRANSPARENT_PEN); -- dc.SetBrush (wxBrush ( colBg, wxSOLID)); -+ dc.SetBrush (wxBrush ( colBg, wxBRUSHSTYLE_SOLID)); - dc.SetTextForeground (colText); - dc.DrawRectangle (x_colstart, item->GetY() + off_h, col_w, total_h - off_h); - // on main col draw a separate cursor -@@ -3510,7 +3504,7 @@ void wxTreeListMainWindow::PaintItem (wxTreeListItem *item, wxDC& dc) { - #if !wxCHECK_VERSION(2, 5, 0) - wxPen pen (wxSystemSettings::GetSystemColour (wxSYS_COLOUR_3DLIGHT ), 1, wxSOLID); - #else -- wxPen pen (wxSystemSettings::GetColour (wxSYS_COLOUR_3DLIGHT ), 1, wxSOLID); -+ wxPen pen (wxSystemSettings::GetColour (wxSYS_COLOUR_3DLIGHT ), 1, wxPENSTYLE_SOLID); - #endif - dc.SetPen ((GetBackgroundColour() == *wxWHITE)? pen: *wxWHITE_PEN); - dc.DrawLine (x_colstart+col_w-1, item->GetY(), x_colstart+col_w-1, item->GetY()+total_h); -@@ -3585,7 +3579,7 @@ void wxTreeListMainWindow::PaintLevel (wxTreeListItem *item, wxDC &dc, - #if !wxCHECK_VERSION(2, 5, 0) - wxPen pen (wxSystemSettings::GetSystemColour (wxSYS_COLOUR_3DLIGHT ), 1, wxSOLID); - #else -- wxPen pen (wxSystemSettings::GetColour (wxSYS_COLOUR_3DLIGHT ), 1, wxSOLID); -+ wxPen pen (wxSystemSettings::GetColour (wxSYS_COLOUR_3DLIGHT ), 1, wxPENSTYLE_SOLID); - #endif - dc.SetPen ((GetBackgroundColour() == *wxWHITE)? pen: *wxWHITE_PEN); - dc.DrawLine (0, y_top, total_width, y_top); -@@ -3730,7 +3724,7 @@ void wxTreeListMainWindow::OnPaint (wxPaintEvent &WXUNUSED(event)) { - - // init device context, clear background (BEFORE changing DC origin...) - wxAutoBufferedPaintDC dc (this); -- wxBrush brush(GetBackgroundColour(), wxSOLID); -+ wxBrush brush(GetBackgroundColour(), wxBRUSHSTYLE_SOLID); - dc.SetBackground(brush); - dc.Clear(); - DoPrepareDC (dc); -@@ -4468,7 +4462,7 @@ void wxTreeListMainWindow::OnScroll (wxScrollWinEvent& event) { - - // TODO - #if defined(__WXGTK__) && !defined(__WXUNIVERSAL__) -- wxScrolledWindow::OnScroll(event); -+ wxScrolledWindow::HandleOnScroll(event); - #else - HandleOnScroll( event ); - #endif diff --git a/patches/wxx.xpro.patch b/patches/wxx.xpro.patch deleted file mode 100644 index 6d946ac..0000000 --- a/patches/wxx.xpro.patch +++ /dev/null @@ -1,69 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -new file mode 100644 -index 0000000..7c3dcb4 ---- /dev/null -+++ b/CMakeLists.txt -@@ -0,0 +1,63 @@ -+cmake_minimum_required(VERSION 3.31) -+project(wxx) -+include(GNUInstallDirs) -+include(xpflags) -+# reset any postfix setting done previously -+set(CMAKE_DEBUG_POSTFIX) -+set(CMAKE_RELEASE_POSTFIX) -+####################################### -+xpFindPkg(PKGS wxwidgets) -+string(REGEX REPLACE "include/wx-([0-9]*).([0-9]*)$" "\\1.\\2" wxVer ${CMAKE_INSTALL_INCLUDEDIR}) -+if(wxVer STREQUAL CMAKE_INSTALL_INCLUDEDIR) -+ # default CMAKE_INSTALL_INCLUDEDIR, not passed in, or doesn't include wx-X.X -+ get_target_property(wxIncDirs wx::base INTERFACE_INCLUDE_DIRECTORIES) -+ list(FILTER wxIncDirs INCLUDE REGEX "include/wx-") -+ list(GET wxIncDirs 0 wxIncDir) -+ string(REGEX REPLACE ".*include/wx-([0-9]*).([0-9]*)$" "\\1.\\2" wxVer ${wxIncDir}) -+endif() -+if(MSVC) -+ string(REGEX REPLACE "([0-9])\\.([0-9])?" "\\1\\2" wxVer ${wxVer}) -+ if(COMMAND xpGetCompilerPrefix) -+ xpGetCompilerPrefix(toolset) -+ else() -+ set(toolset vc) -+ endif() -+ if(XP_BUILD_STATIC_RT) # from xpflags include, xpCommonFlags, xpopts.cmake -+ set(static s) -+ endif() -+ set(WXX_OUTPUT_NAME wxxmsw${wxVer}${toolset}${static}y_@TARGET@ -+ DEBUG_OUTPUT_NAME wxxmsw${wxVer}${toolset}${static}d_@TARGET@ -+ RELEASE_OUTPUT_NAME wxxmsw${wxVer}${toolset}${static}_@TARGET@ -+ ) -+elseif(UNIX AND DEFINED wxWidgets_CONFIG_EXECUTABLE) # wxWidgets_CONFIG_EXECUTABLE from wxwidgets-targets -+ execute_process(COMMAND sh "${wxWidgets_CONFIG_EXECUTABLE}" --prefix=${CMAKE_INSTALL_PREFIX} -+ --version=${wxVer} --basename --debug=no -+ OUTPUT_VARIABLE wxbasename OUTPUT_STRIP_TRAILING_WHITESPACE ERROR_QUIET -+ ) -+ string(REPLACE "wx_" "wxx_" wxbasename ${wxbasename}) -+ set(WXX_OUTPUT_NAME ${wxbasename}y_@TARGET@-${wxVer} -+ DEBUG_OUTPUT_NAME ${wxbasename}d_@TARGET@-${wxVer} -+ RELEASE_OUTPUT_NAME ${wxbasename}_@TARGET@-${wxVer} -+ ) -+else() -+ set(WXX_OUTPUT_NAME wxx_unky_@TARGET@-${wxVer} -+ DEBUG_OUTPUT_NAME wxx_unkd_@TARGET@-${wxVer} -+ RELEASE_OUTPUT_NAME wxx_unk_@TARGET@-${wxVer} -+ ) -+endif() -+####################################### -+set(targetsFile ${PROJECT_NAME}-targets) -+foreach(lib -+ wxthings/build -+ wxplotctrl/build -+ wxTLC -+ ) -+ add_subdirectory(${lib}) -+endforeach() -+if(DEFINED XP_NAMESPACE) -+ set(nameSpace NAMESPACE ${XP_NAMESPACE}::) -+endif() -+if(NOT DEFINED XP_INSTALL_CMAKEDIR) -+ set(XP_INSTALL_CMAKEDIR ${CMAKE_INSTALL_DATADIR}/cmake) -+endif() -+install(EXPORT ${targetsFile} DESTINATION ${XP_INSTALL_CMAKEDIR} ${nameSpace}) diff --git a/projects/README.md b/projects/README.md index ffd92ae..2f191a4 100644 --- a/projects/README.md +++ b/projects/README.md @@ -3,36 +3,20 @@ |project|license|description|version|repository|patch/diff| |-------|-------|-----------|-------|----------|----------| |[ActiveMQ-CPP](http://activemq.apache.org/cms/ 'ActiveMQ CMS website')|[open](http://www.apache.org/licenses/LICENSE-2.0.html 'Apache 2.0')|ActiveMQ C++ Messaging Service (CMS) client library|3.9.5|[repo](https://github.com/apache/activemq-cpp 'activemq-cpp repo on github')|[diff](https://github.com/externpro/activemq-cpp/compare/apache:activemq-cpp-3.9.5...xp-3.9.5 'patch/diff')| -|[azmq](https://zeromq.org/ 'ZeroMQ website')|[open](https://github.com/zeromq/azmq/blob/master/LICENSE-BOOST_1_0 'Boost Software License 1.0')|provides Boost Asio style bindings for ZeroMQ|21.12.05|[repo](https://github.com/zeromq/azmq 'zeromq/azmq repo on github')|[diff](https://github.com/externpro/azmq/compare/zeromq:e0058a38976399006f535a9010d29e763b43fcd8...xp21.12.05 'patch/diff')| |[c-ares](http://c-ares.haxx.se/ 'c-ares website')|[open](http://c-ares.haxx.se/license.html 'c-ares license: MIT license')|C library for asynchronous DNS requests (including name resolves)|1.18.1|[repo](https://github.com/c-ares/c-ares 'c-ares repo on github')|[diff](https://github.com/externpro/c-ares/compare/c-ares:cares-1_18_1...xp-1_18_1 'patch/diff')| |[cppzmq](https://zeromq.org/ 'ZeroMQ website')|[open](http://wiki.zeromq.org/area:licensing 'GNU LGPL plus static linking exception')|header-only C++ binding for libzmq|4.7.1|[repo](https://github.com/zeromq/cppzmq 'zeromq/cppzmq repo on github')|[diff](https://github.com/externpro/cppzmq/compare/zeromq:v4.7.1...xp4.7.1 'patch/diff')| |[cURL](http://curl.haxx.se/libcurl/ 'libcurl website')|[open](http://curl.haxx.se/docs/copyright.html 'curl license: MIT/X derivate license')|the multiprotocol file transfer library|7.80.0|[repo](https://github.com/curl/curl 'curl repo on github')|[diff](https://github.com/externpro/curl/compare/curl:curl-7_80_0...xp-7_80_0 'patch/diff')| |[Expat](https://libexpat.github.io 'Expat website')|[open](https://github.com/libexpat/libexpat/blob/R_2_2_5/expat/COPYING 'Expat License (MIT/X Consortium license)')|a stream-oriented XML parser library written in C|2.2.5|[repo](https://github.com/libexpat/libexpat 'libexpat repo on github')|[diff](https://github.com/externpro/libexpat/compare/libexpat:R_2_2_5...xp2.2.5 'patch/diff')| -|[fecpp](http://www.randombit.net/code/fecpp/ 'C++ forward error correction with SIMD optimizations')|[open](http://www.randombit.net/code/fecpp/ 'BSD License')|fecpp is a Forward Error Correction Library|0.9|[repo](https://github.com/randombit/fecpp 'fecpp repo on github')|[diff](https://github.com/externpro/fecpp/compare/v0.9...xp0.9 'patch/diff')| -|[ffmpeg](https://www.ffmpeg.org/ 'ffmpeg website')|[LGPL](https://www.ffmpeg.org/legal.html 'Lesser GPL v2.1')|pre-built (MSW-only) complete, cross-platform solution to record, convert and stream audio and video|2.6.2.1|[repo](https://github.com/externpro/ffmpegBin 'ffmpeg binary repo on github')|[diff](https://github.com/externpro/ffmpegBin/compare/v2.6.2.1...xp2.6.2.1 'patch/diff')| -|[ffmpeg](https://www.ffmpeg.org/ 'ffmpeg website')|[LGPL](https://www.ffmpeg.org/legal.html 'Lesser GPL v2.1')|complete, cross-platform solution to record, convert and stream audio and video|2.6.2|[repo](https://github.com/FFmpeg/FFmpeg 'ffmpeg repo on github')|[diff](https://github.com/ndrasmussen/FFmpeg/compare/FFmpeg:n2.6.2...xp2.6.2 'patch/diff')| -|[ffmpeg](https://www.ffmpeg.org/ 'ffmpeg website')|[LGPL](https://www.ffmpeg.org/legal.html 'LGPL v2.1')|complete, cross-platform solution to record, convert and stream audio and video|4.3.1|[repo](https://github.com/FFmpeg/FFmpeg 'ffmpeg repo on github')|[diff](https://github.com/externpro/FFmpeg/compare/FFmpeg:n4.3.1...xp4.3.1 'patch/diff')| -|[geotiff](http://trac.osgeo.org/geotiff/ 'GeoTIFF trac website')|[open](http://trac.osgeo.org/geotiff/ 'trac site states it is an open source library (no specific license mentioned)')|georeferencing info embedded within TIFF file|1.2.4|[repo](https://github.com/externpro/libgeotiff 'libgeotiff repo on github')|[diff](https://github.com/externpro/libgeotiff/compare/v1.2.4...xp1.2.4 'patch/diff')| -|[GEOTRANS](http://earth-info.nga.mil/GandG/geotrans/ 'GEOTRANS website')|[open](http://earth-info.nga.mil/GandG/geotrans/docs/MSP_GeoTrans_Terms_of_Use.pdf 'GEOTRANS Terms of Use (no specific license mentioned)')|geographic translator (convert coordinates)|2.4.2|[repo](https://github.com/externpro/geotranz 'geotranz repo on github')|[diff](https://github.com/externpro/geotranz/compare/v2.4.2...xp2.4.2 'patch/diff')| |[GLEW](http://glew.sourceforge.net 'GLEW on sourceforge.net')|[open](http://glew.sourceforge.net/credits.html 'Modified BSD, Mesa 3-D (MIT), and Khronos (MIT)')|The OpenGL Extension Wrangler Library|1.13.0|[repo](https://github.com/nigels-com/glew 'GLEW repo on github')|[diff](https://github.com/externpro/glew/compare/nigels-com:glew-1.13.0...xp-1.13.0 'patch/diff')| -|[JasPer](http://www.ece.uvic.ca/~frodo/jasper/ 'JasPer website')|[open](http://www.ece.uvic.ca/~frodo/jasper/#license 'JasPer License (based on MIT license)')|JPEG 2000 Part-1 codec implementation|1.900.1|[repo](https://github.com/externpro/jasper 'forked jasper repo on github')|[diff](https://github.com/externpro/jasper/compare/version-1.900.1...xp-1.900.1 'patch/diff')| |[jpegxp](http://www.ijg.org/ 'Independent JPEG Group website')|[open](https://github.com/externpro/libjpeg/blob/upstream/README 'libjpeg: see LEGAL ISSUES, in README (no specific license mentioned)')|JPEG codec with mods for Lossless, 12-bit lossy (XP)|24.01|[repo](https://github.com/externpro/jpegxp 'jpegxp repo on github')|[diff](https://github.com/externpro/jpegxp/compare/jxp.240125...jxp 'patch/diff')| -|[jxrlib](https://jxrlib.codeplex.com/ 'jxrlib project hosted on CodePlex')|[open](https://jxrlib.codeplex.com/license 'New BSD License (BSD)')|open source implementation of the jpegxr image format standard|15.08|[repo](https://github.com/externpro/jxrlib 'forked jxrlib repo on github')|[diff](https://github.com/externpro/jxrlib/compare/v15.08...xp15.08 'patch/diff')| |[libgit2](https://libgit2.github.com/ 'libgit2 website')|[open](https://github.com/libgit2/libgit2/blob/master/README.md#license 'GPL2 with linking exception')|portable, pure C implementation of the Git core methods|1.3.0|[repo](https://github.com/libgit2/libgit2 'libgit2 repo on github')|[diff](https://github.com/externpro/libgit2/compare/libgit2:v1.3.0...xp1.3.0 'patch/diff')| |[libssh2](http://www.libssh2.org/ 'libssh2 website')|[open](http://www.libssh2.org/license.html 'BSD 3-Clause License - https://www.openhub.net/licenses/BSD-3-Clause')|client-side C library implementing SSH2 protocol|1.9.0|[repo](https://github.com/libssh2/libssh2 'libssh2 repo on github')|[diff](https://github.com/externpro/libssh2/compare/libssh2:libssh2-1.9.0...xp-1.9.0 'patch/diff')| -|[libstrophe](http://strophe.im/libstrophe/ 'libstrophe website')|[open](https://github.com/strophe/libstrophe/blob/0.9.1/LICENSE.txt 'dual licensed under MIT and GPLv3')|A simple, lightweight C library for writing XMPP client|0.9.1|[repo](https://github.com/strophe/libstrophe 'libstrophe repo on github')|[diff](https://github.com/externpro/libstrophe/compare/strophe:0.9.1...xp0.9.1 'patch/diff')| -|[LLVM](http://llvm.org/ 'LLVM website')|[open](https://releases.llvm.org/11.0.0/LICENSE.TXT 'Apache License v2.0 with LLVM Exceptions')|The LLVM Compiler Infrastructure|11.0.0|[repo](https://github.com/llvm/llvm-project 'llvm repo on github')|none| |[Lua](http://www.lua.org/ 'Lua website')|[open](http://www.lua.org/license.html 'MIT license')|a powerful, fast, lightweight, embeddable scripting language|5.2.3|[repo](https://github.com/LuaDist/lua 'lua repo on github')|[diff](https://github.com/externpro/lua/compare/LuaDist:5.2.3...xp5.2.3 'patch/diff')| |[OpenH264](http://www.openh264.org/ 'OpenH264 website')|[open](http://www.openh264.org/faq.html 'Two-Clause BSD license')|a codec library which supports H.264 encoding and decoding|1.4.0|[repo](https://github.com/cisco/openh264 'openh264 repo on github')|[diff](https://github.com/externpro/openh264/compare/cisco:v1.4.0...xp1.4.0 'patch/diff')| |[OpenSSL](http://www.openssl.org/ 'OpenSSL website')|[open](http://www.openssl.org/source/license.html 'OpenSSL, SSLeay License: BSD-style')|Cryptography and SSL/TLS Toolkit|1.1.1l|[repo](https://github.com/openssl/openssl 'openssl repo on github')|[diff](https://github.com/externpro/openssl/compare/openssl:OpenSSL_1_1_1l...xp_1_1_1l 'patch/diff')| |[protobuf](https://developers.google.com/protocol-buffers/ 'Protocol Buffers website')|[open](https://github.com/protocolbuffers/protobuf/blob/v3.14.0/LICENSE '3-clause BSD license')|language-neutral, platform-neutral extensible mechanism for serializing structured data|3.14.0|[repo](https://github.com/protocolbuffers/protobuf 'protobuf repo on github')|[diff](https://github.com/externpro/protobuf/compare/protocolbuffers:v3.14.0...xp3.14.0 'patch/diff')| -|[RapidJSON](http://Tencent.github.io/rapidjson/ 'RapidJSON on githubio')|[open](https://raw.githubusercontent.com/Tencent/rapidjson/master/license.txt 'The MIT License - http://opensource.org/licenses/mit-license.php')|C++ library for parsing and generating JSON|1.1.0|[repo](https://github.com/Tencent/rapidjson 'rapidjson repo on github')|[diff](https://github.com/externpro/rapidjson/compare/Tencent:v1.1.0...xp1.1.0 'patch/diff')| |[RapidXml](http://rapidxml.sourceforge.net/ 'RapidXml on sourceforge')|[open](http://rapidxml.sourceforge.net/license.txt 'Boost Software License -or- The MIT License')|fast XML parser|1.13|[repo](https://github.com/externpro/rapidxml 'rapidxml repo on github')|[diff](https://github.com/externpro/rapidxml/compare/v1.13...xp1.13 'patch/diff')| |[shapelib](http://shapelib.maptools.org/ 'Shapefile C Library website')|[open](http://shapelib.maptools.org/license.html 'MIT Style -or- LGPL')|reading, writing, updating ESRI Shapefiles|1.2.10|[repo](https://github.com/externpro/shapelib 'forked shapelib repo on github')|[diff](https://github.com/externpro/shapelib/compare/v1.2.10...xp1.2.10 'patch/diff')| -|[wirehair](https://github.com/catid/wirehair 'wirehair repo on github')|[open](https://github.com/catid/wirehair/blob/master/LICENSE.txt 'BSD 3-Clause New or Revised License')|fast and portable fountain codes in C|21.07.31|[repo](https://github.com/catid/wirehair 'wirehair repo on github')|[diff](https://github.com/externpro/wirehair/compare/catid:6d84fad40cbbbb29d4eb91204750ddffe0dcacfe...xp21.07.31 'patch/diff')| -|[wxWidgets](http://wxwidgets.org/ 'wxWidgets website')|[open](http://www.wxwidgets.org/about/newlicen.htm 'wxWindows License: essentially LGPL with an exception')|Cross-Platform GUI Library|3.1.0|[repo](https://github.com/wxWidgets/wxWidgets 'wxWidgets repo on github')|[diff](https://github.com/externpro/wxWidgets/compare/v3.1.0_240125...xp3.1.0 'patch/diff')| -|[wxInclude](http://wiki.wxwidgets.org/Embedding_PNG_Images 'wxInclude mentioned in this wxWiki page')|[open](http://wiki.wxwidgets.org/Embedding_PNG_Images 'assumed wxWindows license, since source can be downloaded from wxWiki')|embed resources into cross-platform code|1.0|[repo](https://github.com/externpro/wxInclude 'wxInclude repo on github')|[diff](https://github.com/externpro/wxInclude/compare/v1.0...rel 'patch/diff')| -|[wxx](https://github.com/externpro/wxx 'wxx project on github')|[open](http://wxcode.sourceforge.net/rules.php 'wxCode components must use wxWindows license')|wxWidget-based extra components|2024.01.25|[repo](https://github.com/externpro/wxx 'wxx repo on github')|[diff](https://github.com/externpro/wxx/compare/wxx.03...xpro 'patch/diff')| |[yasm](http://yasm.tortall.net/ 'yasm website')|[open](https://github.com/yasm/yasm/blob/v1.3.0/COPYING 'new BSD license')|assembler and disassembler for the Intel x86 architecture|1.3.0|[repo](https://github.com/yasm/yasm 'yasm repo on github')|[diff](https://github.com/externpro/yasm/compare/yasm:v1.3.0...xp1.3.0 'patch/diff')| |[zmqpp](https://zeromq.github.io/zmqpp/ 'zmqpp website')|[open](https://github.com/zeromq/zmqpp/blob/develop/LICENSE 'Mozilla Public License 2.0')|high-level binding for libzmq|21.07.09|[repo](https://github.com/zeromq/zmqpp 'zeromq/zmqpp repo on github')|[diff](https://github.com/externpro/zmqpp/compare/zeromq:ba4230d5d03d29ced9ca788e3bd1095477db08ae...xp21.07.09 'patch/diff')| @@ -40,64 +24,39 @@ |project|sub|description|version|repository|patch/diff| |-------|---|-----------|-------|----------|----------| -|llvm|[clang](http://clang.llvm.org/ 'clang website')|clang: a C language family frontend for LLVM|11.0.0|none|none| -|clang|[clang-format](http://clang.llvm.org/docs/ClangFormat.html 'ClangFormat documentation')|used to format C/C++/Obj-C code|11.0.0|none|none| |jpegxp|[jpeglossless](http://sourceforge.net/projects/jpeg/ 'JPEG on sourceforge')|lossless decode|62.1|[repo](https://github.com/externpro/libjpeg 'forked libjpeg repo on github')|[diff](https://github.com/externpro/libjpeg/compare/eccc424...lossless.6b 'patch/diff')| |jpegxp|[jpeglossy12](http://libjpeg.sourceforge.net/ 'libjpeg on sourceforge')|lossy 12-bit encode and decode|6b|[repo](https://github.com/externpro/libjpeg 'forked libjpeg repo on github')|[diff](https://github.com/externpro/libjpeg/compare/09a4003...lossy12.6b 'patch/diff')| |jpegxp|[jpeglossy8](http://libjpeg.sourceforge.net/ 'libjpeg on sourceforge')|lossy 8-bit encode and decode|6b|[repo](https://github.com/externpro/libjpeg 'forked libjpeg repo on github')|[diff](https://github.com/externpro/libjpeg/compare/09a4003...lossy8.6b 'patch/diff')| |lua|[LuaBridge](http://vinniefalco.github.io/LuaBridge/Manual.html 'LuaBridge Reference Manual')|a lightweight, dependency-free library for binding Lua to C++|2.5|[repo](https://github.com/vinniefalco/LuaBridge 'LuaBridge repo on github')|none| |openssl|[opensslasm](https://github.com/externpro/opensslasm 'opensslasm project on github')|openssl assembly|1.1.1l|[repo](https://github.com/externpro/opensslasm 'opensslasm repo on github')|none| -|wxWidgets|[wxcmake](https://github.com/externpro/wxcmake 'wxcmake project on github')|build wxWidgets via cmake|2019.11.08|[repo](https://github.com/externpro/wxcmake 'wxcmake repo on github')|[diff](https://github.com/externpro/wxcmake/compare/wx0...wx31 'patch/diff')| -|wxx|[wxPlotCtrl](http://wxcode.sourceforge.net/showcomp.php?name=wxPlotCtrl 'wxplotctrl on sourceforge')|interactive xy data plotting widgets|2006.04.28|[repo](https://github.com/externpro/wxplotctrl 'wxplotctrl repo on github')|[diff](https://github.com/externpro/wxplotctrl/compare/v2006.04.28...xp2006.04.28 'patch/diff')| -|wxx|[wxThings](http://wxcode.sourceforge.net/showcomp.php?name=wxThings 'wxthings on sourceforge')|a variety of data containers and controls|2006.04.28|[repo](https://github.com/externpro/wxthings 'wxthings repo on github')|[diff](https://github.com/externpro/wxthings/compare/v2006.04.28...xp2006.04.28 'patch/diff')| -|wxx|[wxTLC](http://wxcode.sourceforge.net/components/treelistctrl/ 'wxTLC (treelistctrl) on sourceforge')|a multi column tree control|1208|[repo](https://github.com/externpro/wxTLC 'wxTLC repo on github')|[diff](https://github.com/externpro/wxTLC/compare/v1208...xp1208 'patch/diff')| ## dependency graph -![deps.dot graph](https://g.gravizo.com/source/depgraph_4f002755de901bf7e117b13173359937?https%3A%2F%2Fraw.githubusercontent.com%2Fexternpro%2Fexdlpro%2Fdev%2Fprojects%2FREADME.md) +![deps.dot graph](https://g.gravizo.com/source/depgraph_053f9b011df5ef46b4dcb91666de759d?https%3A%2F%2Fraw.githubusercontent.com%2Fexternpro%2Fexdlpro%2Fdev%2Fprojects%2FREADME.md)
-depgraph_4f002755de901bf7e117b13173359937 +depgraph_053f9b011df5ef46b4dcb91666de759d digraph GG { node [fontsize=12]; activemqcpp [shape=diamond]; activemqcpp -> openssl; - azmq [shape=diamond]; cares [label="c-ares" shape=diamond]; - clang [shape=box]; - clang -> llvm; - clangformat [shape=box]; - clangformat -> clang; cppzmq [shape=diamond]; curl [shape=diamond]; curl -> libssh2; curl -> cares; expat [shape=diamond]; - fecpp [shape=diamond]; - ffmpeg [shape=diamond]; - ffmpeg -> openh264; - ffmpeg -> yasm; - geotiff [shape=diamond]; - geotiff -> wx; libgit2 [shape=diamond]; libgit2 -> libssh2; libssh2 [shape=diamond]; libssh2 -> openssl; - libstrophe [shape=diamond]; - libstrophe -> expat; - libstrophe -> openssl; - llvm [shape=box]; openh264 [shape=diamond]; openh264 -> yasm; openssl [shape=diamond]; openssl -> opensslasm; opensslasm [shape=diamond]; - wx [shape=diamond]; - wxinclude [shape=box]; - wxx [shape=diamond]; - wxx -> wx; yasm [shape=box]; zmqpp [shape=diamond]; } -depgraph_4f002755de901bf7e117b13173359937 +depgraph_053f9b011df5ef46b4dcb91666de759d
diff --git a/projects/azmq.cmake b/projects/azmq.cmake deleted file mode 100644 index 8943db5..0000000 --- a/projects/azmq.cmake +++ /dev/null @@ -1,53 +0,0 @@ -# azmq -# xpbuild:cmake-patch -xpProOption(azmq DBG) -set(VER 21.12.05) -set(TAG e0058a38976399006f535a9010d29e763b43fcd8) # 2021.12.05 commit -set(REPO https://github.com/zeromq/azmq) -set(FORK https://github.com/externpro/azmq) -set(PRO_AZMQ - NAME azmq - WEB "azmq" https://zeromq.org/ "ZeroMQ website" - LICENSE "open" ${REPO}/blob/master/LICENSE-BOOST_1_0 "Boost Software License 1.0" - DESC "provides Boost Asio style bindings for ZeroMQ" - REPO "repo" ${REPO} "zeromq/azmq repo on github" - GRAPH - VER ${VER} - GIT_ORIGIN ${FORK} - GIT_UPSTREAM ${REPO} - GIT_TAG xp${VER} # what to 'git checkout' - GIT_REF ${TAG} # create patch from this tag to 'git checkout' - DLURL ${REPO}/archive/${TAG}.tar.gz - DLMD5 814c9b8d8655dda9ef82f6018b8a8384 - DLNAME azmq-${VER}.tar.gz - PATCH ${PATCH_DIR}/azmq.patch - DIFF ${FORK}/compare/zeromq: - ) -######################################## -function(build_azmq) - if(APPLE AND NOT XP_PRO_AZMQ) - return() - endif() - if(NOT (XP_DEFAULT OR XP_PRO_AZMQ)) - return() - endif() - xpGetArgValue(${PRO_AZMQ} ARG NAME VALUE NAME) - xpGetArgValue(${PRO_AZMQ} ARG VER VALUE VER) - set(XP_CONFIGURE - -DCMAKE_INSTALL_INCLUDEDIR=include/${NAME}_${VER} - -DCMAKE_INSTALL_LIBDIR=lib - -DXP_INSTALL_CMAKEDIR=share/cmake/tgt-${NAME} - -DXP_MODULE_PATH=${CMAKE_DIR} - -DXP_NAMESPACE:STRING=xpro - ) - set(FIND_DEPS "xpFindPkg(PKGS boost libzmq)\n") - set(TARGETS_FILE tgt-${NAME}/${NAME}-targets.cmake) - string(TOUPPER ${NAME} PRJ) - set(USE_VARS "set(${PRJ}_LIBRARIES xpro::${NAME})\n") - set(USE_VARS "${USE_VARS}list(APPEND reqVars ${PRJ}_LIBRARIES)\n") - configure_file(${MODULES_DIR}/usexp.cmake.in - ${STAGE_DIR}/share/cmake/usexp-${NAME}-config.cmake - @ONLY NEWLINE_STYLE LF - ) - xpCmakeBuild(${NAME} "" "${XP_CONFIGURE}") -endfunction() diff --git a/projects/clang.cmake b/projects/clang.cmake deleted file mode 100644 index 5baa137..0000000 --- a/projects/clang.cmake +++ /dev/null @@ -1,15 +0,0 @@ -# clang -include(${CMAKE_CURRENT_LIST_DIR}/llvm.cmake) -xpGetArgValue(${PRO_LLVM} ARG VER VALUE llvmVer) -set(PRO_CLANG - NAME clang - SUPERPRO llvm - SUBDIR tools/clang - WEB "clang" http://clang.llvm.org/ "clang website" - LICENSE "open" "http://clang.llvm.org/features.html#license" "LLVM 'Apache 2' License" - DESC "clang: a C language family frontend for LLVM" - GRAPH GRAPH_SHAPE box BUILD_DEPS llvm - VER ${llvmVer} - DLURL ${REPO}/releases/download/llvmorg-${llvmVer}/clang-${llvmVer}.src.tar.xz - DLMD5 d8fbc5b1d27f44922cfbbf199d0bab78 - ) diff --git a/projects/clangformat.cmake b/projects/clangformat.cmake deleted file mode 100644 index 6b0e976..0000000 --- a/projects/clangformat.cmake +++ /dev/null @@ -1,42 +0,0 @@ -# clangformat -include(${CMAKE_CURRENT_LIST_DIR}/llvm.cmake) -xpGetArgValue(${PRO_LLVM} ARG VER VALUE llvmVer) -set(PRO_CLANGFORMAT - NAME clangformat - SUPERPRO clang - WEB "clang-format" http://clang.llvm.org/docs/ClangFormat.html "ClangFormat documentation" - DESC "used to format C/C++/Obj-C code" - GRAPH GRAPH_SHAPE box BUILD_DEPS clang - VER ${llvmVer} - ) -######################################## -function(build_clangformat) - if(APPLE AND NOT XP_PRO_LLVM) - return() - endif() - if(NOT (XP_DEFAULT OR XP_PRO_LLVM)) - return() - endif() - build_llvm(llvmTgt) - xpGetArgValue(${PRO_CLANGFORMAT} ARG NAME VALUE NAME) - xpGetArgValue(${PRO_LLVM} ARG VER VALUE VER) - set(TARGETS_FILE xpopts.cmake) # "dummy" targets file for project that doesn't have one - string(TOUPPER ${NAME} PRJ) - set(USE_VARS "get_filename_component(XP_ROOTDIR \${CMAKE_CURRENT_LIST_DIR}/../.. ABSOLUTE)\n") - set(USE_VARS "${USE_VARS}get_filename_component(XP_ROOTDIR \${XP_ROOTDIR} ABSOLUTE) # remove relative parts\n") - set(USE_VARS "${USE_VARS}set(${PRJ}_EXE \${XP_ROOTDIR}/bin/clang-format\${CMAKE_EXECUTABLE_SUFFIX})\n") - set(USE_VARS "${USE_VARS}list(APPEND reqVars ${PRJ}_EXE)\n") - configure_file(${MODULES_DIR}/usexp.cmake.in - ${STAGE_DIR}/share/cmake/usexp-${NAME}-config.cmake - @ONLY NEWLINE_STYLE LF - ) - ExternalProject_Get_Property(${llvmTgt} BINARY_DIR) - ExternalProject_Add(${NAME}_install DEPENDS ${llvmTgt} - DOWNLOAD_COMMAND "" DOWNLOAD_DIR ${NULL_DIR} - SOURCE_DIR ${NULL_DIR} CONFIGURE_COMMAND "" BUILD_COMMAND "" - BINARY_DIR ${BINARY_DIR}/tools/clang/tools/clang-format - INSTALL_COMMAND ${CMAKE_COMMAND} -P cmake_install.cmake - INSTALL_DIR ${STAGE_DIR} - ) - set_property(TARGET ${NAME}_install PROPERTY FOLDER ${bld_folder}) -endfunction() diff --git a/projects/fecpp.cmake b/projects/fecpp.cmake deleted file mode 100644 index 3a3bc57..0000000 --- a/projects/fecpp.cmake +++ /dev/null @@ -1,50 +0,0 @@ -# fecpp -# xpbuild:cmake-scratch -xpProOption(fecpp DBG) -set(REPO https://github.com/randombit/fecpp) -set(FORK https://github.com/externpro/fecpp) -set(VER 0.9) -set(PRO_FECPP - NAME fecpp - WEB "fecpp" http://www.randombit.net/code/fecpp/ "C++ forward error correction with SIMD optimizations" - LICENSE "open" http://www.randombit.net/code/fecpp/ "BSD License" - DESC "fecpp is a Forward Error Correction Library" - REPO "repo" ${REPO} "fecpp repo on github" - GRAPH - VER ${VER} - GIT_ORIGIN ${FORK} - GIT_UPSTREAM ${REPO} - GIT_TAG xp${VER} # what to 'git checkout' - GIT_REF v${VER} # create patch from this tag to 'git checkout' - DLURL http://files.randombit.net/fecpp/fecpp-${VER}.tgz - DLMD5 990e5b529e1b86fb5ee141c6307fb7dd - PATCH ${PATCH_DIR}/fecpp.patch - DIFF ${FORK}/compare/ - ) -######################################## -function(build_fecpp) - if(APPLE AND NOT XP_PRO_FECPP) - return() - endif() - if(NOT (XP_DEFAULT OR XP_PRO_FECPP)) - return() - endif() - xpGetArgValue(${PRO_FECPP} ARG NAME VALUE NAME) - xpGetArgValue(${PRO_FECPP} ARG VER VALUE VER) - set(XP_CONFIGURE - -DCMAKE_INSTALL_INCLUDEDIR=include/${NAME}_${VER} - -DCMAKE_INSTALL_LIBDIR=lib - -DXP_INSTALL_CMAKEDIR=share/cmake/tgt-${NAME} - -DXP_MODULE_PATH=${CMAKE_DIR} - -DXP_NAMESPACE:STRING=xpro - ) - set(TARGETS_FILE tgt-${NAME}/${NAME}-targets.cmake) - string(TOUPPER ${NAME} PRJ) - set(USE_VARS "set(${PRJ}_LIBRARIES xpro::${NAME})\n") - set(USE_VARS "${USE_VARS}list(APPEND reqVars ${PRJ}_LIBRARIES)\n") - configure_file(${MODULES_DIR}/usexp.cmake.in - ${STAGE_DIR}/share/cmake/usexp-${NAME}-config.cmake - @ONLY NEWLINE_STYLE LF - ) - xpCmakeBuild(${NAME} "" "${XP_CONFIGURE}") -endfunction() diff --git a/projects/ffmpeg.cmake b/projects/ffmpeg.cmake deleted file mode 100644 index 2c3d5db..0000000 --- a/projects/ffmpeg.cmake +++ /dev/null @@ -1,130 +0,0 @@ -# ffmpeg -xpProOption(ffmpeg) -set(FFMPEG_MSWVER 2.6.2.1) -set(FFMPEG_CFGVER 2.6.2) -set(FFMPEG_NEWVER 4.3.1) -######################################## -function(build_ffmpeg) - set(mswVer ${FFMPEG_MSWVER}) - set(cfgVer ${FFMPEG_CFGVER}) - if(APPLE AND NOT XP_PRO_FFMPEG) - return() - endif() - if(NOT (XP_DEFAULT OR XP_PRO_FFMPEG OR XP_PRO_FFMPEG_${mswVer} OR XP_PRO_FFMPEG_${cfgVer} OR XP_PRO_FFMPEG_${FFMPEG_NEWVER})) - return() - endif() - if(XP_DEFAULT) # edit this to set default versions(s) to build - if(WIN32) - xpListAppendIfDne(FFMPEG_VERSIONS ${mswVer}) - else() - xpListAppendIfDne(FFMPEG_VERSIONS ${cfgVer}) - endif() - #xpListAppendIfDne(FFMPEG_VERSIONS ${FFMPEG_NEWVER}) # TODO for now, don't build NEWVER by default - else() - if(XP_PRO_FFMPEG AND NOT (XP_PRO_FFMPEG_${mswVer} OR XP_PRO_FFMPEG_${cfgVer})) - if(WIN32) - set(XP_PRO_FFMPEG_${mswVer} ON CACHE BOOL "include ffmpeg_${mswVer}" FORCE) - else() - set(XP_PRO_FFMPEG_${cfgVer} ON CACHE BOOL "include ffmpeg_${cfgVer}" FORCE) - endif() - endif() - if(XP_PRO_FFMPEG AND NOT XP_PRO_FFMPEG_${FFMPEG_NEWVER}) - set(XP_PRO_FFMPEG_${FFMPEG_NEWVER} ON CACHE BOOL "include ffmpeg_${FFMPEG_NEWVER}" FORCE) - endif() - if(XP_PRO_FFMPEG_${mswVer}) - xpListAppendIfDne(FFMPEG_VERSIONS ${mswVer}) - endif() - if(XP_PRO_FFMPEG_${cfgVer}) - xpListAppendIfDne(FFMPEG_VERSIONS ${cfgVer}) - endif() - if(XP_PRO_FFMPEG_${FFMPEG_NEWVER}) - xpListAppendIfDne(FFMPEG_VERSIONS ${FFMPEG_NEWVER}) - endif() - endif() - if(WIN32) - set(VER ${mswVer}) - else() - set(VER ${cfgVer}) - endif() - configure_file(${PRO_DIR}/use/usexp-ffmpeg-config.cmake - ${STAGE_DIR}/share/cmake/ - @ONLY NEWLINE_STYLE LF - ) - foreach(ver ${FFMPEG_VERSIONS}) - build_ffmpegv(VER ${ver}) - endforeach() -endfunction() -######################################## -function(build_ffmpegv) - cmake_parse_arguments(ff "" "VER" "" ${ARGN}) - if(NOT (XP_DEFAULT OR XP_PRO_FFMPEG_${ff_VER})) - return() - endif() - #if(ff_VER VERSION_EQUAL FFMPEG_NEWVER) - # xpCmakeBuild(ffmpeg_${ff_VER} "" "") - if(ff_VER VERSION_EQUAL FFMPEG_MSWVER) - xpPatchProject(${PRO_FFMPEG_${FFMPEG_MSWVER}}) - set(BUILD_CONFIGS Release) # we only need a release version - xpCmakeBuild(ffmpeg_${ff_VER} "" "-DFFMPEG_VER=${ff_VER}") - elseif(ff_VER VERSION_EQUAL FFMPEG_CFGVER OR ff_VER VERSION_EQUAL FFMPEG_NEWVER) - xpBuildDeps(depTgts ${PRO_FFMPEG_${ff_VER}}) - xpPatchProject(${PRO_FFMPEG_${ff_VER}}) - set(XP_CONFIGURE_BASE ${CMAKE_COMMAND} -E env PKG_CONFIG_PATH=${STAGE_DIR}/share/cmake - PATH=${STAGE_DIR}/bin:$ENV{PATH} # prepend path to yasm - /configure --prefix= #--enable-shared --disable-static - --enable-pic --disable-bzlib --disable-iconv - --disable-libxcb --disable-libxcb-shm --disable-libxcb-xfixes --disable-libxcb-shape - --disable-lzma --disable-xlib --disable-zlib - ) - if(ff_VER VERSION_EQUAL FFMPEG_CFGVER) - list(APPEND XP_CONFIGURE_BASE --enable-libopenh264 --disable-sdl) - endif() - set(XP_CONFIGURE_Debug ${XP_CONFIGURE_BASE} --enable-debug=1) - set(XP_CONFIGURE_Release ${XP_CONFIGURE_BASE} --disable-debug) - set(BUILD_CONFIGS Release) # TODO: I'm seeing no difference between Release and Debug - foreach(cfg ${BUILD_CONFIGS}) - set(XP_CONFIGURE_CMD ${XP_CONFIGURE_${cfg}}) - set(FFMPEG_TARGET ffmpeg_${ff_VER}_${cfg}) - addproject_ffmpeg(${FFMPEG_TARGET}) - # add version and debug suffix to libraries - if(${cfg} STREQUAL "Debug") - set(appendSuffix ${CMAKE_COMMAND} -Dsrc:STRING=/lib/lib*.a - -Dsuffix:STRING=_${ff_VER}-d -P ${MODULES_DIR}/cmsappendsuffix.cmake) - else() # not Debug - set(appendSuffix ${CMAKE_COMMAND} -Dsrc:STRING=/lib/lib*.a - -Dsuffix:STRING=_${ff_VER} -P ${MODULES_DIR}/cmsappendsuffix.cmake) - endif() - ExternalProject_Get_Property(ffmpeg_${ff_VER} SOURCE_DIR) - ExternalProject_Get_Property(${FFMPEG_TARGET} INSTALL_DIR) - set(verDir /ffmpeg_${ff_VER}) - ExternalProject_Add(${FFMPEG_TARGET}_stage DEPENDS ${FFMPEG_TARGET} - DOWNLOAD_DIR ${NULL_DIR} DOWNLOAD_COMMAND "" - SOURCE_DIR ${SOURCE_DIR} BINARY_DIR ${INSTALL_DIR} - CONFIGURE_COMMAND ${appendSuffix} - BUILD_COMMAND ${CMAKE_COMMAND} -Dsrc:STRING=/lib/lib*.a - -Ddst:STRING=${STAGE_DIR}/lib -P ${MODULES_DIR}/cmscopyfiles.cmake - INSTALL_COMMAND ${CMAKE_COMMAND} -Dsrc:STRING=/include - -Ddst:STRING=${STAGE_DIR}/include${verDir}/ffmpeg -P ${MODULES_DIR}/cmscopyfiles.cmake - INSTALL_DIR ${NULL_DIR} - ) - endforeach() - endif() -endfunction() -######################################## -macro(addproject_ffmpeg XP_TARGET) - list(APPEND depTgts ffmpeg_${ff_VER}) - message(STATUS "target ${XP_TARGET}") - if(XP_BUILD_VERBOSE) - xpVerboseListing("[CONFIGURE]" "${XP_CONFIGURE_CMD}") - xpVerboseListing("[DEPS]" "${depTgts}") - endif() - ExternalProject_Get_Property(ffmpeg_${ff_VER} SOURCE_DIR) - ExternalProject_Add(${XP_TARGET} DEPENDS ${depTgts} - DOWNLOAD_COMMAND "" DOWNLOAD_DIR ${NULL_DIR} - SOURCE_DIR ${SOURCE_DIR} - CONFIGURE_COMMAND ${XP_CONFIGURE_CMD} - BUILD_COMMAND ${CMAKE_COMMAND} -E env PATH=${STAGE_DIR}/bin:$ENV{PATH} make # prepend path to yasm - INSTALL_COMMAND # use default - ) - set_property(TARGET ${XP_TARGET} PROPERTY FOLDER ${bld_folder}) -endmacro() diff --git a/projects/ffmpeg_2.6.2.1.cmake b/projects/ffmpeg_2.6.2.1.cmake deleted file mode 100644 index e72e1b0..0000000 --- a/projects/ffmpeg_2.6.2.1.cmake +++ /dev/null @@ -1,21 +0,0 @@ -# ffmpeg -# xpbuild:cmake-scratch -set(VER ${FFMPEG_MSWVER}) -xpProOption(ffmpeg_${VER}) -set(REPO https://github.com/externpro/ffmpegBin) -set(PRO_FFMPEG_${VER} - NAME ffmpeg_${VER} - WEB "ffmpeg" https://www.ffmpeg.org/ "ffmpeg website" - LICENSE "LGPL" https://www.ffmpeg.org/legal.html "Lesser GPL v2.1" - DESC "pre-built (MSW-only) complete, cross-platform solution to record, convert and stream audio and video" - REPO "repo" ${REPO} "ffmpeg binary repo on github" - VER ${VER} - GIT_ORIGIN ${REPO} - GIT_TAG xp${VER} # what to 'git checkout' - GIT_REF v${VER} # create patch from this tag to 'git checkout' - DLURL ${REPO}/archive/v${VER}.tar.gz - DLMD5 467d46c09726933286dff0dc0c48b692 - DLNAME ffmpeg-v${VER}.tar.gz - PATCH ${PATCH_DIR}/ffmpeg_${VER}.patch - DIFF ${REPO}/compare/ - ) diff --git a/projects/ffmpeg_2.6.2.cmake b/projects/ffmpeg_2.6.2.cmake deleted file mode 100644 index 399e521..0000000 --- a/projects/ffmpeg_2.6.2.cmake +++ /dev/null @@ -1,23 +0,0 @@ -# ffmpeg -# xpbuild:configure-make -set(VER ${FFMPEG_CFGVER}) -xpProOption(ffmpeg_${VER}) -set(REPO https://github.com/FFmpeg/FFmpeg) -set(FORK https://github.com/ndrasmussen/FFmpeg) -set(PRO_FFMPEG_${VER} - NAME ffmpeg_${VER} - WEB "ffmpeg" https://www.ffmpeg.org/ "ffmpeg website" - LICENSE "LGPL" https://www.ffmpeg.org/legal.html "Lesser GPL v2.1" - DESC "complete, cross-platform solution to record, convert and stream audio and video" - REPO "repo" ${REPO} "ffmpeg repo on github" - GRAPH GRAPH_NODE ffmpeg BUILD_DEPS openh264 yasm - VER ${VER} - GIT_ORIGIN ${FORK} - GIT_UPSTREAM ${REPO} - GIT_TAG xp${VER} # what to 'git checkout' - GIT_REF n${VER} # create patch from this tag to 'git checkout' - DLURL http://ffmpeg.org/releases/ffmpeg-${VER}.tar.bz2 - DLMD5 e75d598921285d6775f20164a91936ac - PATCH ${PATCH_DIR}/ffmpeg_${VER}.patch - DIFF ${FORK}/compare/FFmpeg: - ) diff --git a/projects/ffmpeg_4.3.1.cmake b/projects/ffmpeg_4.3.1.cmake deleted file mode 100644 index 286ebe6..0000000 --- a/projects/ffmpeg_4.3.1.cmake +++ /dev/null @@ -1,24 +0,0 @@ -# ffmpeg -set(VER ${FFMPEG_NEWVER}) -xpProOption(ffmpeg_${VER}) -set(REPO https://github.com/FFmpeg/FFmpeg) -set(FORK https://github.com/externpro/FFmpeg) -# https://github.com/ndrasmussen/FFmpeg/tree/xp4.3.1 -set(PRO_FFMPEG_${VER} - NAME ffmpeg_${VER} - WEB "ffmpeg" https://www.ffmpeg.org/ "ffmpeg website" - LICENSE "LGPL" https://www.ffmpeg.org/legal.html "LGPL v2.1" - DESC "complete, cross-platform solution to record, convert and stream audio and video" - REPO "repo" ${REPO} "ffmpeg repo on github" - #GRAPH GRAPH_NODE ffmpeg - BUILD_DEPS openh264 yasm - VER ${VER} - GIT_ORIGIN ${FORK} - GIT_UPSTREAM ${REPO} - GIT_TAG xp${VER} # what to 'git checkout' - GIT_REF n${VER} # create patch from this tag to 'git checkout' - DLURL http://ffmpeg.org/releases/ffmpeg-${VER}.tar.bz2 - DLMD5 804707549590e90880e8ecd4e5244fd8 - PATCH ${PATCH_DIR}/ffmpeg_${VER}.patch - DIFF ${FORK}/compare/FFmpeg: - ) diff --git a/projects/geotiff.cmake b/projects/geotiff.cmake deleted file mode 100644 index 4913b75..0000000 --- a/projects/geotiff.cmake +++ /dev/null @@ -1,56 +0,0 @@ -# geotiff -# xpbuild:cmake-scratch -xpProOption(geotiff DBG) -# http://packages.debian.org/sid/libgeotiff-dev -# http://libgeotiff-dfsg.sourcearchive.com/ -set(VER 1.2.4) -set(REPO https://github.com/externpro/libgeotiff) -set(PRO_GEOTIFF - NAME geotiff - WEB "geotiff" http://trac.osgeo.org/geotiff/ "GeoTIFF trac website" - LICENSE "open" http://trac.osgeo.org/geotiff/ "trac site states it is an open source library (no specific license mentioned)" - DESC "georeferencing info embedded within TIFF file" - REPO "repo" ${REPO} "libgeotiff repo on github" - GRAPH BUILD_DEPS wx - VER ${VER} - GIT_ORIGIN ${REPO} - GIT_TAG xp${VER} # what to 'git checkout' - GIT_REF v${VER} # create patch from this tag to 'git checkout' - #DLURL http://libgeotiff-dfsg.sourcearchive.com/downloads/${VER}/libgeotiff-dfsg_${VER}.orig.tar.gz - #DLMD5 35dca74146d6168bc5adcf3495d7546c - # NOTE: version 1.2.4 appears to be no longer available to download - # from sourcearchive.com (26 byte invalid file) - DLURL ${REPO}/archive/v${VER}.tar.gz - DLMD5 4bef0cc5f066a5f3c0b2352f39bbf140 - DLNAME libgeotiff-v${VER}.tar.gz - PATCH ${PATCH_DIR}/geotiff.patch - DIFF ${REPO}/compare/ - ) -######################################## -function(build_geotiff) - if(APPLE AND NOT XP_PRO_GEOTIFF) - return() - endif() - if(NOT (XP_DEFAULT OR XP_PRO_GEOTIFF)) - return() - endif() - xpBuildDeps(depTgts ${PRO_GEOTIFF}) # defines WX_INCDIR - xpGetArgValue(${PRO_GEOTIFF} ARG NAME VALUE NAME) - xpGetArgValue(${PRO_GEOTIFF} ARG VER VALUE VER) - set(XP_CONFIGURE - -DCMAKE_INSTALL_INCLUDEDIR=include/${NAME}_${VER} - -DCMAKE_INSTALL_LIBDIR=lib - -DXP_INSTALL_CMAKEDIR=share/cmake/tgt-${NAME} - -DXP_NAMESPACE:STRING=xpro - -DWX_INCLUDE=${WX_INCDIR} - ) - set(TARGETS_FILE tgt-${NAME}/${NAME}-targets.cmake) - string(TOUPPER ${NAME} PRJ) - set(USE_VARS "set(${PRJ}_LIBRARIES xpro::${NAME})\n") - set(USE_VARS "${USE_VARS}list(APPEND reqVars ${PRJ}_LIBRARIES)\n") - configure_file(${MODULES_DIR}/usexp.cmake.in - ${STAGE_DIR}/share/cmake/usexp-${NAME}-config.cmake - @ONLY NEWLINE_STYLE LF - ) - xpCmakeBuild(${NAME} "${depTgts}" "${XP_CONFIGURE}") -endfunction() diff --git a/projects/geotrans.cmake b/projects/geotrans.cmake deleted file mode 100644 index ad19965..0000000 --- a/projects/geotrans.cmake +++ /dev/null @@ -1,79 +0,0 @@ -# geotrans -# xpbuild:cmake-scratch -# http://packages.debian.org/sid/geotranz -# http://geotranz.sourcearchive.com/ -xpProOption(geotrans DBG) -set(VER 2.4.2) -set(REPO https://github.com/externpro/geotranz) -set(DLCSV https://download.osgeo.org/geotiff/tables) -set(DLDIR data) -set(PRO_GEOTRANS - NAME geotrans - WEB "GEOTRANS" http://earth-info.nga.mil/GandG/geotrans/ "GEOTRANS website" - LICENSE "open" http://earth-info.nga.mil/GandG/geotrans/docs/MSP_GeoTrans_Terms_of_Use.pdf "GEOTRANS Terms of Use (no specific license mentioned)" - DESC "geographic translator (convert coordinates)" - REPO "repo" ${REPO} "geotranz repo on github" - VER ${VER} - GIT_ORIGIN ${REPO} - GIT_TRACKING_BRANCH xp2.4.2 # not master, to avoid Git-LFS bandwidth - GIT_TAG xp${VER} # what to 'git checkout' - GIT_REF v${VER} # create patch from this tag to 'git checkout' - PATCH ${PATCH_DIR}/geotrans.patch - DIFF ${REPO}/compare/ - DLURL https://github.com/smanders/externpro/releases/download/18.04.1/geotranz_${VER}.orig.tar.gz - DLMD5 1d370d5b0daed2a541a9aa14bd3172a8 - DLMD5_01 48cffaef0651db24c43b8afaee7fbeaf DLDIR_01 ${DLDIR} DLURL_01 ${DLCSV}/README - DLMD5_02 8e3cb60e597f9bd36d0639406a4cf40a DLDIR_02 ${DLDIR} DLURL_02 ${DLCSV}/compd_cs.csv - DLMD5_03 f93d412cfaef83bf526c8938511d2b41 DLDIR_03 ${DLDIR} DLURL_03 ${DLCSV}/ellips_alias.csv - DLMD5_04 d9b32c58f78c3ed4b1e696987adeaaa5 DLDIR_04 ${DLDIR} DLURL_04 ${DLCSV}/ellipsoid.csv - DLMD5_05 2bfe9d762e0741e2cc9fbd5753b0d1f7 DLDIR_05 ${DLDIR} DLURL_05 ${DLCSV}/gdatum_alias.csv - DLMD5_06 459dcb5486257bdf50188e6d959264de DLDIR_06 ${DLDIR} DLURL_06 ${DLCSV}/geod_datum.csv - DLMD5_07 d941df77cdc93d6585cd710d30f6f5e4 DLDIR_07 ${DLDIR} DLURL_07 ${DLCSV}/geod_trf.csv - DLMD5_08 f8c2d94038c51f4de0ccb8342ee7fbb9 DLDIR_08 ${DLDIR} DLURL_08 ${DLCSV}/geoparms.csv - DLMD5_09 e0ead4963d4303a64390a178e76799f4 DLDIR_09 ${DLDIR} DLURL_09 ${DLCSV}/horiz_cs.csv - DLMD5_10 ba008810fdfbce99094f01b7324bf679 DLDIR_10 ${DLDIR} DLURL_10 ${DLCSV}/p_meridian.csv - DLMD5_11 205d5d87f7bd619bad02b6481432ec38 DLDIR_11 ${DLDIR} DLURL_11 ${DLCSV}/trf_method.csv - DLMD5_12 9632881925d1a9d0970249a79bc6df6c DLDIR_12 ${DLDIR} DLURL_12 ${DLCSV}/trf_nonpolynomial.csv - DLMD5_13 5a5ba3f91cc4b006bcfed7fe87f81cf2 DLDIR_13 ${DLDIR} DLURL_13 ${DLCSV}/trf_path.csv - DLMD5_14 cec548c07383fad7d75856a37b9dd8b7 DLDIR_14 ${DLDIR} DLURL_14 ${DLCSV}/uom_an_alias.csv - DLMD5_15 bde69d67540b036c05992321170a359c DLDIR_15 ${DLDIR} DLURL_15 ${DLCSV}/uom_angle.csv - DLMD5_16 cd229e95c8014caa459e9dbac4ebb33f DLDIR_16 ${DLDIR} DLURL_16 ${DLCSV}/uom_le_alias.csv - DLMD5_17 9c7a5b5792acd47a059861dee449e2d8 DLDIR_17 ${DLDIR} DLURL_17 ${DLCSV}/uom_length.csv - DLMD5_18 b97f0ebfec9099e0292799e9c2b6593f DLDIR_18 ${DLDIR} DLURL_18 ${DLCSV}/uom_scale.csv - DLMD5_19 73564bdea9c492078daaa25b928582be DLDIR_19 ${DLDIR} DLURL_19 ${DLCSV}/uom_sc_alias.csv - DLMD5_20 229f41094d6cecd56a38462a64ccdf11 DLDIR_20 ${DLDIR} DLURL_20 ${DLCSV}/vert_cs.csv - DLMD5_21 4e636be19defaf269d3e81bd1d7996a9 DLDIR_21 ${DLDIR} DLURL_21 ${DLCSV}/vert_datum.csv - DLMD5_22 4256444bb7c0bae4f7b94c01b24fddbd DLDIR_22 ${DLDIR} DLURL_22 ${DLCSV}/vert_offset.csv - DLADD _01 _02 _03 _04 _05 _06 _07 _08 _09 _10 _11 _12 _13 _14 _15 _16 _17 _18 _19 _20 _21 _22 - ) -######################################## -function(build_geotrans) - if(APPLE AND NOT XP_PRO_GEOTRANS) - return() - endif() - if(NOT (XP_DEFAULT OR XP_PRO_GEOTRANS)) - return() - endif() - xpGetArgValue(${PRO_GEOTRANS} ARG NAME VALUE NAME) - xpGetArgValue(${PRO_GEOTRANS} ARG VER VALUE VER) - set(XP_CONFIGURE - -DCMAKE_INSTALL_INCLUDEDIR=include/${NAME}_${VER} - -DCMAKE_INSTALL_LIBDIR=lib - -DXP_INSTALL_CMAKEDIR=share/cmake/tgt-${NAME} - -DXP_NAMESPACE:STRING=xpro - -DCSV_DIR=${DWNLD_DIR}/data - ) - set(TARGETS_FILE tgt-${NAME}/${NAME}-targets.cmake) - string(TOUPPER ${NAME} PRJ) - set(USE_VARS "set(${PRJ}_LIBRARIES xpro::geotrans)\n") - set(USE_VARS "${USE_VARS}get_target_property(incDir xpro::geotrans INTERFACE_INCLUDE_DIRECTORIES)\n") - set(USE_VARS "${USE_VARS}set(${PRJ}_DATA_DIR \${incDir}/${NAME}/data)\n") - set(USE_VARS "${USE_VARS}set(${PRJ}_CREDIT \"The product was developed using ${PRJ}, a product of the National Geospatial-") - set(USE_VARS "${USE_VARS}Intelligence Agency (NGA) and U.S. Army Engineering Research and Development Center.\")\n") - set(USE_VARS "${USE_VARS}list(APPEND reqVars ${PRJ}_LIBRARIES ${PRJ}_DATA_DIR ${PRJ}_CREDIT)\n") - configure_file(${MODULES_DIR}/usexp.cmake.in - ${STAGE_DIR}/share/cmake/usexp-${NAME}-config.cmake - @ONLY NEWLINE_STYLE LF - ) - xpCmakeBuild(${NAME} "" "${XP_CONFIGURE}") -endfunction() diff --git a/projects/jasper.cmake b/projects/jasper.cmake deleted file mode 100644 index 5600743..0000000 --- a/projects/jasper.cmake +++ /dev/null @@ -1,48 +0,0 @@ -# jasper -# xpbuild:cmake-scratch -xpProOption(jasper DBG) -set(VER 1.900.1) -set(REPO https://github.com/mdadams/jasper) -set(FORK https://github.com/externpro/jasper) -set(PRO_JASPER - NAME jasper - WEB "JasPer" http://www.ece.uvic.ca/~frodo/jasper/ "JasPer website" - LICENSE "open" "http://www.ece.uvic.ca/~frodo/jasper/#license" "JasPer License (based on MIT license)" - DESC "JPEG 2000 Part-1 codec implementation" - REPO "repo" ${FORK} "forked jasper repo on github" - VER ${VER} - GIT_UPSTREAM ${REPO} - GIT_ORIGIN ${FORK} - GIT_TAG xp-${VER} # what to 'git checkout' - GIT_REF version-${VER} # create patch from this tag to 'git checkout' - DLURL http://www.ece.uvic.ca/~frodo/jasper/software/jasper-${VER}.zip - DLMD5 a342b2b4495b3e1394e161eb5d85d754 - PATCH ${PATCH_DIR}/jasper.patch - DIFF ${FORK}/compare/ - ) -######################################## -function(build_jasper) - if(APPLE AND NOT XP_PRO_JASPER) - return() - endif() - if(NOT (XP_DEFAULT OR XP_PRO_JASPER)) - return() - endif() - xpGetArgValue(${PRO_JASPER} ARG NAME VALUE NAME) - xpGetArgValue(${PRO_JASPER} ARG VER VALUE VER) - set(XP_CONFIGURE - -DCMAKE_INSTALL_INCLUDEDIR=include/${NAME}_${VER} - -DCMAKE_INSTALL_LIBDIR=lib - -DXP_INSTALL_CMAKEDIR=share/cmake/tgt-${NAME} - -DXP_NAMESPACE:STRING=xpro - ) - set(TARGETS_FILE tgt-${NAME}/${NAME}-targets.cmake) - string(TOUPPER ${NAME} PRJ) - set(USE_VARS "set(${PRJ}_LIBRARIES xpro::lib${NAME})\n") - set(USE_VARS "${USE_VARS}list(APPEND reqVars ${PRJ}_LIBRARIES)\n") - configure_file(${MODULES_DIR}/usexp.cmake.in - ${STAGE_DIR}/share/cmake/usexp-${NAME}-config.cmake - @ONLY NEWLINE_STYLE LF - ) - xpCmakeBuild(${NAME} "" "${XP_CONFIGURE}") -endfunction() diff --git a/projects/jxrlib.cmake b/projects/jxrlib.cmake deleted file mode 100644 index 27cf926..0000000 --- a/projects/jxrlib.cmake +++ /dev/null @@ -1,52 +0,0 @@ -# jxrlib -# xpbuild:cmake-scratch -xpProOption(jxrlib DBG) -set(VER 15.08) -set(REPO https://github.com/c0nk/jxrlib) -set(FORK https://github.com/externpro/jxrlib) -set(PRO_JXRLIB - NAME jxrlib - WEB "jxrlib" https://jxrlib.codeplex.com/ "jxrlib project hosted on CodePlex" - LICENSE "open" https://jxrlib.codeplex.com/license "New BSD License (BSD)" - DESC "open source implementation of the jpegxr image format standard" - REPO "repo" ${FORK} "forked jxrlib repo on github" - VER ${VER} - GIT_ORIGINAL_UPSTREAM https://git01.codeplex.com/jxrlib # CodePlex is shutting down! - GIT_UPSTREAM ${REPO} - GIT_ORIGIN ${FORK} - GIT_TAG xp${VER} # what to 'git checkout' - GIT_REF v${VER} # create patch from this tag to 'git checkout' - # NOTE: the download from codeplex is CR/LF, the repo is LF - #DLURL https://jxrlib.codeplex.com/downloads/get/685250 - DLURL ${FORK}/archive/v${VER}.tar.gz - DLMD5 93822c8ba22b44ee7d1a4810e2a9468b - DLNAME jxrlib-v${VER}.tar.gz - PATCH ${PATCH_DIR}/jxrlib.patch - DIFF ${FORK}/compare/ - ) -######################################## -function(build_jxrlib) - if(APPLE AND NOT XP_PRO_JXRLIB) - return() - endif() - if(NOT (XP_DEFAULT OR XP_PRO_JXRLIB)) - return() - endif() - xpGetArgValue(${PRO_JXRLIB} ARG NAME VALUE NAME) - xpGetArgValue(${PRO_JXRLIB} ARG VER VALUE VER) - set(XP_CONFIGURE - -DCMAKE_INSTALL_INCLUDEDIR=include/${NAME}_${VER} - -DCMAKE_INSTALL_LIBDIR=lib - -DXP_INSTALL_CMAKEDIR=share/cmake/tgt-${NAME} - -DXP_NAMESPACE:STRING=xpro - ) - set(TARGETS_FILE tgt-${NAME}/${NAME}-targets.cmake) - string(TOUPPER ${NAME} PRJ) - set(USE_VARS "set(${PRJ}_LIBRARIES xpro::${NAME})\n") - set(USE_VARS "${USE_VARS}list(APPEND reqVars ${PRJ}_LIBRARIES)\n") - configure_file(${MODULES_DIR}/usexp.cmake.in - ${STAGE_DIR}/share/cmake/usexp-${NAME}-config.cmake - @ONLY NEWLINE_STYLE LF - ) - xpCmakeBuild(${NAME} "" "${XP_CONFIGURE}") -endfunction() diff --git a/projects/libstrophe.cmake b/projects/libstrophe.cmake deleted file mode 100644 index 918bcf0..0000000 --- a/projects/libstrophe.cmake +++ /dev/null @@ -1,52 +0,0 @@ -# libstrophe -# xpbuild:cmake-scratch -xpProOption(libstrophe DBG) -set(VER 0.9.1) -set(REPO https://github.com/strophe/libstrophe) -set(FORK https://github.com/externpro/libstrophe) -set(PRO_LIBSTROPHE - NAME libstrophe - WEB "libstrophe" http://strophe.im/libstrophe/ "libstrophe website" - LICENSE "open" ${REPO}/blob/${VER}/LICENSE.txt "dual licensed under MIT and GPLv3" - DESC "A simple, lightweight C library for writing XMPP client" - REPO "repo" ${REPO} "libstrophe repo on github" - GRAPH BUILD_DEPS expat openssl - VER ${VER} - GIT_ORIGIN ${FORK} - GIT_UPSTREAM ${REPO} - GIT_TAG xp${VER} # what to 'git checkout' - GIT_REF ${VER} # create patch from this tag to 'git checkout' - PATCH ${PATCH_DIR}/libstrophe.patch - DIFF ${FORK}/compare/strophe: - DLURL ${REPO}/releases/download/${VER}/libstrophe-${VER}.tar.bz2 - DLMD5 f5475547891fc0697c46ecc004bdfd95 - ) -######################################## -function(build_libstrophe) - if(APPLE AND NOT XP_PRO_LIBSTROPHE) - return() - endif() - if(NOT (XP_DEFAULT OR XP_PRO_LIBSTROPHE)) - return() - endif() - xpBuildDeps(depTgts ${PRO_LIBSTROPHE}) - xpGetArgValue(${PRO_LIBSTROPHE} ARG NAME VALUE NAME) - xpGetArgValue(${PRO_LIBSTROPHE} ARG VER VALUE VER) - set(XP_CONFIGURE - -DCMAKE_INSTALL_INCLUDEDIR=include/${NAME}_${VER} - -DCMAKE_INSTALL_LIBDIR=lib - -DXP_INSTALL_CMAKEDIR=share/cmake/tgt-${NAME} - -DXP_MODULE_PATH=${CMAKE_DIR} - -DXP_NAMESPACE:STRING=xpro - ) - set(FIND_DEPS "xpFindPkg(PKGS expat openssl) # dependencies\n") - set(TARGETS_FILE tgt-${NAME}/${NAME}-targets.cmake) - string(TOUPPER ${NAME} PRJ) - set(USE_VARS "set(${PRJ}_LIBRARIES xpro::${NAME})\n") - set(USE_VARS "${USE_VARS}list(APPEND reqVars ${PRJ}_LIBRARIES)\n") - configure_file(${MODULES_DIR}/usexp.cmake.in - ${STAGE_DIR}/share/cmake/usexp-${NAME}-config.cmake - @ONLY NEWLINE_STYLE LF - ) - xpCmakeBuild(${NAME} "${depTgts}" "${XP_CONFIGURE}") -endfunction() diff --git a/projects/llvm.cmake b/projects/llvm.cmake deleted file mode 100644 index 4fceae2..0000000 --- a/projects/llvm.cmake +++ /dev/null @@ -1,40 +0,0 @@ -# llvm -# xpbuild:cmake -xpProOption(llvm) -set(VER 11.0.0) -set(REPO https://github.com/llvm/llvm-project) -set(PRO_LLVM - NAME llvm - WEB "LLVM" http://llvm.org/ "LLVM website" - LICENSE "open" https://releases.llvm.org/${VER}/LICENSE.TXT "Apache License v2.0 with LLVM Exceptions" - DESC "The LLVM Compiler Infrastructure" - REPO "repo" ${REPO} "llvm repo on github" - GRAPH GRAPH_SHAPE box - VER ${VER} - GIT_ORIGIN ${REPO} - GIT_TAG llvmorg-${VER} - DLURL ${REPO}/releases/download/llvmorg-${VER}/llvm-${VER}.src.tar.xz - DLMD5 85844102335b2e01b3c64b6734fb56f2 - SUBPRO clang - ) -######################################## -function(build_llvm) - if(APPLE AND NOT XP_PRO_LLVM) - return() - endif() - if(NOT (XP_DEFAULT OR XP_PRO_LLVM)) - return() - endif() - find_package(Python) - if(NOT Python_FOUND) - message(FATAL_ERROR "Unable to build llvm/clang tools, required Python not found") - return() - endif() - set(XP_DEPS llvm llvm_clang) - set(XP_CONFIGURE -DLLVM_TARGETS_TO_BUILD:STRING=X86) - set(BUILD_CONFIGS Release) # only need release builds of clang tool executables - xpCmakeBuild(llvm "${XP_DEPS}" "${XP_CONFIGURE}" llvmTgt NO_INSTALL BUILD_TARGET clang-format TGT format) - if(ARGN) - set(${ARGN} "${llvmTgt}" PARENT_SCOPE) - endif() -endfunction() diff --git a/projects/rapidjson.cmake b/projects/rapidjson.cmake deleted file mode 100644 index a695bd5..0000000 --- a/projects/rapidjson.cmake +++ /dev/null @@ -1,49 +0,0 @@ -# RapidJSON -# xpbuild:cmake-patch -xpProOption(rapidjson) -set(VER 1.1.0) -set(REPO https://github.com/Tencent/rapidjson) -set(FORK https://github.com/externpro/rapidjson) -set(PRO_RAPIDJSON - NAME rapidjson - WEB "RapidJSON" http://Tencent.github.io/rapidjson/ "RapidJSON on githubio" - LICENSE "open" https://raw.githubusercontent.com/Tencent/rapidjson/master/license.txt "The MIT License - http://opensource.org/licenses/mit-license.php" - DESC "C++ library for parsing and generating JSON" - REPO "repo" ${REPO} "rapidjson repo on github" - VER ${VER} - GIT_ORIGIN ${FORK} - GIT_UPSTREAM ${REPO} - GIT_TAG xp${VER} # what to 'git checkout' - GIT_REF v${VER} # create patch from this tag to 'git checkout' - DLURL ${REPO}/archive/v${VER}.tar.gz - DLMD5 badd12c511e081fec6c89c43a7027bce - DLNAME rapidjson-${VER}.tar.gz - PATCH ${PATCH_DIR}/rapidjson.patch - DIFF ${FORK}/compare/Tencent: - ) -######################################## -function(build_rapidjson) - if(APPLE AND NOT XP_PRO_RAPIDJSON) - return() - endif() - if(NOT (XP_DEFAULT OR XP_PRO_RAPIDJSON)) - return() - endif() - xpGetArgValue(${PRO_RAPIDJSON} ARG NAME VALUE NAME) - xpGetArgValue(${PRO_RAPIDJSON} ARG VER VALUE VER) - set(XP_CONFIGURE - -DCMAKE_INSTALL_INCLUDEDIR=include/${NAME}_${VER} - -DXP_INSTALL_CMAKEDIR=share/cmake/tgt-${NAME} - -DXP_NAMESPACE:STRING=xpro - ) - set(TARGETS_FILE tgt-${NAME}/${NAME}-targets.cmake) - string(TOUPPER ${NAME} PRJ) - set(USE_VARS "set(${PRJ}_LIBRARIES xpro::${NAME})\n") - set(USE_VARS "${USE_VARS}list(APPEND reqVars ${PRJ}_LIBRARIES)\n") - configure_file(${MODULES_DIR}/usexp.cmake.in - ${STAGE_DIR}/share/cmake/usexp-${NAME}-config.cmake - @ONLY NEWLINE_STYLE LF - ) - set(BUILD_CONFIGS Release) # this project is only copying headers - xpCmakeBuild(${NAME} "" "${XP_CONFIGURE}") -endfunction() diff --git a/projects/use/usexp-ffmpeg-config.cmake b/projects/use/usexp-ffmpeg-config.cmake deleted file mode 100644 index abd2b40..0000000 --- a/projects/use/usexp-ffmpeg-config.cmake +++ /dev/null @@ -1,95 +0,0 @@ -# FFMPEG_FOUND - FFmpeg was found -# FFMPEG_VER - FFmpeg version -# FFMPEG_LIBRARIES - the FFmpeg libraries -# FFMPEG_DLLNAMES - the FFmpeg shared object names (dll, so) -# FFMPEG_DLLS - the full path to FFmpeg shared objects (dll, so) -set(prj ffmpeg) -# this file (-config) installed to share/cmake -get_filename_component(XP_ROOTDIR ${CMAKE_CURRENT_LIST_DIR}/../.. ABSOLUTE) -get_filename_component(XP_ROOTDIR ${XP_ROOTDIR} ABSOLUTE) # remove relative parts -string(TOUPPER ${prj} PRJ) -set(${PRJ}_VER "@VER@ [@PROJECT_NAME@]") -set(ver _@VER@) -set(verDir /${prj}${ver}) -set(includeDirs ${XP_ROOTDIR}/include${verDir} ${XP_ROOTDIR}/include${verDir}/ffmpeg) -# libraries, in linking order -# https://github.com/FFmpeg/FFmpeg/blob/n2.6.2/configure#L2667-L2675 -set(ffmpeg_all_libs avdevice avfilter avformat avcodec swresample swscale avutil) -if(NOT DEFINED ffmpeg_libs) - set(ffmpeg_libs ${ffmpeg_all_libs}) -endif() -include(CheckLibraryExists) -function(checkLibraryConcat lib symbol liblist) - string(TOUPPER ${lib} LIB) - check_library_exists("${lib}" "${symbol}" "" XP_FFMPEG_HAS_${LIB}) - if(XP_FFMPEG_HAS_${LIB}) - list(APPEND ${liblist} ${lib}) - set(${liblist} ${${liblist}} PARENT_SCOPE) - endif() -endfunction() -# _ffmpeg_*_libs -checkLibraryConcat(asound snd_strerror _ffmpeg_avdevice_libs) -checkLibraryConcat(Xext XShmDetach _ffmpeg_avdevice_libs) -xpFindPkg(PKGS openh264) -xpGetPkgVar(openh264 LIBRARIES) # sets OPENH264_LIBRARIES -set(_ffmpeg_avcodec_libs ${OPENH264_LIBRARIES}) -# _ffmpeg_*_deps -set(_ffmpeg_avdevice_deps avfilter avformat) -set(_ffmpeg_avfilter_deps avcodec swresample swscale) # libavfilter code calls swr_*, sws_* functions -set(_ffmpeg_avformat_deps avcodec) -set(_ffmpeg_avcodec_deps swresample) # libavcodec code calls swr_* functions -set(_ffmpeg_swresample_deps avutil) -set(_ffmpeg_swscale_deps avutil) -set(_ffmpeg_avutil_deps) -foreach(lib ${ffmpeg_all_libs}) - if(NOT TARGET ffmpeg::${lib}) - add_library(ffmpeg::${lib} STATIC IMPORTED) - set(${lib}_RELEASE ${XP_ROOTDIR}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}${lib}${ver}${CMAKE_STATIC_LIBRARY_SUFFIX}) - if(EXISTS "${${lib}_RELEASE}") - set_property(TARGET ffmpeg::${lib} APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE) - set_target_properties(ffmpeg::${lib} PROPERTIES - IMPORTED_LINK_INTERFACE_LANGUAGES_RELEASE "ASM_NASM;C;CXX" - IMPORTED_LOCATION_RELEASE "${${lib}_RELEASE}" - ) - set_target_properties(ffmpeg::${lib} PROPERTIES - INTERFACE_INCLUDE_DIRECTORIES "${includeDirs}" - ) - if(_ffmpeg_${lib}_deps OR _ffmpeg_${lib}_libs) - unset(linkLibs) - foreach(dep ${_ffmpeg_${lib}_deps}) - list(APPEND linkLibs \$) - endforeach() - foreach(dep ${_ffmpeg_${lib}_libs}) - list(APPEND linkLibs \$) - endforeach() - set_target_properties(ffmpeg::${lib} PROPERTIES - INTERFACE_LINK_LIBRARIES "${linkLibs}" - ) - endif() - endif() - endif() -endforeach() -unset(ffmpegLibs) -foreach(lib ${ffmpeg_libs}) - list(APPEND ffmpegLibs "ffmpeg::${lib}") # prepend NAMESPACE -endforeach() -set(${PRJ}_LIBRARIES ${ffmpegLibs}) -set(reqVars ${PRJ}_VER ${PRJ}_LIBRARIES) -if(WIN32) - set(${PRJ}_DLLNAMES - avcodec-56.dll - avdevice-56.dll - avfilter-5.dll - avformat-56.dll - avutil-54.dll - swresample-1.dll - swscale-3.dll - ) - set(${PRJ}_DLLS ${${PRJ}_DLLNAMES}) - list(TRANSFORM ${PRJ}_DLLS PREPEND ${XP_ROOTDIR}/bin${verDir}/) - list(APPEND reqVars ${PRJ}_DLLNAMES ${PRJ}_DLLS) -endif() -include(FindPackageHandleStandardArgs) -set(FPHSA_NAME_MISMATCHED TRUE) # find_package_handle_standard_args NAME_MISMATCHED (prefix usexp-) -find_package_handle_standard_args(${prj} REQUIRED_VARS ${reqVars}) -mark_as_advanced(${reqVars}) diff --git a/projects/wirehair.cmake b/projects/wirehair.cmake deleted file mode 100644 index 8d079e4..0000000 --- a/projects/wirehair.cmake +++ /dev/null @@ -1,52 +0,0 @@ -# wirehair -# xpbuild:cmake-patch -xpProOption(wirehair DBG) -set(VER 21.07.31) # upstream repo has no tags -set(TAG 6d84fad40cbbbb29d4eb91204750ddffe0dcacfe) # 2021.07.31 commit, head of master branch -set(REPO https://github.com/catid/wirehair) -set(FORK https://github.com/externpro/wirehair) -set(PRO_WIREHAIR - NAME wirehair - WEB "wirehair" ${REPO} "wirehair repo on github" - LICENSE "open" ${REPO}/blob/master/LICENSE.txt "BSD 3-Clause New or Revised License" - DESC "fast and portable fountain codes in C" - REPO "repo" ${REPO} "wirehair repo on github" - VER ${VER} - GIT_ORIGIN ${FORK} - GIT_UPSTREAM ${REPO} - GIT_TAG xp${VER} # what to 'git checkout' - GIT_REF ${TAG} # create patch from this tag to 'git checkout' - DLURL ${REPO}/archive/${TAG}.tar.gz - DLMD5 1c2c8d59ed98c4a4dc3fb93f5d03b70f - DLNAME wirehair-${VER}.tar.gz - PATCH ${PATCH_DIR}/wirehair.patch - DIFF ${FORK}/compare/catid: - ) -######################################## -function(build_wirehair) - if(APPLE AND NOT XP_PRO_WIREHAIR) - return() - endif() - if(NOT (XP_DEFAULT OR XP_PRO_WIREHAIR)) - return() - endif() - xpGetArgValue(${PRO_WIREHAIR} ARG NAME VALUE NAME) - xpGetArgValue(${PRO_WIREHAIR} ARG VER VALUE VER) - set(XP_CONFIGURE - -DCMAKE_INSTALL_INCLUDEDIR=include/${NAME}_${VER} - -DCMAKE_INSTALL_LIBDIR=lib - -DXP_INSTALL_CMAKEDIR=share/cmake/tgt-${NAME} - -DXP_NAMESPACE:STRING=xpro - -DDONT_INSTALL_PYTHON:BOOL=TRUE - -DMARCH_NATIVE=OFF - ) - set(TARGETS_FILE tgt-${NAME}/${NAME}-targets.cmake) - string(TOUPPER ${NAME} PRJ) - set(USE_VARS "set(${PRJ}_LIBRARIES xpro::${NAME})\n") - set(USE_VARS "${USE_VARS}list(APPEND reqVars ${PRJ}_LIBRARIES)\n") - configure_file(${MODULES_DIR}/usexp.cmake.in - ${STAGE_DIR}/share/cmake/usexp-${NAME}-config.cmake - @ONLY NEWLINE_STYLE LF - ) - xpCmakeBuild(${NAME} "" "${XP_CONFIGURE}") -endfunction() diff --git a/projects/wx.cmake b/projects/wx.cmake deleted file mode 100644 index 0588f73..0000000 --- a/projects/wx.cmake +++ /dev/null @@ -1,251 +0,0 @@ -# wx -# xpbuild:msw_cmake-scratch,linux_configure-make -set(VER 3.1.0) -xpProOption(wx DBG_MSVC) -set(REPO https://github.com/wxWidgets/wxWidgets) -set(FORK https://github.com/externpro/wxWidgets) -set(PRO_WX - NAME wx - WEB "wxWidgets" http://wxwidgets.org/ "wxWidgets website" - LICENSE "open" http://www.wxwidgets.org/about/newlicen.htm "wxWindows License: essentially LGPL with an exception" - DESC "Cross-Platform GUI Library" - REPO "repo" ${REPO} "wxWidgets repo on github" - GRAPH GRAPH_NODE wx - VER ${VER} - GIT_ORIGIN ${FORK} - GIT_UPSTREAM ${REPO} - GIT_TAG xp${VER} # what to 'git checkout' - GIT_REF v${VER}_240125 # patch from REF to TAG - DLURL ${REPO}/releases/download/v${VER}/wxWidgets-${VER}.tar.bz2 - DLMD5 e20c14bb9bf5d4ec0979a3cd7510dece - PATCH ${PATCH_DIR}/wx.patch - DIFF ${FORK}/compare/ - DEPS_FUNC build_wx - DEPS_VARS WX_INCDIR WX_SRCDIR - SUBPRO wxcmake - ) -if(UNIX AND NOT ${CMAKE_SYSTEM_NAME} STREQUAL Darwin) - set(GTK_VER_RECORDED FALSE CACHE BOOL "gtk version not recorded" FORCE) - set_property(CACHE GTK_VER_RECORDED PROPERTY TYPE INTERNAL) -endif() -######################################## -function(wxFindDeps) - if(UNIX AND NOT ${CMAKE_SYSTEM_NAME} STREQUAL Darwin) - # TODO: detect package required to build on rhel: - # yum install libSM-devel.x86_64 - find_package(PkgConfig) - ##### - # gtk - if(NOT GTK2_FOUND) - pkg_check_modules(GTK3 gtk+-3.0) - endif() - if(GTK3_FOUND) - set(GTK_VER 3) - if(NOT GTK_VER_RECORDED) - file(APPEND ${XP_INFOFILE} "gtk3 version: ${GTK3_VERSION}\n") - set(GTK_VER_RECORDED TRUE CACHE BOOL "gtk version recorded" FORCE) - set_property(CACHE GTK_VER_RECORDED PROPERTY TYPE INTERNAL) - endif() - else() - pkg_check_modules(GTK2 gtk+-2.0) - if(GTK2_FOUND) - set(GTK_VER 2) - if(NOT GTK_VER_RECORDED) - file(APPEND ${XP_INFOFILE} "gtk2 version: ${GTK2_VERSION}\n") - set(GTK_VER_RECORDED TRUE CACHE BOOL "gtk version recorded" FORCE) - set_property(CACHE GTK_VER_RECORDED PROPERTY TYPE INTERNAL) - endif() - else() - message(FATAL_ERROR "\n" - "gtk development not found -- wxWidgets can't be built. install on linux:\n" - " apt install libgtk2.0-dev or libgtk-3-dev\n" - " yum install gtk2-devel.x86_64 or gtk3-devel.x86_64\n" - ) - endif() - endif() - set(GTK_VER ${GTK_VER} PARENT_SCOPE) - ######## - # OpenGL - find_package(OpenGL) - if(NOT OPENGL_FOUND OR NOT OPENGL_GLU_FOUND) - message(FATAL_ERROR "\n" - "OpenGL or GLU not found -- wxWidgets can't be built. install on linux:\n" - " apt install libglu1-mesa-dev\n" - " yum install mesa-libGL-devel.x86_64 mesa-libGLU-devel.x86_64\n" - ) - endif() - endif() -endfunction() -######################################## -function(build_wx) - if(APPLE AND NOT XP_PRO_WX) - return() - endif() - if(NOT (XP_DEFAULT OR XP_PRO_WX)) - return() - endif() - wxFindDeps() # sets GTK_VER - set(NAME wxwidgets) - xpGetArgValue(${PRO_WX} ARG VER VALUE VER) - set(FIND_DEPS "# http://docs.wxwidgets.org/trunk/page_libs.html\n") - set(FIND_DEPS "${FIND_DEPS}# TRICKY: reverse dependency order (base should be last)\n") - set(FIND_DEPS "${FIND_DEPS}set(wx_all_libs aui propgrid richtext adv gl html core net xml base)\n") - set(TARGETS_FILE tgt-${NAME}/${NAME}-targets.cmake) - string(TOUPPER ${NAME} PRJ) - set(USE_VARS "if(NOT DEFINED wx_libs)\n") - set(USE_VARS "${USE_VARS} set(wx_libs \${wx_all_libs})\n") - set(USE_VARS "${USE_VARS}endif()\n") - set(USE_VARS "${USE_VARS}set(${PRJ}_LIBRARIES wx_libs)\n") - set(USE_VARS "${USE_VARS}list(TRANSFORM ${PRJ}_LIBRARIES PREPEND wx::) # prepend NAMESPACE\n") - set(USE_VARS "${USE_VARS}list(APPEND reqVars ${PRJ}_LIBRARIES)\n") - configure_file(${MODULES_DIR}/usexp.cmake.in - ${STAGE_DIR}/share/cmake/usexp-${NAME}-config.cmake - @ONLY NEWLINE_STYLE LF - ) - string(REGEX REPLACE "([0-9])\\.([0-9])\\.([0-9])?" - "include/wx-\\1.\\2" wxIncDir ${VER} - ) - if(MSVC) - set(XP_CONFIGURE - -DCMAKE_INSTALL_INCLUDEDIR=${wxIncDir} - -DCMAKE_INSTALL_LIBDIR=lib - -DXP_INSTALL_CMAKEDIR=share/cmake/tgt-${NAME} - ) - xpCmakeBuild(wx wx_wxcmake "${XP_CONFIGURE}") - set(config msvc) - list(APPEND wxtargets wx_${config}) - else() - xpGetConfigureFlags(CXX wx_CONFIGURE_FLAGS) - if(${CMAKE_SYSTEM_NAME} STREQUAL "Darwin") - # http://forums.wxwidgets.org/viewtopic.php?f=19&t=37432 - set(XP_CONFIGURE_BASE /configure --with-osx_cocoa - --with-macosx-version-min=10.7 - --enable-universal_binary=i386,x86_64 - ) - execute_process( - COMMAND xcrun --sdk macosx --show-sdk-path - OUTPUT_VARIABLE sdkPath - OUTPUT_STRIP_TRAILING_WHITESPACE - ) - if(sdkPath) - list(APPEND XP_CONFIGURE_BASE --with-macosx-sdk=${sdkPath}) - endif() - else() - set(XP_CONFIGURE_BASE /configure --with-gtk=${GTK_VER}) - endif() - if(${CMAKE_CXX_COMPILER_ID} MATCHES "Clang") - list(APPEND XP_CONFIGURE_BASE CXX=clang++) - endif() - if(${CMAKE_C_COMPILER_ID} MATCHES "Clang") - list(APPEND XP_CONFIGURE_BASE CC=clang) - endif() - execute_process(COMMAND uname --machine - OUTPUT_VARIABLE unameMachine - OUTPUT_STRIP_TRAILING_WHITESPACE - ERROR_VARIABLE unameErr - ) - if(DEFINED unameMachine AND NOT unameErr AND unameMachine MATCHES "^aarch") - list(APPEND XP_CONFIGURE_BASE --build=aarch64-unknown-linux-gnu --enable-arm-neon) - endif() - list(APPEND XP_CONFIGURE_BASE ${wx_CONFIGURE_FLAGS} --with-opengl - --with-libjpeg=builtin --with-libpng=builtin --with-libtiff=builtin - --with-expat=builtin --with-regex=builtin --with-zlib=builtin - #TODO: --without-subdirs (what does this option do? saw it used in wx forums) - --disable-shared --disable-precomp-headers --without-libnotify - # NOTE: without-libnotify so we can build externpro on a system that has libnotify - # and use the built externpro installer on a system that doesn't have it - --enable-display --enable-std_string --enable-std_iostreams --enable-std_containers - ) - set(XP_CONFIGURE_Install --prefix= --includedir=/include - --bindir=/bin --libdir=/lib - ) - set(XP_CONFIGURE_Release ${XP_CONFIGURE_BASE}) - set(XP_CONFIGURE_Debug ${XP_CONFIGURE_BASE} - --enable-debug --enable-debug_flag --enable-debug_info --enable-debug_gdb - ) - # release version of wx is all we need - # http://wxwidgets.blogspot.com/2009/09/debug-build-changes-in-wx3.html - set(BUILD_CONFIGS Release) - foreach(cfg ${BUILD_CONFIGS}) - set(XP_CONFIGURE_CMD ${XP_CONFIGURE_${cfg}} ${XP_CONFIGURE_Install}) - addproject_wx(${cfg}) - endforeach() - list(GET BUILD_CONFIGS 0 config) - endif() - ExternalProject_Get_Property(wx SOURCE_DIR) - ExternalProject_Get_Property(wx_${config} BINARY_DIR) - set(wxSOURCE_DIR ${SOURCE_DIR}) - set(wxBINARY_DIR ${BINARY_DIR}) - if(NOT MSVC) - set(wxTARGETS ${wxSOURCE_DIR}/build/cmake/wxwidgets-targets.cmake) - endif() - set(wxWINUNDEF ${wxSOURCE_DIR}/include/wx/msw/winundef.h) - set(TIFF_HDRS "src/tiff/libtiff/*.h") - if(NOT TARGET wx_stage_hdrs) - ExternalProject_Add(wx_stage_hdrs DEPENDS ${wxtargets} - DOWNLOAD_COMMAND "" DOWNLOAD_DIR ${NULL_DIR} BINARY_DIR ${NULL_DIR} - SOURCE_DIR ${wxSOURCE_DIR} INSTALL_DIR ${STAGE_DIR}/${wxIncDir} - PATCH_COMMAND ${CMAKE_COMMAND} -Dsrc:STRING=${wxTARGETS} - -Ddst:STRING=${STAGE_DIR}/share/cmake/tgt-${NAME}/ - -P ${MODULES_DIR}/cmscopyfiles.cmake - CONFIGURE_COMMAND ${CMAKE_COMMAND} -Dsrc:STRING=${wxWINUNDEF} - -Ddst:STRING=/externpro/ - -P ${MODULES_DIR}/cmscopyfiles.cmake - BUILD_COMMAND ${CMAKE_COMMAND} -Dsrc:STRING=${wxSOURCE_DIR}/${TIFF_HDRS} - -Ddst:STRING=/wx/tiff/ - -P ${MODULES_DIR}/cmscopyfiles.cmake - # TRICKY: copy tiffconf.h from BINARY_DIR on Linux - INSTALL_COMMAND ${CMAKE_COMMAND} -Dsrc:STRING=${wxBINARY_DIR}/${TIFF_HDRS} - -Ddst:STRING=/wx/tiff/ - -P ${MODULES_DIR}/cmscopyfiles.cmake - ) - set_property(TARGET wx_stage_hdrs PROPERTY FOLDER ${bld_folder}) - endif() - xpListAppendIfDne(wxtargets wx_stage_hdrs) - if(ARGN) - set(${ARGN} "${wxtargets}" PARENT_SCOPE) - set(WX_INCDIR ${wxIncDir} PARENT_SCOPE) - set(WX_SRCDIR ${wxSOURCE_DIR} PARENT_SCOPE) - endif() -endfunction() -#################### -macro(addproject_wx cfg) - set(XP_TARGET wx_${cfg}) - ExternalProject_Get_Property(wx SOURCE_DIR) - set(wxSOURCE_DIR ${SOURCE_DIR}) - if(NOT TARGET ${XP_TARGET}) - if(XP_BUILD_VERBOSE) - message(STATUS "target ${XP_TARGET}") - xpVerboseListing("[CONFIGURE]" "${XP_CONFIGURE_CMD}") - else() - message(STATUS "target ${XP_TARGET}") - endif() - ExternalProject_Add(${XP_TARGET} DEPENDS wx wx_wxcmake - DOWNLOAD_COMMAND "" DOWNLOAD_DIR ${NULL_DIR} SOURCE_DIR ${wxSOURCE_DIR} - CONFIGURE_COMMAND ${XP_CONFIGURE_CMD} - BUILD_COMMAND # use default - INSTALL_COMMAND # use default - ) - ExternalProject_Add_Step(${XP_TARGET} postinstall_${XP_TARGET} - COMMAND ${CMAKE_COMMAND} -E copy_directory - /lib ${STAGE_DIR}/lib - # NOTE: copying the include directory here would be duplicated - # if we ever again build more BUILD_CONFIGS than just Release - COMMAND ${CMAKE_COMMAND} -E copy_directory - /include ${STAGE_DIR}/include - DEPENDEES install - ) - set_property(TARGET ${XP_TARGET} PROPERTY FOLDER ${bld_folder}) - endif() - if(NOT TARGET ${XP_TARGET}_wxconfig) - ExternalProject_Add(${XP_TARGET}_wxconfig DEPENDS ${XP_TARGET} - DOWNLOAD_COMMAND "" DOWNLOAD_DIR ${NULL_DIR} SOURCE_DIR ${wxSOURCE_DIR} - CONFIGURE_COMMAND ${XP_CONFIGURE_${cfg}} - BUILD_COMMAND ${CMAKE_COMMAND} -DcfgDir:STRING=/lib/wx/config - -DstgDir:STRING=${STAGE_DIR} -P ${MODULES_DIR}/cmswxconfig.cmake - INSTALL_COMMAND "" INSTALL_DIR ${NULL_DIR} - ) - set_property(TARGET ${XP_TARGET}_wxconfig PROPERTY FOLDER ${bld_folder}) - endif() - list(APPEND wxtargets ${XP_TARGET} ${XP_TARGET}_wxconfig) -endmacro() diff --git a/projects/wxcmake.cmake b/projects/wxcmake.cmake deleted file mode 100644 index 9686a5d..0000000 --- a/projects/wxcmake.cmake +++ /dev/null @@ -1,16 +0,0 @@ -# wxcmake -set(REPO https://github.com/externpro/wxcmake) -set(PRO_WXCMAKE - NAME wxcmake - SUPERPRO wxWidgets - SUBDIR build/cmake - WEB "wxcmake" ${REPO} "wxcmake project on github" - DESC "build wxWidgets via cmake" - REPO "repo" ${REPO} "wxcmake repo on github" - VER 2019.11.08 # latest wx31 branch commit date - GIT_ORIGIN ${REPO} - GIT_TAG wx31 # what to 'git checkout' - GIT_REF wx0 # create patch from this tag to 'git checkout' - PATCH ${PATCH_DIR}/wxcmake.patch - DIFF ${REPO}/compare/ - ) diff --git a/projects/wxinclude.cmake b/projects/wxinclude.cmake deleted file mode 100644 index ec2e091..0000000 --- a/projects/wxinclude.cmake +++ /dev/null @@ -1,62 +0,0 @@ -# wxinclude -# xpbuild:cmake-scratch -# original source: http://users.skynet.be/towp/wxInclude.zip -# referenced from: http://wiki.wxwidgets.org/Embedding_PNG_Images -# another version: https://github.com/Forkk/MultiMC4/tree/master/src/wxinclude -# TODO: the functions and macros (which I usually don't generate) may need updating -# -- according to the discussion here: http://forums.wxwidgets.org/viewtopic.php?f=1&t=37288 -xpProOption(wxinclude) -set(VER 1.0) -set(REPO https://github.com/externpro/wxInclude) -set(PRO_WXINCLUDE - NAME wxinclude - WEB "wxInclude" http://wiki.wxwidgets.org/Embedding_PNG_Images "wxInclude mentioned in this wxWiki page" - LICENSE "open" http://wiki.wxwidgets.org/Embedding_PNG_Images "assumed wxWindows license, since source can be downloaded from wxWiki" - DESC "embed resources into cross-platform code" - REPO "repo" ${REPO} "wxInclude repo on github" - GRAPH GRAPH_SHAPE box - VER ${VER} - GIT_ORIGIN ${REPO} - GIT_TAG rel # what to 'git checkout' - GIT_REF v${VER} # create patch from this tag to 'git checkout' - DLURL ${REPO}/archive/v${VER}.tar.gz - DLMD5 d4e482e18589df5eb05b862583e802fa - DLNAME wxinclude-v${VER}.tar.gz - PATCH ${PATCH_DIR}/wxInclude.patch - DIFF ${REPO}/compare/ - ) -######################################## -function(build_wxinclude) - if(APPLE AND NOT XP_PRO_WXINCLUDE) - return() - endif() - if(NOT (XP_DEFAULT OR XP_PRO_WXINCLUDE)) - return() - endif() - set(oneValueArgs TARGETS EXE) - cmake_parse_arguments(wxinc "" "${oneValueArgs}" "" ${ARGN}) - xpGetArgValue(${PRO_WXINCLUDE} ARG NAME VALUE NAME) - xpGetArgValue(${PRO_WXINCLUDE} ARG VER VALUE VER) - set(XP_CONFIGURE - -DXP_INSTALL_CMAKEDIR=share/cmake/tgt-${NAME} - -DXP_MODULE_PATH=${CMAKE_DIR} - -DXP_NAMESPACE:STRING=xpro - ) - set(TARGETS_FILE tgt-${NAME}/${NAME}-targets.cmake) - string(TOUPPER ${NAME} PRJ) - set(USE_VARS "set(${PRJ}_EXE xpro::wxInclude)\n") - set(USE_VARS "${USE_VARS}list(APPEND reqVars ${PRJ}_EXE)\n") - configure_file(${MODULES_DIR}/usexp.cmake.in - ${STAGE_DIR}/share/cmake/usexp-${NAME}-config.cmake - @ONLY NEWLINE_STYLE LF - ) - set(BUILD_CONFIGS Release) # we only need a release executable - xpCmakeBuild(${NAME} "" "${XP_CONFIGURE}" ${NAME}Targets) - if(DEFINED wxinc_TARGETS) - xpListAppendIfDne(${wxinc_TARGETS} "${${NAME}Targets}") - set(${wxinc_TARGETS} "${${wxinc_TARGETS}}" PARENT_SCOPE) - endif() - if(DEFINED wxinc_EXE) - set(${wxinc_EXE} ${STAGE_DIR}/bin/wxInclude${CMAKE_EXECUTABLE_SUFFIX} PARENT_SCOPE) - endif() -endfunction() diff --git a/projects/wxx.cmake b/projects/wxx.cmake deleted file mode 100644 index 26ede76..0000000 --- a/projects/wxx.cmake +++ /dev/null @@ -1,54 +0,0 @@ -# wxx -# xpbuild:cmake-scratch -xpProOption(wxx DBG) # include wx extras -set(REPO https://github.com/externpro/wxx) -set(WXX_TARGETS wxxplotctrl wxxthings wxxtlc) -set(PRO_WXX - NAME wxx - WEB "wxx" ${REPO} "wxx project on github" - LICENSE "open" http://wxcode.sourceforge.net/rules.php "wxCode components must use wxWindows license" - DESC "wxWidget-based extra components" - REPO "repo" ${REPO} "wxx repo on github" - GRAPH BUILD_DEPS wx - VER 2024.01.25 # latest xpro branch commit date - GIT_ORIGIN ${REPO} - GIT_TAG xpro # what to 'git checkout' - GIT_REF wxx.03 # create patch from this tag to 'git checkout' - PATCH ${PATCH_DIR}/wxx.xpro.patch - DIFF ${REPO}/compare/ - SUBPRO ${WXX_TARGETS} - ) -######################################## -function(build_wxx) - if(APPLE AND NOT XP_PRO_WXX) - return() - endif() - if(NOT (XP_DEFAULT OR XP_PRO_WXX)) - return() - endif() - xpBuildDeps(depTgts ${PRO_WXX}) # defines WX_INCDIR WX_SRCDIR - xpGetArgValue(${PRO_WXX} ARG SUBPRO VALUES subs) - foreach(sub ${subs}) - list(APPEND depTgts wxx_${sub}) - endforeach() - xpGetArgValue(${PRO_WXX} ARG NAME VALUE NAME) - xpGetArgValue(${PRO_WXX} ARG VER VALUE VER) - set(XP_CONFIGURE - -DCMAKE_INSTALL_INCLUDEDIR=${WX_INCDIR} - -DCMAKE_INSTALL_LIBDIR=lib - -DXP_INSTALL_CMAKEDIR=share/cmake/tgt-${NAME} - -DXP_MODULE_PATH=${CMAKE_DIR} - -DXP_NAMESPACE:STRING=${NAME} - -DWX_SOURCE:PATH=${WX_SRCDIR} - ) - set(FIND_DEPS "xpFindPkg(PKGS wxwidgets) # dependencies\n") - set(TARGETS_FILE tgt-${NAME}/${NAME}-targets.cmake) - string(TOUPPER ${NAME} PRJ) - set(USE_VARS "set(${PRJ}_LIBRARIES ${NAME}::plotctrl ${NAME}::things ${NAME}::tlc)\n") - set(USE_VARS "${USE_VARS}list(APPEND reqVars ${PRJ}_LIBRARIES)\n") - configure_file(${MODULES_DIR}/usexp.cmake.in - ${STAGE_DIR}/share/cmake/usexp-${NAME}-config.cmake - @ONLY NEWLINE_STYLE LF - ) - xpCmakeBuild(${NAME} "${depTgts}" "${XP_CONFIGURE}") -endfunction() diff --git a/projects/wxxplotctrl.cmake b/projects/wxxplotctrl.cmake deleted file mode 100644 index dfb4140..0000000 --- a/projects/wxxplotctrl.cmake +++ /dev/null @@ -1,22 +0,0 @@ -# wxxplotctrl -# repo http://wxcode.svn.sourceforge.net/viewvc/wxcode/trunk/wxCode/components/plotctrl/ -# dwnl http://sourceforge.net/projects/wxcode/files/Components/wxPlotCtrl/ -set(VER 2006.04.28) -string(REPLACE "." "_" VER_ ${VER}) -set(REPO https://github.com/externpro/wxplotctrl) -set(PRO_WXXPLOTCTRL - NAME wxxplotctrl - SUPERPRO wxx - SUBDIR wxplotctrl - WEB "wxPlotCtrl" http://wxcode.sourceforge.net/showcomp.php?name=wxPlotCtrl "wxplotctrl on sourceforge" - DESC "interactive xy data plotting widgets" - REPO "repo" ${REPO} "wxplotctrl repo on github" - VER ${VER} - GIT_ORIGIN ${REPO} - GIT_TAG xp${VER} - GIT_REF v${VER} - DLURL http://downloads.sourceforge.net/project/wxcode/Components/wxPlotCtrl/wxplotctrl_${VER_}.tar.gz - DLMD5 3a0a4feddc5fead1152e6752bfe473bc - PATCH ${PATCH_DIR}/wxx.plotctrl.patch - DIFF ${REPO}/compare/ - ) diff --git a/projects/wxxthings.cmake b/projects/wxxthings.cmake deleted file mode 100644 index 20fd4b0..0000000 --- a/projects/wxxthings.cmake +++ /dev/null @@ -1,22 +0,0 @@ -# wxxthings -# repo http://wxcode.svn.sourceforge.net/viewvc/wxcode/trunk/wxCode/components/wxthings/ -# dwnl http://sourceforge.net/projects/wxcode/files/Components/wxThings/ -set(VER 2006.04.28) -string(REPLACE "." "_" VER_ ${VER}) -set(REPO https://github.com/externpro/wxthings) -set(PRO_WXXTHINGS - NAME wxxthings - SUPERPRO wxx - SUBDIR wxthings - WEB "wxThings" http://wxcode.sourceforge.net/showcomp.php?name=wxThings "wxthings on sourceforge" - DESC "a variety of data containers and controls" - REPO "repo" ${REPO} "wxthings repo on github" - VER ${VER} - GIT_ORIGIN ${REPO} - GIT_TAG xp${VER} - GIT_REF v${VER} - DLURL http://downloads.sourceforge.net/project/wxcode/Components/wxThings/wxthings_${VER_}.tar.gz - DLMD5 1d769a677c0f3f10d51de579873c2613 - PATCH ${PATCH_DIR}/wxx.things.patch - DIFF ${REPO}/compare/ - ) diff --git a/projects/wxxtlc.cmake b/projects/wxxtlc.cmake deleted file mode 100644 index e851f2e..0000000 --- a/projects/wxxtlc.cmake +++ /dev/null @@ -1,21 +0,0 @@ -# wxxtlc -# repo http://wxcode.svn.sourceforge.net/viewvc/wxcode/trunk/wxCode/components/treelistctrl/ -# dwnl http://sourceforge.net/projects/wxcode/files/Components/treelistctrl/ -set(VER 1208) -set(REPO https://github.com/externpro/wxTLC) -set(PRO_WXXTLC - NAME wxxtlc - SUPERPRO wxx - SUBDIR wxTLC - WEB "wxTLC" http://wxcode.sourceforge.net/components/treelistctrl/ "wxTLC (treelistctrl) on sourceforge" - DESC "a multi column tree control" - REPO "repo" ${REPO} "wxTLC repo on github" - VER ${VER} - GIT_ORIGIN ${REPO} - GIT_TAG xp${VER} - GIT_REF v${VER} - DLURL http://downloads.sourceforge.net/project/wxcode/Components/treelistctrl/treelistctrl_${VER}.zip - DLMD5 49252811c837c74b6b627cc36468c2fc - PATCH ${PATCH_DIR}/wxx.tlc.patch - DIFF ${REPO}/compare/ - )