linuxptp
linuxptp copied to clipboard
Add CMake support for linuxptp project
This pull request introduces a new CMakeLists.txt build system for the project, replacing or supplementing previous build mechanisms. The new configuration improves build flexibility, modularity, and maintainability by leveraging CMake's features and modern practices. The most important changes are grouped below.
Build system modernization:
- Added a complete
CMakeLists.txtfile to support building the project with CMake, including minimum version requirements and project metadata.
Configurable security and feature options:
- Introduced a
USE_OPENSSLoption to enable or disable OpenSSL support, and dynamically selects cryptographic backends (Nettle, GnuTLS, GnuPG, OpenSSL) and source files based on detected compiler definitions.
Improved source organization and executable definitions:
- Refactored source file lists into logical groups (
FILTERS,SERVOS,TRANSP,TS2PHC, etc.) and provided a helper macroadd_ptp_executablefor consistent executable declarations. - Defined all major executables (
ptp4l,nsm,pmc,phc2sys,hwstamp_ctl,phc_ctl,timemaster,ts2phc,tz2alt) with their respective source files and dependencies. (F8d