Commit Graph

591 Commits

Author SHA1 Message Date
akallabeth
f3e1f20018 [cmake] unify version creation
* move to common cmake/GetProjectVersion.cmake for both, WinPR and
  FreeRDP
* add preference for git tag or commit
* move options to this common file
2025-06-27 12:48:52 +02:00
akallabeth
f48b129414 [client,desktop] fix StartupWMClass setting 2025-06-26 10:23:43 +02:00
Armin Novak
84691cf881 [cmake] set MSVC utf-8 source encoding 2025-06-05 11:58:47 +02:00
akallabeth
52ff1cef93 [cmake] install SSO-MIB if build by ExternalProject
* Install the library if we build it as part of FreeRDP
* Format files with cmake-format
2025-06-02 19:40:44 +02:00
Andreas Ziegler
d6d6909d66 chore: allow fetching sso-mib as ExternalProject 2025-05-21 11:44:16 +02:00
Andreas Ziegler
5e76909881 feat: add login through MS identity broker via sso-mib interface
This change enables an alternative way of acquiring the necessary
access tokens through a local identity broker. In the current
implementation, we need to visit URLs twice and paste back the
URLs we are redirected to in order to extract authorization codes
and ultimately fetch the correct access tokens for RDP (described
here: <0>).

As an alternative, MS also provides the Microsoft Authentication
Library (MSAL) through which authentication can be handled more
or less in the background when we're using a trusted device. In
particular, we can request access tokens with the same
parameters as we're currently doing through the URL-based scheme.

As the MSAL bindings are not available for C, we implemented a
small wrapper library called sso-mib which is available at
https://github.com/siemens/sso-mib. This library translates the
high-level requests (such as acquire_token_interactive) to
respective messages on the D-Bus messaging bus which is used to
communicate with the identity broker service on Linux. The
library can be built as a .deb package and subsequently be
found through PkgConfig mechanisms in CMake.

When sso-mib is not available through pkg-config, it can also
be placed in external/, with the directory structure looking
like the following. include/ is copied from the root of the
sso-mib directory and lib/ populated with the built shared
library files and symlinks.

    external/
    ├── README
    └── sso-mib
        ├── include
        │   └── sso-mib
        │       ├── mib-account.h
        │       ├── mib-client-app.h
        │       ├── mib-exports.h
        │       ├── mib-pop-params.h
        │       ├── mib-prt.h
        │       ├── mib-prt-sso-cookie.h
        │       └── sso-mib.h
        └── lib
            ├── libsso-mib.so -> libsso-mib.so.0
            ├── libsso-mib.so.0 -> libsso-mib.so.0.4.0
            └── libsso-mib.so.0.4.0

This feature is currently hidden behind a configuration switch
and must be enabled via `-DWITH_SSO_MIB=ON`. If the connection
to the broker fails (for example, if no identity broker is
installed or running on the system), we automatically fall back
to the current scheme of copy-pasting URLs.

<0>: https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-rdpbcgr/e967ebeb-9e9f-443e-857a-5208802943c2
2025-05-21 11:44:16 +02:00
akallabeth
abbc6ba37f [cmake,krb5] fix redetection of kerberos 2025-05-16 11:04:17 +02:00
akallabeth
1e2b44e73e [cmake,ffmpeg] fix cmake formatting 2025-05-05 10:08:02 +02:00
Florian Märkl
1cfb03d5f9 [cmake] Fix finding ffmpeg under nonstandard prefixes
The prefix given to pkg_check_modules is PC_${_component}, not
PC_LIB${_component}, so those variables were always read as empty, thus
no HINTS were passed to the find_* functions and ffmpeg could not be
found if it was not in a default path.
2025-05-01 21:36:16 +02:00
akallabeth
0eefdbdb40 [cmake,json] improve json detection 2025-04-22 10:20:01 +02:00
akallabeth
79b8793a8f [cmake] simplify v4l detection 2025-04-12 21:26:44 +02:00
akallabeth
6314e93939 [cmake] drop legacy and unused cmake_policy
Some cmake_policy settings have long been active by default (3.13 is our
current baseline) or simply unused. Due to issues with CMake 4.0 lets
drop them
2025-04-03 08:31:36 +02:00
akallabeth
e3c93573f3 [cmake] add explicit instructions to turn off unmaintained modules
* Add detailed CMake warning to disable unmaintained modules
* Add sample shadow subsystem implementation
* Allow building shadow server with dummy subsystem
2025-03-17 16:23:51 +01:00
akallabeth
2b46c3d3e2 [cmake] set manpage name in generator function 2025-03-06 15:30:30 +01:00
Michael Tokarev
19f129654e spelling: dont 2025-03-06 13:24:29 +03:00
Armin Novak
458837282e [cmake] Enable CMAKE_EXPORT_COMPILE_COMMANDS by default
if not set from environment or commandline default to enable the compile
commands generation
2025-02-26 13:42:10 +01:00
akallabeth
9f60bb40a2 [cmake,android] enable LTO if CMake >= 3.20.0 2025-02-22 15:21:59 +01:00
akallabeth
358c36486f [cmake] fix missing include 2025-02-18 20:00:33 +01:00
akallabeth
46bcc2bea3 [cmake] fix CheckAndSetFlag
Actually add the flags provided and not discard them.
2025-02-14 11:35:08 +01:00
akallabeth
6ddc268eda [cmake] drop -Wno-used-but-marked-unused
__attribute__((unused)) does emit that warning if a variable is used.
The C23/C++17 version [[maybe_unused]] does not, so drop the warning to
have consistency
2025-02-13 13:31:44 +01:00
akallabeth
a24ffe957c [cmake] make C and C++ standards configurable
use cache variables to allow overriding them from command line
2025-02-13 13:30:06 +01:00
akallabeth
0ae7c4b52d [cmake] refactor configuration
* Split common stuff to reusable files
* Disable INTERPROCEDURAL_OPTIMIZATION for SDL2/3 resource targets
2025-02-11 11:33:34 +01:00
akallabeth
046413a8c3 [cmake] fix formatting 2025-01-31 12:29:37 +01:00
akallabeth
65feb9ecd1 [cmake,tests] add BUILD_TESTING_NO_H264
allow disabling H264 unit tests for package builds. Some distributions
do not ship full implementations for the package builders
2025-01-30 12:32:59 +01:00
oleg0421
7b4a903f66 MS-RDPECAM: VAAPI h264 encoding 2025-01-14 04:32:12 -08:00
akallabeth
91ecebaa7f [cmake] revert 824ace49ac
cmake configuration file locations are no different on linux and FreeBSD
2025-01-13 14:40:16 +01:00
akallabeth
61c049b2e6 [primitives,benchmark] add benchmark tool for primitives 2025-01-10 10:17:13 +01:00
akallabeth
af41563d6b [cmake] fix regeneration of config files after clean 2024-12-16 20:24:57 +01:00
akallabeth
9f02fb017f [cmake] case insensitive simd check 2024-12-13 23:25:27 +01:00
akallabeth
c48a89b1e3 [cmake] add script to dump variables 2024-12-10 15:09:44 +01:00
akallabeth
e16085762d [cmake,configure_file] fix change checks
* Create temporary configuration files in a different build directory
* Copy the currently required configuration file only if it is different
  from the currently set one
* Use copy_if_different for build target configuration update
2024-12-10 15:03:50 +01:00
akallabeth
81e06db035 [cmake,compiler] fix clang detection
clang is branded with various names, regex match them all
2024-12-09 07:31:34 +01:00
akallabeth
180a9d7d72 [cmake,flags] print all configuration flags
Since we do not know wich configuration will be build with
multiconfiguration generators print out all C_FLAGS_XXX and
CXX_FLAGS_XXX variables
2024-12-05 09:36:26 +01:00
akallabeth
ba8fd2ada5 [cmake] force configuration options
limit multiconfiguration options to supported types
2024-12-05 09:36:23 +01:00
akallabeth
b4976163cd [CMake,simd] unify WITH_SSE2, WITH_AVX2, WITH_NEON
* Add new CMake option WITH_SIMD to enable best available instruction
  type
* Unify simd related defines in single header
2024-12-03 11:54:36 +01:00
akallabeth
faae38120c [cmake,format] reformat all cmake files 2024-11-27 20:41:48 +01:00
akallabeth
baebc02881 [cmake,compiler] check for GCC/clang greater equal 10
for -fdebug-prefix-map et al check for compilers supporting it.
2024-11-21 15:05:18 +01:00
stephanebill
4f2afa8c47 spell check with codespell 2024-11-20 16:53:40 -05:00
akallabeth
6f3e9d3dfc Merge pull request #10850 from akallabeth/pragma-warn
Pragma warn
2024-11-14 15:01:07 +01:00
akallabeth
af7849b579 [cmake] use relative paths for debug symbols
When not building a Debug configuration use relative paths for __FILE__
et al in the debug symbol entries
2024-11-14 13:45:05 +01:00
akallabeth
8883ccc503 [cmake] remove GCC -Wunknown-pragmas workaround
The offending pragma definitions are now only defined for coverity
builds
2024-11-14 13:26:21 +01:00
akallabeth
16657adf60 [cmake] workaround for older GCC
To fix the missing pragma -Wunknown-pragmas support for older GCC
disable this warning altogether if such a compiler is detected
2024-11-13 20:21:33 +01:00
akallabeth
bc70bbd30e [cmake] unify -fno-omit-frame-pointer 2024-11-08 09:01:25 +01:00
akallabeth
c43242fdde [cmake,buildflags] replace CMAKE_SOURCE_DIR and CMAKE_BUILD_DIR
replace source and build directories with palceholders
2024-11-07 20:10:57 +01:00
akallabeth
ebcf4c44a9 [cmake,gcc,clang] use -fmacro-prefix-map and -ffile-prefix-map
Instead of some bash path substitution only working with Makefiles use
the compiler options to map source and build directories to some
defaults
2024-11-07 16:52:01 +01:00
Martin Fleisz
9a21b81422 Merge pull request #10465 from akallabeth/desktop-files
[client,common] add WITH_INSTALL_CLIENT_DESKTOP_FILES
2024-10-25 12:33:27 +02:00
akallabeth
c377b0ce86 [client,common] add WITH_INSTALL_CLIENT_DESKTOP_FILES
This new CMake option allows installing .desktop files and application
icons if turned on.
2024-10-25 12:11:54 +02:00
akallabeth
a27d9508e2 [cmake] unify CFLAGS to string
* move to common CMake function
* escape CFLAGS
2024-10-25 11:40:43 +02:00
akallabeth
a3aa01214c [resource root] unify locations
unify resource locations in case WITH_BINARY_VERSIONING is set.
2024-10-25 11:40:40 +02:00
akallabeth
1675d926d2 Merge pull request #10776 from akallabeth/packaging-tests
[cmake] split tests
2024-10-24 11:26:17 +02:00