# cmake_exercise **Repository Path**: guojing_wu/cmake_exercise ## Basic Information - **Project Name**: cmake_exercise - **Description**: CMake学习案例,以应用为主。 - **Primary Language**: C++ - **License**: MIT - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2024-09-19 - **Last Updated**: 2024-10-14 ## Categories & Tags **Categories**: Uncategorized **Tags**: cmake ## README # CMakeExercise ## Example01 本例内容如下: 1. operation目录下生成静态库 2. operation2目录下生成动态库 3. demo中引用生成的静态库和动态库 4. 将静态库和动态库进行安装生成SDK ```shell mkdir build cd build cmake .. # install cmake --build . --target install --config Release ``` ## Example02 本案例内容:引入第三方库(以[fmt-11.0.2](https://github.com/fmtlib/fmt)源码为例子) 1. 在项目中直接使用fmt源码 2. 安装fmt后使用find_package来使用fmt ## Example03 测试CMAKE_SOURCE_DIR和PROJECT_SOURCE_DIR ## Example04