Commit bb1db868 authored by Harris Hancock's avatar Harris Hancock

cmake: Install new .pc files

Includes a small refactor to make adding filenames simpler.
parent 00db306c
...@@ -120,23 +120,26 @@ if(NOT MSVC) # Don't install pkg-config files when building with MSVC ...@@ -120,23 +120,26 @@ if(NOT MSVC) # Don't install pkg-config files when building with MSVC
set(PTHREAD_CFLAGS "-pthread") set(PTHREAD_CFLAGS "-pthread")
set(STDLIB_FLAG) # TODO: Unsupported set(STDLIB_FLAG) # TODO: Unsupported
configure_file(kj.pc.in "${CMAKE_CURRENT_BINARY_DIR}/kj.pc" @ONLY) set(CAPNP_PKG_CONFIG_FILES
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/kj.pc" DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig") pkgconfig/kj.pc
pkgconfig/capnp.pc
configure_file(capnp.pc.in "${CMAKE_CURRENT_BINARY_DIR}/capnp.pc" @ONLY) )
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/capnp.pc" DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig")
if(NOT CAPNP_LITE) if(NOT CAPNP_LITE)
configure_file(kj-async.pc.in "${CMAKE_CURRENT_BINARY_DIR}/kj-async.pc" @ONLY) list(APPEND CAPNP_PKG_CONFIG_FILES
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/kj-async.pc" DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig") pkgconfig/kj-async.pc
pkgconfig/kj-http.pc
configure_file(capnp-rpc.pc.in "${CMAKE_CURRENT_BINARY_DIR}/capnp-rpc.pc" @ONLY) pkgconfig/kj-test.pc
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/capnp-rpc.pc" DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig") pkgconfig/capnp-rpc.pc
pkgconfig/capnp-json.pc
configure_file(capnp-json.pc.in "${CMAKE_CURRENT_BINARY_DIR}/capnp-json.pc" @ONLY) )
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/capnp-json.pc" DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig")
endif() endif()
foreach(pcfile ${CAPNP_PKG_CONFIG_FILES})
configure_file(${pcfile}.in "${CMAKE_CURRENT_BINARY_DIR}/${pcfile}" @ONLY)
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${pcfile}" DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig")
endforeach()
unset(STDLIB_FLAG) unset(STDLIB_FLAG)
unset(PTHREAD_CFLAGS) unset(PTHREAD_CFLAGS)
unset(includedir) unset(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