message: enet 2020-04-24 (995d934c)
  Code extracted from:
  at commit (master).
  Upstream Shortlog
  Kyle Edwards (2):
  Fix up install components
  Fix default CMAKE_BUILD_TYPE
diff: @@ -21,9 +21,22 @@ if(NOT CMAKE_RUNTIME_OUTPUT_DIRECTORY)
  ${PROJECT_BINARY_DIR}/${CMAKE_INSTALL_BINDIR})
  endif()
  +if(NOT DEFINED ENET_RUNTIME_COMPONENT)
  + set(ENET_RUNTIME_COMPONENT bin)
  +endif()
  +if(NOT DEFINED ENET_LIBRARY_COMPONENT)
  + set(ENET_LIBRARY_COMPONENT shlib)
  +endif()
  +if(NOT DEFINED ENET_ARCHIVE_COMPONENT)
  + set(ENET_ARCHIVE_COMPONENT lib)
  +endif()
  +if(NOT DEFINED ENET_HEADER_COMPONENT)
  + set(ENET_HEADER_COMPONENT dev)
  +endif()
  +
  # Default to a RelWithDebInfo build if not specified
  if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
  - set_property(CACHE CMAKE_BUILD_TYPE PROPERTY VALUE RelWithDebugInfo)
  + set_property(CACHE CMAKE_BUILD_TYPE PROPERTY VALUE RelWithDebInfo)
  endif()
  include(CMakeDependentOption)
  @@ -111,28 +124,34 @@ if(ENET_INSTALL_PKGCONFIG)
  ${CMAKE_CURRENT_BINARY_DIR}/enet.pc
  @ONLY)
  install(FILES ${CMAKE_CURRENT_BINARY_DIR}/enet.pc
  - DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig")
  + DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig"
  + COMPONENT ${ENET_HEADER_COMPONENT})
  configure_file(
  ${CMAKE_CURRENT_SOURCE_DIR}/enet-config.in
  ${CMAKE_CURRENT_BINARY_DIR}/enet-config
  @ONLY)
  install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/enet-config
  - DESTINATION "${CMAKE_INSTALL_BINDIR}")
  + DESTINATION "${CMAKE_INSTALL_BINDIR}"
  + COMPONENT ${ENET_HEADER_COMPONENT})
  endif()
  option(ENET_INSTALL_HEADERS "Install enet header files" ON)
  mark_as_advanced(ENET_INSTALL_HEADERS)
  if(ENET_INSTALL_HEADERS)
  install(DIRECTORY include/enet
  - DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}"
  + DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}" COMPONENT ${ENET_HEADER_COMPONENT}
  FILES_MATCHING PATTERN "*.h"
  )
  endif()
  +set(namelink_component_args)
  +if(NOT CMAKE_VERSION VERSION_LESS 3.12)
  + set(namelink_component_args NAMELINK_COMPONENT ${ENET_HEADER_COMPONENT})
  +endif()
  install(TARGETS enet
  EXPORT enet-targets
  - RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}"
  - LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
  - ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}"
  + RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT ${ENET_RUNTIME_COMPONENT}
  + LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT ${ENET_LIBRARY_COMPONENT} ${namelink_component_args}
  + ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT ${ENET_ARCHIVE_COMPONENT}
  )
  # Setup packaging and configs
  @@ -151,8 +170,10 @@ export(TARGETS enet NAMESPACE enet::
  install(FILES
  "${PROJECT_BINARY_DIR}/enet-config.cmake"
  "${PROJECT_BINARY_DIR}/enet-config-version.cmake"
  - DESTINATION "${CMAKE_INSTALL_CMAKEDIR}")
  + DESTINATION "${CMAKE_INSTALL_CMAKEDIR}"
  + COMPONENT ${ENET_HEADER_COMPONENT})
  # Install the export set for use with the install-tree
  install(EXPORT enet-targets NAMESPACE enet::
  - DESTINATION "${CMAKE_INSTALL_CMAKEDIR}")
  + DESTINATION "${CMAKE_INSTALL_CMAKEDIR}"
  + COMPONENT ${ENET_HEADER_COMPONENT})
  