mirror of
https://github.com/zeromq/libzmq.git
synced 2025-01-14 01:37:56 +08:00
fix libzmq.pc generation under cmake
The ${libdir} was getting replaced/removed by configure_file() making pkg-config give bad flags: -L -lzmq My fix was to add @ONLY to configure_file() so ${} style pkg-config substitutions are left alone. In addition, I put the other typical ${} substitutions back into the libzmq.pc, since its now safe.
This commit is contained in:
parent
6150812ff1
commit
b1471da5ac
@ -428,7 +428,7 @@ endforeach()
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/builds/cmake/platform.hpp.in ${CMAKE_CURRENT_BINARY_DIR}/platform.hpp)
|
||||
list(APPEND sources ${CMAKE_CURRENT_BINARY_DIR}/platform.hpp)
|
||||
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/src/libzmq.pc.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/libzmq.pc)
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/src/libzmq.pc.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/libzmq.pc @ONLY)
|
||||
set(zmq-pkgconfig ${CMAKE_CURRENT_BINARY_DIR}/libzmq.pc)
|
||||
|
||||
if(NOT ZMQ_BUILD_FRAMEWORK)
|
||||
|
@ -1,10 +1,10 @@
|
||||
prefix=@CMAKE_INSTALL_PREFIX@
|
||||
exec_prefix=@CMAKE_INSTALL_PREFIX@
|
||||
libdir=@CMAKE_INSTALL_PREFIX@/lib
|
||||
includedir=@CMAKE_INSTALL_PREFIX@/include
|
||||
exec_prefix=${prefix}
|
||||
libdir=${prefix}/lib
|
||||
includedir=${prefix}/include
|
||||
|
||||
Name: libzmq
|
||||
Description: 0MQ c++ library
|
||||
Version: @ZMQ_VERSION_MAJOR@.@ZMQ_VERSION_MINOR@.@ZMQ_VERSION_PATCH@
|
||||
Libs: -L${libdir} -lzmq
|
||||
Cflags: -I@CMAKE_INSTALL_PREFIX@/include
|
||||
Cflags: -I${includedir}
|
||||
|
Loading…
x
Reference in New Issue
Block a user