https://github.com/drawcodeboy/cmake-tutorial
https://github.com/drawcodeboy/cmake-tutorial
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/drawcodeboy/cmake-tutorial
- Owner: drawcodeboy
- Created: 2025-01-13T00:49:29.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-01-22T09:03:35.000Z (about 1 year ago)
- Last Synced: 2025-01-22T09:32:42.121Z (about 1 year ago)
- Language: CMake
- Size: 7.81 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# CMake Tutorial
```
What I Learned
<...> : SHOULD args
[...] : OPTION args
# How to Use
cmake -S ./ -B ./build -G "Unix Makefiles"
cmake --build
# Root components
cmake_minimum_required(VERSION 3.22)
project(Calculator VERSION 1.0.0 LANGUAGES CXX)
add_executable( ... ...)
# sub directory
add_subdirectory() # in root file
target_link_libraries( ... ... ...) # in root file, : library target name
add_library( [] [EXCLUDE_FROM_ALL] ...) # in library file, =
target_include_directories( [SYSTEM] [AFTER|BEFORE]
[items1...]
[ [items2...] ...]) # in library file
```
# References
* CMake ?��?��리얼