title: How to group multiple library targets into one in CMake
body: <p>I am trying to group multiple targets into a single one so the downstream user only need to link to that single one. The downstream user won't need to look up all the targets and all functionality from the upstream library will be available by linking to that single one. Please see below CMakeLists of my failed attempt.</p>
  
  <pre><code>cmake_minimum_required(VERSION 3.11)
  project(modules)
  
  # 10 libraries with actually functionality
  add_subdirectory(mylib1)
  add_subdirectory(mylib2)
  ...
  add_subdirectory(mylib10)
  
  # failed attempt to create a single library that links to the above 10
  add_library(myliball)
  
  target_link_libraries(myliball mylib1 mylib2 ... mylib10)
  
  install(TARGETS myliball
          EXPORT ${CMAKE_PROJECT_NAME}Targets
          ARCHIVE DESTINATION lib
          LIBRARY DESTINATION lib
          RUNTIME DESTINATION bin)
  
  export(TARGETS myliball
        APPEND FILE ${CMAKE_BINARY_DIR}/${CMAKE_PROJECT_NAME}Targets.cmake)
  </code></pre>
  
  <p>When I run cmake it shows this error </p>
  
  <pre><code>No SOURCES given to target: myliball
  </code></pre>
  
  <p>I can probably create an empty class for myliball to workaround this problem but that seems to be very messy. Is there a better way to do this?</p>