cmake
CMake 链接静态库 示例
现有库lib-a, lib-b可执行文件final链接情况lib-b 静态链接 lib-a, final静态链接lib-b 和 lib-a, 且final同样静态编译lib-aCMakeLists.txtcmake_minimum_required(VERSION 3.19)
project(lib
CMake 链接 OpenSSL 静态库
示例CMakeLists.txt如下cmake_minimum_required(VERSION 3.5)
project(test CXX)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unu