Adding header-only dependencies with CMake
问题 I have a simple project which requires three header-only libraries in order to compile: websocketpp, spdlog and nlohmann/json. The project structure looks like this: └── src ├── app │ ├── CMakeLists.txt │ ├── src │ └── test ├── CMakeLists.txt ├── core │ ├── CMakeLists.txt │ ├── include │ ├── src │ └── test └── vendor ├── install.cmake ├── nlohmann_json ├── spdlog └── websocketpp The root CMakeLists.txt is as follows: cmake_minimum_required(VERSION 3.6.1 FATAL_ERROR) .. # External 3rd party