mirror of https://github.com/google/benchmark.git
Add -lkstat to the .pc for Solaris (#1801)
* 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 ``` * Use BENCHMARK_PRIVATE_LINK_LIBRARIES
This commit is contained in:
parent
c2146397ac
commit
71f4218c1a
|
@ -8,5 +8,5 @@ Description: Google microbenchmark framework
|
|||
Version: @VERSION@
|
||||
|
||||
Libs: -L${libdir} -lbenchmark
|
||||
Libs.private: -lpthread
|
||||
Libs.private: -lpthread @BENCHMARK_PRIVATE_LINK_LIBRARIES@
|
||||
Cflags: -I${includedir}
|
||||
|
|
|
@ -64,6 +64,7 @@ endif()
|
|||
# We need extra libraries on Solaris
|
||||
if(${CMAKE_SYSTEM_NAME} MATCHES "SunOS")
|
||||
target_link_libraries(benchmark PRIVATE kstat)
|
||||
set(BENCHMARK_PRIVATE_LINK_LIBRARIES -lkstat)
|
||||
endif()
|
||||
|
||||
if (NOT BUILD_SHARED_LIBS)
|
||||
|
|
Loading…
Reference in New Issue