odhcpd: update cmake file
authorDavid Härdeman <[email protected]>
Sun, 14 Sep 2025 22:36:56 +0000 (00:36 +0200)
committerÁlvaro Fernández Rojas <[email protected]>
Thu, 2 Oct 2025 08:41:29 +0000 (10:41 +0200)
commitc2810fe8b681238cab8a3be1a8ae0cc222514306
tree9fc71e0b26695ab357e21e37baa8a46dca7bf2bb
parent8c2c0655eb9faff0e68dc585607cb76bfdf4489a
odhcpd: update cmake file

Now that the minimum cmake version has been bumped to 3.13, the cmake file can
be modernized a bit. Although it might look like a lot of changes, most of them
are quite straightforward.

Every library is located in a consistent manner (allowing command-line
overrides of library locations, useful for local development, and also makes it
trivial to do static linking, if desired).

The compiler flags have been broken up to have one per line (making it easy in
the future to add/remove flags, which would create a simple one-line diff).

Although it might look like this bumps the C standard level, cmake is actually
smart enough to pick an earlier version if C11 isn't supported by the compiler
(quite unlikely on any versions of gcc currently in use in OpenWrt and even on
old distros).

Signed-off-by: David Härdeman <[email protected]>
Link: https://github.com/openwrt/odhcpd/pull/258
CMakeLists.txt