Skip to content

Commit

Permalink
Improve libmsh3.pc (#237)
Browse files Browse the repository at this point in the history
* libmsh3.pc: include is in ${prefix}

* CMake: Use msh3 version from lib/msh3.ver
  • Loading branch information
dg0yt authored Dec 19, 2024
1 parent e346911 commit ba95a15
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
8 changes: 7 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,14 @@

cmake_minimum_required(VERSION 3.16)

file(READ "${CMAKE_CURRENT_SOURCE_DIR}/lib/msh3.ver" msh3_ver)
if(NOT msh3_ver MATCHES ".*#define VER_MAJOR ([0-9]+).*#define VER_MINOR ([0-9]+).*#define VER_PATCH ([0-9]+).*")
message(FATAL_ERROR "Cannot parse version from lib/msh3.ver")
endif()
set(msh3_ver "${CMAKE_MATCH_1}.${CMAKE_MATCH_2}.${CMAKE_MATCH_3}")

message(STATUS "msh3: Configuration start...")
project(msh3)
project(msh3 VERSION "${msh3_ver}")

option(MSH3_TOOL "Build tool" OFF)
option(MSH3_TEST "Build tests" OFF)
Expand Down
4 changes: 2 additions & 2 deletions lib/libmsh3.pc.in
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
prefix=@prefix@
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${exec_prefix}/include
includedir=${prefix}/include

Name: libmsh3
Description: Minimal HTTP/3 client on top of MsQuic
Version: 0.1.0
Version: @PROJECT_VERSION@
Libs: -L${libdir} -lmsh3
Cflags: -I${includedir}

0 comments on commit ba95a15

Please sign in to comment.