CMake Basics: Compiling Static and Dynamic Libraries, Customizing Library Output Paths

CMake Basics: Compiling Static and Dynamic Libraries, Customizing Library Output Paths

1. Generate a static library for third-party useIn Linux, the name of a static library is composed of: lib + library name + .a, where the library name needs to be specified, and lib and .a are generated automatically. The Windows system is similar.Project file structure:CMakeLists.txt # Set the minimum required CMake version to 3.15 … Read more