This is a simple example to build a C++ dll from CMake.
.
├── 3rdparty # Folder used to store third-party libraries.
├── app # Folder contains example test code.
│ ├── c_cpp # C/C++ test code
│ └── CMakeLists.txt # The CMake file adds the c_cpp folder to the solution.
├── include # Folder contains example headers.
├── src # Folder contains example source code.
├── CMakeLists.txt
├── README.md
└── templateConfig.cmake
To generate the solution, run the following command in the terminal:
cmake CMakeLists.txt
To build the solution:
cmake --build build --config Release
or
cmake --build build --config Debug
If the build is successful, you can test the example:
.\bin\Release\Test_app.exe
or
.\bin\Debug\Test_app.exe