1
0
mirror of https://github.com/google/benchmark.git synced 2025-04-13 13:01:54 +08:00

Add -lkstat to the .pc for Solaris

This fixes linking for projects that rely on pkg-config to generate the
link line on Solaris.

Test plan: Built the project locally on Solaris and verified -kstat
appears in the .pc file

```
$ cat lib/pkgconfig/benchmark.pc  | grep Libs.private
Libs.private: -lpthread -lkstat
```
This commit is contained in:
Chris Cotter 2024-06-10 11:17:39 -04:00
parent 2fa4b26e58
commit 9329a42d52
2 changed files with 2 additions and 1 deletions

View File

@ -8,5 +8,5 @@ Description: Google microbenchmark framework
Version: @VERSION@
Libs: -L${libdir} -lbenchmark
Libs.private: -lpthread
Libs.private: -lpthread @pkg_config_private_libs@
Cflags: -I${includedir}

View File

@ -64,6 +64,7 @@ endif()
# We need extra libraries on Solaris
if(${CMAKE_SYSTEM_NAME} MATCHES "SunOS")
target_link_libraries(benchmark PRIVATE kstat)
set(pkg_config_private_libs -lkstat)
endif()
if (NOT BUILD_SHARED_LIBS)