Skip to content

Commit bd69b16

Browse files
committed
build: set correct first version number
Set initial version as 0.1.0 as suggested by semver.org. Use -devel as tweak to distinguish the development versions from the release versions.
1 parent 0396783 commit bd69b16

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

CMakeLists.txt

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,15 @@
44
cmake_minimum_required(VERSION 3.20)
55

66
project(bpfilter
7-
VERSION 0.0.1
7+
VERSION 0.1.0
88
DESCRIPTION "BPF-based packet filtering framework"
99
LANGUAGES C
1010
)
1111

12+
set(PROJECT_VERSION_TWEAK "-devel")
13+
14+
message(NOTICE "bpfilter version ${CMAKE_PROJECT_VERSION}${PROJECT_VERSION_TWEAK}")
15+
1216
include(GNUInstallDirs)
1317

1418
option(NO_DOCS "Disable documentation generation" 0)
@@ -52,6 +56,12 @@ target_link_options(bf_global_flags
5256
$<$<CONFIG:debug>:-fsanitize=address -fsanitize=undefined>
5357
)
5458

59+
configure_file(
60+
${CMAKE_SOURCE_DIR}/src/version.h.in
61+
${CMAKE_BINARY_DIR}/include/version.h
62+
@ONLY
63+
)
64+
5565
add_subdirectory(src/core)
5666
add_subdirectory(src/bpfilter)
5767
add_subdirectory(src/libbpfilter)

src/libbpfilter/bpfilter.pc.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ libdir=${prefix}/@CMAKE_INSTALL_LIBDIR@
55
Name: bpfilter
66
Description: BPF-based packet filtering framework
77
URL: https://github.com/facebook/bpfilter
8-
Version: @PROJECT_VERSION@
8+
Version: @PROJECT_VERSION@@PROJECT_VERSION_TWEAK@
99
Cflags: -I${includedir}
1010
Libs: -L${libdir} -lbpfilter

0 commit comments

Comments
 (0)