Skip to content

Commit

Permalink
do not ovewrite zenohcConfig.cmake and and .pc with debug lib names
Browse files Browse the repository at this point in the history
  • Loading branch information
DenisBiryukov91 committed Aug 29, 2024
1 parent da31ce2 commit aa62658
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions install/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -43,28 +43,36 @@ function(install_zenohc_lib configurations property_postfix package_name)
# Generate <Package>Config.cmake
configure_package_config_file(
"PackageConfig.cmake.in"
"${CMAKE_CURRENT_BINARY_DIR}/${package_name}Config.cmake"
"${CMAKE_CURRENT_BINARY_DIR}/${package_name}_${property_postfix}Config.cmake"
INSTALL_DESTINATION "${CMAKE_INSTALL_CMAKEDIR}")

# Generate <Package>Version.cmake
write_basic_package_version_file(
"${CMAKE_CURRENT_BINARY_DIR}/${package_name}ConfigVersion.cmake"
"${CMAKE_CURRENT_BINARY_DIR}/${package_name}_${property_postfix}ConfigVersion.cmake"
VERSION ${PROJECT_VERSION}
COMPATIBILITY SameMajorVersion)

install(
FILES "${CMAKE_CURRENT_BINARY_DIR}/${package_name}Config.cmake"
"${CMAKE_CURRENT_BINARY_DIR}/${package_name}ConfigVersion.cmake"
FILES "${CMAKE_CURRENT_BINARY_DIR}/${package_name}_${property_postfix}Config.cmake"
DESTINATION "${CMAKE_INSTALL_CMAKEDIR}"
CONFIGURATIONS ${configurations}
RENAME ${package_name}Config.cmake
COMPONENT dev)

install(
FILES "${CMAKE_CURRENT_BINARY_DIR}/${package_name}_${property_postfix}ConfigVersion.cmake"
DESTINATION "${CMAKE_INSTALL_CMAKEDIR}"
CONFIGURATIONS ${configurations}
RENAME ${package_name}ConfigVersion.cmake
COMPONENT dev)

if(APPLE OR UNIX)
get_filename_component(LIBNAME ${DYLIB} NAME_WE)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/zenohc.pc.in ${CMAKE_CURRENT_BINARY_DIR}/${package_name}.pc @ONLY)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${package_name}.pc
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/zenohc.pc.in ${CMAKE_CURRENT_BINARY_DIR}/${package_name}_${property_postfix}.pc @ONLY)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${package_name}_${property_postfix}.pc
DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig"
CONFIGURATIONS ${configurations}
RENAME ${package_name}.pc
OPTIONAL)
endif()
endfunction()
Expand Down

0 comments on commit aa62658

Please sign in to comment.