Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.28)
project(nbytes)
project(nbytes VERSION 0.1.2)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Non blocking: can we get this version number to be automatically updated upon releases ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We would need some automation à la Release Please that opens a PR every time a commit lands on main and offers to bump the version and cut a release. That feels out of scope of this PR.


set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED True)
Expand Down Expand Up @@ -40,3 +40,16 @@ install(
ARCHIVE COMPONENT nbytes_development
INCLUDES DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}"
)

# Configure and install pkg-config file
configure_file(
"${PROJECT_SOURCE_DIR}/nbytes.pc.in"
"${PROJECT_BINARY_DIR}/nbytes.pc"
@ONLY
)

install(
FILES "${PROJECT_BINARY_DIR}/nbytes.pc"
DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig"
COMPONENT nbytes_development
)
10 changes: 10 additions & 0 deletions nbytes.pc.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
prefix=@CMAKE_INSTALL_PREFIX@
exec_prefix=${prefix}
libdir=@CMAKE_INSTALL_FULL_LIBDIR@
includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@

Name: nbytes
Description: Library of byte handling functions extracted from Node.js core
Version: @PROJECT_VERSION@
Libs: -L${libdir} -lnbytes
Cflags: -I${includedir}