An open API service indexing awesome lists of open source software.

https://github.com/drawcodeboy/cmake-tutorial


https://github.com/drawcodeboy/cmake-tutorial

Last synced: 3 months ago
JSON representation

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 ?��?��리얼