https://github.com/avinal/make-cmake
A sample Make CMake project structure and comparision
https://github.com/avinal/make-cmake
Last synced: 25 days ago
JSON representation
A sample Make CMake project structure and comparision
- Host: GitHub
- URL: https://github.com/avinal/make-cmake
- Owner: avinal
- License: mit
- Created: 2021-04-07T10:44:58.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2021-06-05T06:44:09.000Z (about 5 years ago)
- Last Synced: 2026-05-05T08:42:52.505Z (2 months ago)
- Language: C++
- Homepage:
- Size: 8.79 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## How to manually convert `Makefiles` to `CMakeLists.txt`
## Install packages (Debian/Ubuntu)
```bash
sudo apt update
sudo apt install make cmake
```
## Makefile
### Source Tree
```bash
hello-make/
├── include
│ └── hello.h
├── lib
│ ├── hello.cc
│ └── Makefile
├── Makefile
└── src
├── main.cc
└── Makefile
```
### How to run Make?
```bash
cd hello-make
make
./src/hellomake
```
## CmakeLists.txt
### Source Tree
```bash
hello-cmake/
├── CMakeLists.txt
├── include
│ └── hello.h
├── lib
│ ├── CMakeLists.txt
│ └── hello.cc
└── src
├── CMakeLists.txt
└── main.cc
```
### How to run CMake?
```bash
cd hello-cmake
mkdir build && cd build
cmake ..
make
./src/hellocmake
```
## References
[Convert Makefile to CMakeLists.txt manually](https://www.hiroom2.com/2016/09/07/convert-makefile-to-cmakelists-txt-manually/)