Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
531 commits
Select commit Hold shift + click to select a range
711176c
Improve OpenSSL provider loading
akallabeth Oct 19, 2022
525a7c8
Added missing include
akallabeth Oct 19, 2022
73c9755
Added missing return in winpr_Digest_New
akallabeth Oct 20, 2022
fd092b6
Check for NULL pointer in winpr_Digest_Free
Oct 23, 2022
7cfd97f
Added support for audin version 2
akallabeth Sep 12, 2022
3adcd2d
Updated changelog
akallabeth Oct 24, 2022
b14fe5a
Fixed compile error for old openssl
akallabeth Oct 27, 2022
d859574
Expose CONNECTION_STATE via public API
akallabeth Sep 3, 2021
af69f8c
Added proxy input state sync (#7282)
akallabeth Sep 10, 2021
41185a2
updated changelog
akallabeth Nov 7, 2022
80adde1
Fixed division by zero in urbdrc
akallabeth Oct 13, 2022
68c6a8c
Ensure urb_create_iocompletion uses size_t for calculation
akallabeth Oct 13, 2022
1155582
Fixed missing input buffer length check in urbdrc
akallabeth Oct 13, 2022
ff82ae8
Added missing length check in urb_control_transfer
akallabeth Oct 13, 2022
e865c24
Added missing length checks in zgfx_decompress_segment
akallabeth Oct 13, 2022
6655841
Fixed missing stream length check in drive_file_query_directory
akallabeth Oct 24, 2022
5101fbb
Added function _wcsncmp
akallabeth Oct 24, 2022
3ac3a2c
[winpr, crt] Fix wcs*cmp and wcs*len checks
akallabeth Nov 10, 2022
0a62aba
[winpr, crt] Added wcsstr implementation
akallabeth Nov 10, 2022
027424c
Fixed path validation in drive channel
akallabeth Oct 24, 2022
330e09a
[capabilities] properly set RemoteFxOnly
akallabeth Nov 16, 2022
30a0568
[client,x11] Fixed #8397: Clamp scaled cursor sizes
akallabeth Nov 16, 2022
4001a6d
Add support to send a ServerRedirection PDU.
Sep 27, 2022
cce52d2
Updated version to 2.9.0
akallabeth Nov 16, 2022
fa8e1b1
changelog
akallabeth Nov 16, 2022
8f5fa9a
Fix connection negotiation with mstsc/msrdc
spronovo Oct 16, 2021
6d9f7d7
[channels,printer] Fixed reference counting
akallabeth Nov 21, 2022
e57d1e0
[ntlm]: use rfc5929 binding hash algorithm
akarl10 Nov 21, 2022
1731f30
[winpr,crypto] Split headers
akallabeth Nov 21, 2022
68fd24c
[winpr,crypto] Split crypto header renamed
akallabeth Nov 21, 2022
b933372
[crypto] Added sha3 define guards
akallabeth Nov 22, 2022
f4a05d5
[core,rdp] Add a check for broken RDP security
akallabeth Nov 25, 2022
48702e4
[core,rdp] Refactor rdp security encryption
akallabeth Nov 25, 2022
e540cb5
[uwac] Add support for building against pixman
akallabeth Nov 22, 2022
d49ce39
[uwac] Fixed types and format strings
akallabeth Nov 22, 2022
f5c2485
[codec] fixed region16_union_rect
akallabeth Nov 22, 2022
2466dda
[channel,urbdrc] fix type of usb hotplug callback
akallabeth Dec 7, 2022
16935a7
[client,x11] Fixed #8099: Detect key autorepeat
akallabeth Dec 12, 2022
d931e63
[core,info] enforce extended info limits
akallabeth Dec 14, 2022
568c5a2
[core,info] enforce cbClientDir limits
akallabeth Dec 14, 2022
cdedc49
[core,info] ensure stream length
akallabeth Dec 14, 2022
1242324
[core,info] improve rdp_read_info_null_string
akallabeth Dec 14, 2022
c7513f3
[build] add channel path to RPATH
akallabeth Dec 15, 2022
5cfd766
[build] add missing link targets for BUILTIN_CHANNELS
Dec 16, 2022
c6be8e7
[build] add cmake definition `WITH_PLUGIN_RPATH_ONLY`
Dec 16, 2022
8083f1d
revert changes so that the osmajortype/osminortype is not overwritten
DVeron-RC Dec 22, 2022
559dcf2
core/server: Ignore data PDUs for DVCs that were not opened successfully
pnowack Dec 30, 2022
2ec1b3b
Update changelog
pnowack Dec 31, 2022
bf5c190
[uwac] do not use iso C functions
Jan 11, 2023
a23a24f
[winpr,ntlm] fix NTOWFvxxxA functions
Jan 11, 2023
2e88032
[winpr,sam] fix inalid NULL arguments
Jan 11, 2023
aba2653
uwac/input: Set the right serial when setting cursor
jadahl Nov 16, 2022
020fdf4
uwac/input: Don't pass hotspot as offset when attaching cursor buffer
jadahl Nov 16, 2022
0128dfa
Fix incompatible function pointer types
kraj Jan 18, 2023
01d0f7c
[build,android] only use CMake from SDK
Feb 8, 2023
b363ba5
Backported utils_str_*
akallabeth Jul 29, 2021
b6fe146
Cleaned up redirection code
akallabeth Dec 15, 2021
93bce77
Added utility module for string functions
akallabeth Jun 3, 2022
0735470
[core,settings] add missing redirection options
akallabeth Jan 16, 2023
daa1402
[core] fix client side redirection handling
akallabeth Jan 16, 2023
d2bacdf
[core,nla] refactor buffer use
akallabeth Jan 16, 2023
8c0dcb7
[core,redirect] refactor settings update
akallabeth Jan 16, 2023
3bd7890
[core,redirection] fix string read, cleanup logs
akallabeth Jan 17, 2023
3a559cc
[release] updated version to 2.10.0
akallabeth Feb 16, 2023
7471ae3
[release] updated changelog
akallabeth Feb 16, 2023
498ddbf
Fix #8702: Disable sha3 and shake hashes for libressl
akallabeth Feb 20, 2023
7f55c97
Fixed #8686: Update h264 to use new FFMPEG API
akallabeth Feb 14, 2023
59aa1d3
Update Changelog
pnowack Mar 10, 2023
192cf43
ci: Build linux builds with WITH_GSSAPI=OFF
pnowack Mar 10, 2023
1fe10ab
early bail from update_read_window_state_order when handling WINDOW_O…
byteboon Sep 20, 2021
a50e158
changelog
Mar 14, 2023
60a965a
packaging/rpm: Enable FFmpeg support on Fedora 36+ and RHEL 9+
Conan-Kudo Mar 16, 2023
7b7ad8b
rdpecam/server: Remove wrong assertion
pnowack Apr 19, 2023
41037e3
Update changelog
pnowack Apr 20, 2023
856ecaa
[libfreerdp] add bound check in gdi_SolidFill
starhcq May 22, 2023
797e56b
[libfreerdp] add null pointer check in planar_decompress()
starhcq May 22, 2023
3cab601
[libfreerdp] add bound check in gdi_surface_bits()
starhcq May 22, 2023
aed7c03
changelog
akallabeth May 22, 2023
c617d27
[channels,rdpdr] enforce client state checks
akallabeth Jun 2, 2023
ad7cedc
[channel,rdpdr] use wLog* for client logging
Dec 21, 2022
c3a5238
changelog
akallabeth Jun 2, 2023
37e9f98
Add support for -grab-mouse, to prevent the client from moving the us…
Jun 29, 2020
187123b
[client,x11] restrict pointer move to active window
akallabeth Jun 26, 2023
357d0c8
changelog
akallabeth Jun 26, 2023
6784527
fix ffmpeg source tarball url
linsui Jul 8, 2023
c20a322
channels/cliprdr: Fix writing incorrect PDU type for unlock PDUs
pnowack Jul 19, 2023
2a72946
Update changelog
pnowack Jul 21, 2023
7ece410
[codec,rfx] fix possible out of bound read
akallabeth Aug 4, 2023
82ac016
[codec,nsc] fix missing plane length check
Aug 5, 2023
99e243c
[codec,rfx] free content of currentMessage on fail
Aug 5, 2023
efa0567
[coded,rfx] check indices are within range
Aug 5, 2023
ed264b9
[codec,color] fix freerdp_image_fill
Aug 4, 2023
d8a1ac3
[warnings] fix integer multiplications
akallabeth Aug 22, 2023
2596f66
fix [client/Mac]: ninja build
bmiklautz Dec 14, 2022
ed23125
fix [client/Mac]: ninja build
bmiklautz Dec 14, 2022
636b7fc
Renamed planar ALIGN macro to avoid name collission on osx
akallabeth Jun 9, 2021
ad6ce58
[cmake] backport options
akallabeth Aug 22, 2023
9ed6d6b
[codec,rfx] fix missing brace from broken backport
akallabeth Aug 22, 2023
7debd10
[cmake] update FindOpenSSL
akallabeth Aug 22, 2023
0e58eb0
[ci] add code quality preload files
Jul 27, 2023
a7f022c
[winpr,credui] disable tests on windows
akallabeth Aug 22, 2023
bdb3909
[codec,nsc] ensure integer width
akallabeth Aug 22, 2023
23c3dae
[codec,progressive] fix missing destination checks
akallabeth Aug 22, 2023
bacb8c0
[codec,clear] fix missing bounds checks
akallabeth Aug 22, 2023
9a1ee1b
[codec,nsc] fix input length validation
akallabeth Aug 22, 2023
c23cbdc
[codec,zgfx] fix cBitsRemaining calculation
akallabeth Aug 21, 2023
889348a
[core,orders] fix checks for multi opaque rect
Aug 5, 2023
c659973
[codec,ncrush] fix index checks
akallabeth Aug 28, 2023
7073e7e
Proper pointer event handling for wayland
akallabeth Mar 2, 2021
bb9a52a
Increased UWAC version
akallabeth Mar 2, 2021
ca28de4
Added pointer source events
akallabeth Mar 2, 2021
55f02d3
Added pointer frame events
akallabeth Mar 2, 2021
4efd7dc
Updated changelog
akallabeth Aug 28, 2023
1dae018
[release] update version
akallabeth Aug 28, 2023
e3ef8a0
[codec] encode messages considering endianness
Jul 31, 2023
16047bd
[libfreerdp] fix endianness issues
Jul 31, 2023
1384b3c
Updated changelog
akallabeth Aug 28, 2023
23db2f4
[core,orders] fix reading order number field
akallabeth Sep 4, 2023
270e772
[release] update changelog
akallabeth Sep 4, 2023
9d3d40b
[release] update version to 2.11.1
akallabeth Sep 4, 2023
e93433f
[crypto] backport certificate alg detection
akallabeth Sep 4, 2023
0472543
[winpr,collections] implement duplication for wArrayList
akallabeth Sep 11, 2023
b84069f
changelog
akallabeth Sep 20, 2023
a38c1be
update to 2.11.2
akallabeth Sep 20, 2023
b27b20b
[client,cmdline] Advertise Image RFX GUID when rfx-mode:image
metalefty Sep 23, 2023
b389d02
Fix #9469: Disable WITH_MEDIAFOUNDATION by default
akallabeth Oct 17, 2023
fc17d47
[channels,rdpdr] fix user loggedon handling
Oct 29, 2023
2e238da
Some rdpsnd debug improvements
akallabeth Apr 28, 2022
9118037
Remember received sound volume and apply on open.
akallabeth Apr 28, 2022
dbebfc7
rdpsnd_pulse: Eliminate synchronous write loop
i-garrison Nov 1, 2023
dcca5ad
rdpsnd_pulse: Allow reconnecting to pulseaudio server
i-garrison Nov 1, 2023
0774ea7
rdpsnd_pulse: Use C99 constants
i-garrison Nov 2, 2023
82a5e89
the default Swiss keyboard layout is German, French is a variant
kbucheli Jun 30, 2023
b3c81c1
[channel,rdpdr] use server general caps
Nov 3, 2023
88438ff
[channel,rdpdr] relax state checks
Nov 3, 2023
39b7d5a
[codec,aac] add NaN filter
akallabeth Nov 20, 2023
7307190
crypto: Don't rely on OpenSSL 1.1.x symbols
AlessandroBono Nov 21, 2023
5d58c2c
[rdpdr] fix broken backport
Nov 24, 2023
453f4cf
fixed clang-format
Dec 4, 2023
67df862
[channels,rdpdr] fix #9610
akallabeth Dec 6, 2023
b837bc1
[winpr,crt] fix ICU string convert
Dec 11, 2023
b2fa4d6
changelog
akallabeth Dec 14, 2023
b71674f
update release version to 2.11.3
akallabeth Dec 14, 2023
f286f34
next development version 2.11.4-dev
akallabeth Dec 14, 2023
52663d5
winpr: Fix typo, that led to a compilation error
pnowack Dec 14, 2023
60016d9
update changelog
Dec 14, 2023
9c4cf02
release-2.11.4
Dec 14, 2023
17635aa
start 2.11.5-dev cycle
Dec 14, 2023
d3f6274
[deprecation] use new openssl API
akallabeth Jan 9, 2024
1d929ae
[codec,progressive] prevent write at NULL
alega-kas Dec 25, 2023
8b0281f
[channels,rdpsnd] fix missing include
akallabeth Nov 22, 2023
aeac304
[codec,planar] check resolution for overflow
Jan 13, 2024
6277095
changelog
akallabeth Jan 19, 2024
f1121b0
release 2.11.5
akallabeth Jan 19, 2024
e87df53
start 2.11.6-dev cycle
akallabeth Jan 19, 2024
b70c8e9
[codec,ncrush] fix missing input length check
akallabeth Apr 16, 2024
9bc624c
[codec,planar] fix missing input length checks
akallabeth Apr 16, 2024
d88ad1a
[codec,clear] fix integer overflow
akallabeth Apr 16, 2024
5893b5f
[codec,nsc] fix missing check
akallabeth Apr 16, 2024
18cef37
[codec,interleaved] backport from 3.5.0
akallabeth Apr 17, 2024
3a5cf5a
[clang] unify tool detection
akallabeth Jan 24, 2024
35414fe
changelog
akallabeth Apr 17, 2024
dee7e7e
release-2.11.6
akallabeth Apr 17, 2024
202474a
start-2.11.7-dev-cycle
akallabeth Apr 17, 2024
cb90fac
[codec,interleaved] fix bounds checks
akallabeth Apr 19, 2024
f64acf9
[codec,nsc] check for valid ColorLossLevel
akallabeth Apr 20, 2024
2b9f30a
[codec,interleaved] fix offset error
akallabeth Apr 20, 2024
a9ff85f
[codec,clear] vBarShortEntry count check
akallabeth Apr 20, 2024
0381b3b
[codec,zgfx] allocate in segment steps
akallabeth Apr 20, 2024
29ba976
[codec,clear] use size_t types for sizes
akallabeth Apr 20, 2024
8b9ad6c
[codec,color] fix out of bound read
akallabeth Apr 21, 2024
9b341d1
[core,orders] shift unsigned value
akallabeth Apr 22, 2024
550355d
changelog
akallabeth Apr 22, 2024
7f6cc93
release-2.11.7
akallabeth Apr 22, 2024
a383740
next-dev-2.11.8-dev
akallabeth Apr 22, 2024
4f41119
info: Fix incompatible pointer type
AlessandroBono May 8, 2024
f3ed1f1
redirection: Fix incompatible pointer type
AlessandroBono May 8, 2024
7894a7d
redirection: Fix incompatible pointer type
AlessandroBono May 8, 2024
efa899d
Merge pull request #10172 from AlessandroBono/wip/abono/incompatible-…
akallabeth May 8, 2024
d2b6771
X11: fix pointer/integer type mismatch
floppym May 22, 2024
67818bd
[client,wayland] fix const correctness
akallabeth May 23, 2024
0c20fac
Merge pull request #10207 from floppym/bug932407-int-conversion
akallabeth May 23, 2024
5b2b53b
[warnings] fix -Wincompatible-pointer-types
akallabeth Aug 8, 2024
be23ed4
[server,proxy] deactivate capture module
akallabeth Aug 8, 2024
5b14b7c
Merge pull request #10456 from akallabeth/warn_backport
akallabeth Aug 8, 2024
052c525
[core] eliminate rdpRdp::instance
akallabeth Oct 25, 2024
a9deecc
fix [core]: 'invalid hHandle' errors
bmiklautz Oct 27, 2024
68c7c21
X11 client: ignore grab related LeaveNotify events
mstarostik Feb 7, 2021
85e827a
Merge pull request #10782 from akallabeth/rdp-instance-remove
akallabeth Nov 25, 2024
9cfac2f
Merge pull request #10888 from akallabeth/stable-2.0-mouse
akallabeth Nov 25, 2024
562ae35
[winpr,pubsub] add NULL parameter checks
akallabeth Nov 28, 2024
0ee17e2
Merge pull request #10898 from akallabeth/oldstable-pubsub
bmiklautz Dec 2, 2024
4fa53e6
fix: correct server port assignment logic
LeeEirc Aug 20, 2025
0cd07f2
Merge pull request #11793 from LeeEirc/fix-proxy-config
akallabeth Aug 20, 2025
fadece9
[channels,rdpgfx] check available stream length
akallabeth Feb 9, 2026
a4a495a
[winpr,stream] backport parts of #12319 and follow ups
akallabeth Feb 23, 2026
9b678b6
changelog & release 2.11.8
akallabeth Feb 23, 2026
993f86a
Merge pull request #12351 from akallabeth/release-2.x-last
akallabeth Feb 25, 2026
d552b26
Fix Queue.c to make stable-2.0 build
joshua2a Mar 19, 2026
6262bca
Merge pull request #12513 from joshua2a/stable-2.0
akallabeth Mar 19, 2026
a4f32b0
[codec,nsc] limit copy area in nsc_process_message
akallabeth Mar 9, 2026
a63afe0
[codec,nsc] bounds checks and doxygen
akallabeth Feb 15, 2026
b37aa66
Merge pull request #12656 from vulgraph/backport/CVE-2026-31806-stabl…
akallabeth Apr 22, 2026
7a2663b
[channels,urbdrc] cancel all usb transfers on channel close
akallabeth Jan 26, 2026
c496a9b
[client,x11] fix xf_rail_window_common cleanup
akallabeth Feb 9, 2026
bbd5eb6
Merge pull request #12658 from vulgraph/backport/CVE-2026-24681-stabl…
akallabeth Apr 22, 2026
1ac55c0
Merge pull request #12659 from vulgraph/backport/CVE-2026-26986-stabl…
akallabeth Apr 22, 2026
978e9dc
[core,info] fix missing NULL check
akallabeth Jan 19, 2026
967454f
Merge pull request #12660 from vulgraph/backport/CVE-2026-23948-stabl…
akallabeth Apr 22, 2026
b35d51d
[client,X11] fix clipboard update
akallabeth Apr 22, 2026
363de21
[core,orders] improve input validation
akallabeth Mar 3, 2026
f408620
Merge pull request #12661 from vulgraph/backport/CVE-2026-25997-stabl…
akallabeth Apr 23, 2026
101c1d3
Merge pull request #12662 from vulgraph/backport/CVE-2026-29776-stabl…
akallabeth Apr 23, 2026
4e8d48e
[codec,clear] fix destination checks
akallabeth Feb 16, 2026
bc0fda1
[codec,planar] fix missing destination bounds checks
akallabeth Feb 16, 2026
4da3d3c
[codec,h264] validate rectangles before use
akallabeth Feb 28, 2026
b2345d0
[channels,urbdrc] ensure InterfaceNumber is within range
akallabeth Jan 26, 2026
d5de233
Merge pull request #12665 from vulgraph/backport/CVE-2026-26955-stabl…
akallabeth Apr 23, 2026
ebbce0c
Merge pull request #12667 from vulgraph/backport/CVE-2026-26965-stabl…
akallabeth Apr 23, 2026
713a243
[codec,clear] Update CLEAR_GLYPH_ENTRY::count after alloc
akallabeth Apr 23, 2026
29175eb
Merge pull request #12668 from vulgraph/backport/CVE-2026-29774-stabl…
akallabeth Apr 23, 2026
fa4566f
Merge pull request #12669 from vulgraph/backport/CVE-2026-24679-stabl…
akallabeth Apr 23, 2026
2f36ff0
Merge pull request #12670 from vulgraph/backport/CVE-2026-33985-stabl…
akallabeth Apr 23, 2026
9f6e61c
[codec,progressive] Fail progressive_rfx_quant_sub on invalid values
akallabeth Mar 25, 2026
062d6e1
[core,gateway] Check rpcconn_common_hdr_t::auth_length is valid
akallabeth Mar 25, 2026
85541ca
[codec,planar] add early length check to avoid oob read
akallabeth Mar 10, 2026
d473cef
[codec,dsp] fix IMA ADPCM sample clamping
akallabeth Mar 25, 2026
1c02d01
Merge pull request #12671 from vulgraph/backport/CVE-2026-33983-stabl…
akallabeth Apr 23, 2026
8616d38
Merge pull request #12672 from vulgraph/backport/CVE-2026-33952-stabl…
akallabeth Apr 23, 2026
7f7b9f6
Merge pull request #12673 from vulgraph/backport/CVE-2026-31897-stabl…
akallabeth Apr 23, 2026
8cb377c
Merge pull request #12675 from vulgraph/backport/CVE-2026-33977-stabl…
akallabeth Apr 23, 2026
c3d85cb
[core,info] fix missing check in rdp_write_logon_info_v1
akallabeth Apr 21, 2024
4611a0e
Merge pull request #12676 from vulgraph/backport/CVE-2024-32661-stabl…
akallabeth Apr 23, 2026
3adb5f9
[codec,dsp] add format checks
akallabeth Mar 10, 2026
46be2a6
[codec,dsp] fix array bounds checks
akallabeth Mar 10, 2026
6b8015c
Merge pull request #12683 from vulgraph/backport/CVE-2026-31885-stabl…
akallabeth Apr 25, 2026
487b11a
Merge pull request #12682 from vulgraph/backport/CVE-2026-31884-stabl…
akallabeth Apr 25, 2026
dea4531
[channels,ainput] lock context when updating listener
vulgraph May 1, 2026
75fb359
[client,x11] stringfiy functions for RAILS
akallabeth Feb 9, 2026
6282690
[client,x11] lock cache when providing data (CVE-2026-25959)
akallabeth Feb 9, 2026
f7bfff2
Merge pull request #12725 from vulgraph/backport/CVE-2026-25942-stabl…
akallabeth May 1, 2026
32f27b4
Merge pull request #12726 from vulgraph/backport/CVE-2026-24683-stabl…
akallabeth May 1, 2026
d7e1aa3
Merge pull request #12727 from vulgraph/backport/CVE-2026-25959-stabl…
akallabeth May 1, 2026
13dd491
[channels,rdpsnd] terminate thread before free
May 3, 2026
37dec34
[cache,bitmap] overallocate bitmap cache
May 3, 2026
0d92f2a
Merge pull request #12734 from vulgraph/backport/CVE-2026-29775-stabl…
akallabeth May 4, 2026
9fa9dd3
Merge pull request #12733 from vulgraph/backport/CVE-2026-24684-stabl…
akallabeth May 4, 2026
af7048d
channels/server: port WSLg gfxredir support and AF_VSOCK listener
benhillis May 19, 2026
e7729b2
add Hebrew (Standard) keyboard layout ID (#3)
hideyukn88 Mar 22, 2022
0eb5f28
Microsoft mandatory file
microsoft-github-policy-service[bot] Jun 2, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 0 additions & 1 deletion .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@ ForEachMacros:
...
Language: ObjC
PointerBindsToType: false
ObjCSpaceAfterProperty: true
SortIncludes: false
ObjCBlockIndentWidth: 4
ObjCSpaceAfterProperty: false
Expand Down
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ addons:
- libgsm1-dev
- libavcodec-dev
- libavutil-dev
- libx264-dev
- libxext-dev
- ninja-build
- libsystemd-dev
Expand Down
116 changes: 68 additions & 48 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ if(NOT DEFINED FREERDP_VENDOR)
set(FREERDP_VENDOR 1)
endif()

set(CMAKE_COLOR_MAKEFILE ON)

set(CMAKE_POSITION_INDEPENDENT_CODE ON)
option(CMAKE_COLOR_MAKEFILE "colorful CMake makefile" ON)
option(CMAKE_VERBOSE_MAKEFILE "verbose CMake makefile" ON)
option(CMAKE_POSITION_INDEPENDENT_CODE "build with position independent code (-fPIC or -fPIE)" ON)

# Include our extra modules
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/)
Expand Down Expand Up @@ -85,7 +85,7 @@ if ($ENV{BUILD_NUMBER})
endif()
set(WITH_LIBRARY_VERSIONING "ON")

set(RAW_VERSION_STRING "2.4.0")
set(RAW_VERSION_STRING "2.11.8-dev")
if(EXISTS "${CMAKE_SOURCE_DIR}/.source_tag")
file(READ ${CMAKE_SOURCE_DIR}/.source_tag RAW_VERSION_STRING)
elseif(USE_VERSION_FROM_GIT_TAG)
Expand All @@ -111,6 +111,24 @@ else()
endif()
message("FREERDP_VERSION=${FREERDP_VERSION_FULL}")

if(EXISTS "${PROJECT_SOURCE_DIR}/.source_version" )
file(READ ${PROJECT_SOURCE_DIR}/.source_version GIT_REVISION)

string(STRIP ${GIT_REVISION} GIT_REVISION)
elseif(USE_VERSION_FROM_GIT_TAG)
git_get_exact_tag(GIT_REVISION --tags --always)

if (${GIT_REVISION} STREQUAL "n/a")
git_rev_parse (GIT_REVISION --short)
endif()
endif()

if (NOT GIT_REVISION)
set(GIT_REVISION ${FREERDP_VERSION})
endif()

message(STATUS "Git Revision ${GIT_REVISION}")

set(FREERDP_INCLUDE_DIR "include/freerdp${FREERDP_VERSION_MAJOR}/")

# Compatibility options
Expand Down Expand Up @@ -147,25 +165,11 @@ if(CCACHE AND WITH_CCACHE)
endif()
endif(CCACHE AND WITH_CCACHE)

if(EXISTS "${CMAKE_SOURCE_DIR}/.source_version" )
file(READ ${CMAKE_SOURCE_DIR}/.source_version GIT_REVISION)

string(STRIP ${GIT_REVISION} GIT_REVISION)
else()
git_get_exact_tag(GIT_REVISION --tags --always)

if (${GIT_REVISION} STREQUAL "n/a")
git_rev_parse (GIT_REVISION --short)
endif()
endif()

if(CMAKE_CROSSCOMPILING)
SET (CMAKE_FIND_ROOT_PATH_MODE_PROGRAM ONLY)
endif(CMAKE_CROSSCOMPILING)
# /Allow to search the host machine for git/ccache

message(STATUS "Git Revision ${GIT_REVISION}")

# Turn on solution folders (2.8.4+)
set_property(GLOBAL PROPERTY USE_FOLDERS ON)

Expand Down Expand Up @@ -221,7 +225,7 @@ endif()
if(MSVC)
include(MSVCRuntime)
if(NOT DEFINED MSVC_RUNTIME)
set(MSVC_RUNTIME "dynamic")
set(MSVC_RUNTIME "dynamic" CACHE STRING "MSVC runtime type [dynamic|static]")
endif()
if(MSVC_RUNTIME STREQUAL "static")
if(BUILD_SHARED_LIBS)
Expand Down Expand Up @@ -351,7 +355,7 @@ if(NOT IOS)
find_package(Threads REQUIRED)
endif()

if(NOT WIN32)
if(NOT WIN32 AND NOT IOS)
CHECK_SYMBOL_EXISTS(pthread_mutex_timedlock pthread.h HAVE_PTHREAD_MUTEX_TIMEDLOCK_SYMBOL)
if (NOT HAVE_PTHREAD_MUTEX_TIMEDLOCK_SYMBOL)
CHECK_LIBRARY_EXISTS(pthread pthread_mutex_timedlock "" HAVE_PTHREAD_MUTEX_TIMEDLOCK_LIB)
Expand Down Expand Up @@ -528,14 +532,25 @@ add_definitions(-DWINPR_EXPORTS -DFREERDP_EXPORTS)
if(NOT IOS)
check_include_files(fcntl.h HAVE_FCNTL_H)
check_include_files(unistd.h HAVE_UNISTD_H)
check_include_files(execinfo.h HAVE_EXECINFO_H)
check_include_files(inttypes.h HAVE_INTTYPES_H)
check_include_files(sys/modem.h HAVE_SYS_MODEM_H)
check_include_files(sys/filio.h HAVE_SYS_FILIO_H)
check_include_files(sys/sockio.h HAVE_SYS_SOCKIO_H)
check_include_files(sys/strtio.h HAVE_SYS_STRTIO_H)
check_include_files(sys/select.h HAVE_SYS_SELECT_H)
check_include_files(syslog.h HAVE_SYSLOG_H)
check_include_files(execinfo.h HAVE_EXECINFO_HEADER)
if (HAVE_EXECINFO_HEADER)
check_symbol_exists(backtrace execinfo.h HAVE_EXECINFO_BACKTRACE)
check_symbol_exists(backtrace_symbols execinfo.h HAVE_EXECINFO_BACKTRACE_SYMBOLS)
check_symbol_exists(backtrace_symbols_fd execinfo.h HAVE_EXECINFO_BACKTRACE_SYMBOLS_FD)

# Some implementations (e.g. Android NDK API < 33) provide execinfo.h but do not define
# the backtrace functions. Disable detection for these cases
if (HAVE_EXECINFO_BACKTRACE AND HAVE_EXECINFO_BACKTRACE_SYMBOLS AND HAVE_EXECINFO_BACKTRACE_SYMBOLS_FD)
set(HAVE_EXECINFO_H ON)
endif()
endif()
else()
set(HAVE_FCNTL_H 1)
set(HAVE_UNISTD_H 1)
Expand Down Expand Up @@ -594,6 +609,11 @@ if(ANDROID)
set (WITH_NEON OFF)
endif()

if(ANDROID_ABI STREQUAL arm64-v8a)
# https://github.com/android/ndk/issues/910
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mfloat-abi=softfp")
endif()

if("${CMAKE_BUILD_TYPE}" STREQUAL "Debug")
add_definitions(-DNDK_DEBUG=1)

Expand Down Expand Up @@ -652,6 +672,7 @@ if(UNIX OR CYGWIN)
include(CheckFunctionExists)

check_function_exists(getlogin_r HAVE_GETLOGIN_R)
check_function_exists(getpwuid_r HAVE_GETPWUID_R)
else()
set(X11_FEATURE_TYPE "DISABLED")
set(WAYLAND_FEATURE_TYPE "DISABLED")
Expand Down Expand Up @@ -719,10 +740,6 @@ set(JPEG_FEATURE_TYPE "OPTIONAL")
set(JPEG_FEATURE_PURPOSE "codec")
set(JPEG_FEATURE_DESCRIPTION "use JPEG library")

set(X264_FEATURE_TYPE "OPTIONAL")
set(X264_FEATURE_PURPOSE "codec")
set(X264_FEATURE_DESCRIPTION "use x264 library")

set(OPENH264_FEATURE_TYPE "OPTIONAL")
set(OPENH264_FEATURE_PURPOSE "codec")
set(OPENH264_FEATURE_DESCRIPTION "use OpenH264 library")
Expand Down Expand Up @@ -808,7 +825,6 @@ if(ANDROID)
set(PULSE_FEATURE_TYPE "DISABLED")
set(CUPS_FEATURE_TYPE "DISABLED")
set(PCSC_FEATURE_TYPE "DISABLED")
set(FFMPEG_FEATURE_TYPE "DISABLED")
set(VAAPI_FEATURE_TYPE "DISABLED")
set(OPENSLES_FEATURE_TYPE "REQUIRED")
endif()
Expand All @@ -831,7 +847,6 @@ find_feature(PCSC ${PCSC_FEATURE_TYPE} ${PCSC_FEATURE_PURPOSE} ${PCSC_FEATURE_DE
find_feature(FFmpeg ${FFMPEG_FEATURE_TYPE} ${FFMPEG_FEATURE_PURPOSE} ${FFMPEG_FEATURE_DESCRIPTION})

find_feature(JPEG ${JPEG_FEATURE_TYPE} ${JPEG_FEATURE_PURPOSE} ${JPEG_FEATURE_DESCRIPTION})
find_feature(x264 ${X264_FEATURE_TYPE} ${X264_FEATURE_PURPOSE} ${X264_FEATURE_DESCRIPTION})
find_feature(OpenH264 ${OPENH264_FEATURE_TYPE} ${OPENH264_FEATURE_PURPOSE} ${OPENH264_FEATURE_DESCRIPTION})
find_feature(OpenCL ${OPENCL_FEATURE_TYPE} ${OPENCL_FEATURE_PURPOSE} ${OPENCL_FEATURE_DESCRIPTION})
find_feature(GSM ${GSM_FEATURE_TYPE} ${GSM_FEATURE_PURPOSE} ${GSM_FEATURE_DESCRIPTION})
Expand All @@ -857,18 +872,23 @@ if (WITH_DSP_FFMPEG)
# Deactivate FFmpeg backend for sound, if the version is too old.
# See libfreerdp/codec/dsp_ffmpeg.h
file(STRINGS "${AVCODEC_INCLUDE_DIR}/libavcodec/version.h" AV_VERSION_FILE REGEX "LIBAVCODEC_VERSION_M[A-Z]+[\t ]*[0-9]+")
if (EXISTS "${AVCODEC_INCLUDE_DIR}/libavcodec/version_major.h")
file(STRINGS "${AVCODEC_INCLUDE_DIR}/libavcodec/version_major.h" AV_VERSION_FILE2 REGEX "LIBAVCODEC_VERSION_M[A-Z]+[\t ]*[0-9]+")
list(APPEND AV_VERSION_FILE ${AV_VERSION_FILE2})
endif()

FOREACH(item ${AV_VERSION_FILE})
STRING(REGEX MATCH "LIBAVCODEC_VERSION_M[A-Z]+[\t ]*[0-9]+" litem ${item})
IF(litem)
string(REGEX REPLACE "[ \t]+" ";" VSPLIT_LINE ${litem})
list(LENGTH VSPLIT_LINE VSPLIT_LINE_LEN)
if (NOT "${VSPLIT_LINE_LEN}" EQUAL "2")
message(ERROR "invalid entry in libavcodec version header ${item}")
endif(NOT "${VSPLIT_LINE_LEN}" EQUAL "2")
list(GET VSPLIT_LINE 0 VNAME)
list(GET VSPLIT_LINE 1 VVALUE)
set(${VNAME} ${VVALUE})
ENDIF(litem)
IF(litem)
string(REGEX REPLACE "[ \t]+" ";" VSPLIT_LINE ${litem})
list(LENGTH VSPLIT_LINE VSPLIT_LINE_LEN)
if (NOT "${VSPLIT_LINE_LEN}" EQUAL "2")
message(ERROR "invalid entry in libavcodec version header ${item}")
endif(NOT "${VSPLIT_LINE_LEN}" EQUAL "2")
list(GET VSPLIT_LINE 0 VNAME)
list(GET VSPLIT_LINE 1 VVALUE)
set(${VNAME} ${VVALUE})
ENDIF(litem)
ENDFOREACH(item ${AV_VERSION_FILE})

set(AVCODEC_VERSION "${LIBAVCODEC_VERSION_MAJOR}.${LIBAVCODEC_VERSION_MINOR}.${LIBAVCODEC_VERSION_MICRO}")
Expand Down Expand Up @@ -917,7 +937,7 @@ if(MBEDTLS_FOUND)
add_definitions("-DWITH_MBEDTLS")
endif()

if (WITH_X264 OR WITH_OPENH264 OR WITH_MEDIA_FOUNDATION OR WITH_FFMPEG)
if (WITH_OPENH264 OR WITH_MEDIA_FOUNDATION OR WITH_FFMPEG OR WITH_MEDIACODEC)
set(WITH_GFX_H264 ON)
else()
set(WITH_GFX_H264 OFF)
Expand Down Expand Up @@ -970,7 +990,16 @@ if (APPLE)
else (APPLE)
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
if (NOT FREEBSD)
set(CMAKE_INSTALL_RPATH "\$ORIGIN/../${CMAKE_INSTALL_LIBDIR}:\$ORIGIN/..")
if (NOT BUILTIN_CHANNELS)
if (NOT DEFINED WITH_PLUGIN_RPATH_ONLY)
set(CMAKE_INSTALL_RPATH "\$ORIGIN/../${CMAKE_INSTALL_LIBDIR}:\$ORIGIN/..:\$ORIGIN/../${FREERDP_PLUGIN_PATH}")
else()
# we need to supply this run path, even if not using RPATH in general
set(CMAKE_INSTALL_RPATH "\$ORIGIN/../${FREERDP_PLUGIN_PATH}")
endif()
else()
set(CMAKE_INSTALL_RPATH "\$ORIGIN/../${CMAKE_INSTALL_LIBDIR}:\$ORIGIN/..")
endif()
endif()
endif(APPLE)

Expand Down Expand Up @@ -1033,15 +1062,6 @@ add_subdirectory(include)

add_subdirectory(libfreerdp)

if (IOS)
set(CMAKE_OSX_DEPLOYMENT_TARGET "10.0")
if (IOS_PLATFORM MATCHES "SIMULATOR")
set(CMAKE_OSX_SYSROOT "iphonesimulator")
else()
set(CMAKE_OSX_SYSROOT "iphoneos")
endif()
endif()

# RdTk
include_directories("${CMAKE_SOURCE_DIR}/rdtk/include")
include_directories("${CMAKE_BINARY_DIR}/rdtk/include")
Expand Down
Loading
Loading