Skip to content

Commit

Permalink
build: fix installed cmake config (VowpalWabbit#3859)
Browse files Browse the repository at this point in the history
* build: fix installed cmake config

* remove broken pkg config definition
  • Loading branch information
jackgerrits authored Apr 12, 2022
1 parent c45406f commit 920a0f4
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 17 deletions.
4 changes: 1 addition & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -358,16 +358,14 @@ endif()

# Handle installation of targets, version, config and pkgconfig
if(VW_INSTALL)
configure_file(libvw.pc.in libvw.pc @ONLY)

# only do this if the file exists. Some packages dont have this file and its only needed in a very specific use case
if(EXISTS nuget/vowpalwabbit.nuspec.in)
configure_file(nuget/vowpalwabbit.nuspec.in nuget/vowpalwabbit.nuspec @ONLY)
endif()

configure_file(libvw_c_wrapper.pc.in libvw_c_wrapper.pc @ONLY)
install(
FILES ${CMAKE_CURRENT_BINARY_DIR}/libvw.pc ${CMAKE_CURRENT_BINARY_DIR}/libvw_c_wrapper.pc
FILES ${CMAKE_CURRENT_BINARY_DIR}/libvw_c_wrapper.pc
DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)

install(EXPORT VowpalWabbitConfig
Expand Down
7 changes: 6 additions & 1 deletion cmake/VowpalWabbitConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,10 @@
include(CMakeFindDependencyMacro)
find_dependency(ZLIB REQUIRED)
find_dependency(Threads REQUIRED)
find_dependency(spdlog REQUIRED)
find_dependency(fmt REQUIRED)
find_dependency(RapidJSON REQUIRED)

include("${CMAKE_CURRENT_LIST_DIR}/VowpalWabbitTargets.cmake")
include("${CMAKE_CURRENT_LIST_DIR}/VowpalWabbitTargets.cmake")

check_required_components(VowpalWabbit)
12 changes: 0 additions & 12 deletions libvw.pc.in

This file was deleted.

1 change: 0 additions & 1 deletion libvw_c_wrapper.pc.in
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,5 @@ Name: Vowpal Wabbit (C wrapper)
Description: @VW_PROJECT_DESCRIPTION@ (C wrapper)
URL: @VW_PROJECT_URL@
Version: @PACKAGE_VERSION@
Requires: libvw
Libs: -L${libdir} -lvw_c_wrapper
Cflags: -I${includedir}

0 comments on commit 920a0f4

Please sign in to comment.