Commit b1471da5 authored by Josh Blum's avatar Josh Blum

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.
parent 6150812f
...@@ -428,7 +428,7 @@ endforeach() ...@@ -428,7 +428,7 @@ endforeach()
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/builds/cmake/platform.hpp.in ${CMAKE_CURRENT_BINARY_DIR}/platform.hpp) 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) 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) set(zmq-pkgconfig ${CMAKE_CURRENT_BINARY_DIR}/libzmq.pc)
if(NOT ZMQ_BUILD_FRAMEWORK) if(NOT ZMQ_BUILD_FRAMEWORK)
......
prefix=@CMAKE_INSTALL_PREFIX@ prefix=@CMAKE_INSTALL_PREFIX@
exec_prefix=@CMAKE_INSTALL_PREFIX@ exec_prefix=${prefix}
libdir=@CMAKE_INSTALL_PREFIX@/lib libdir=${prefix}/lib
includedir=@CMAKE_INSTALL_PREFIX@/include includedir=${prefix}/include
Name: libzmq Name: libzmq
Description: 0MQ c++ library Description: 0MQ c++ library
Version: @ZMQ_VERSION_MAJOR@.@ZMQ_VERSION_MINOR@.@ZMQ_VERSION_PATCH@ Version: @ZMQ_VERSION_MAJOR@.@ZMQ_VERSION_MINOR@.@ZMQ_VERSION_PATCH@
Libs: -L${libdir} -lzmq Libs: -L${libdir} -lzmq
Cflags: -I@CMAKE_INSTALL_PREFIX@/include Cflags: -I${includedir}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment