linuxptp icon indicating copy to clipboard operation
linuxptp copied to clipboard

Add CMake support for linuxptp project

Open shkwon98 opened this issue 6 months ago • 0 comments

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.txt file to support building the project with CMake, including minimum version requirements and project metadata.

Configurable security and feature options:

  • Introduced a USE_OPENSSL option 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 macro add_ptp_executable for 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

shkwon98 avatar Sep 04 '25 08:09 shkwon98