Skip to content

Commit

Permalink
Install pkg-config .pc file also on Windows/MSVC (#96)
Browse files Browse the repository at this point in the history
Signed-off-by: Silvio <silvio@traversaro.it>
  • Loading branch information
traversaro committed Feb 6, 2023
1 parent 0828d84 commit cc9fb67
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -107,14 +107,12 @@ install(FILES
"${CMAKE_BINARY_DIR}/${cmake_conf_version_file}"
DESTINATION ${CMAKE_CONFIG_INSTALL_DIR} COMPONENT cmake)

if (NOT MSVC)
set(PKG_DESC "Console Bridge")
set(PKG_CB_LIBS "-l${PROJECT_NAME}")
set(pkg_conf_file "console_bridge.pc")
configure_file("${pkg_conf_file}.in" "${CMAKE_BINARY_DIR}/${pkg_conf_file}" @ONLY)
install(FILES "${CMAKE_BINARY_DIR}/${pkg_conf_file}"
DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig/ COMPONENT pkgconfig)
endif()
set(PKG_DESC "Console Bridge")
set(PKG_CB_LIBS "-l${PROJECT_NAME}")
set(pkg_conf_file "console_bridge.pc")
configure_file("${pkg_conf_file}.in" "${CMAKE_BINARY_DIR}/${pkg_conf_file}" @ONLY)
install(FILES "${CMAKE_BINARY_DIR}/${pkg_conf_file}"
DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig/ COMPONENT pkgconfig)

SET_DIRECTORY_PROPERTIES(PROPERTIES
ADDITIONAL_MAKE_CLEAN_FILES ${CMAKE_BINARY_DIR}/console_bridge-config.cmake
Expand Down

0 comments on commit cc9fb67

Please sign in to comment.