How to group multiple library targets into one in CMake
问题 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. cmake_minimum_required(VERSION 3.11) project(modules) # 10 libraries with actually functionality add_subdirectory(mylib1) add_subdirectory(mylib2) ... add_subdirectory(mylib10