This commit is contained in:
Riley 2025-05-08 17:58:16 -05:00
parent b8f5fc0de5
commit b1a2182f14
5 changed files with 32 additions and 4 deletions

23
README.md Normal file
View file

@ -0,0 +1,23 @@
# Conan-Cpp
This is a Conan / Meson template. It's based on some online tutorials, and is a modified version of [this project](https://code.cthulhub.net/Riley/Conan-C).
I made this when I wanted to make more C / C++ projects but with a more "pythonic" build system.
# Setup
## Linux / Windows
1. Install CMake
2. Install Meson
3. Install GCC (UCRT MSYS2)
## Windows
4. Edit `~\.conan2\profiles\default` to match [docs/default](docs/default)
## Linux
4. If you run linux you can probably figure this out. It should work mostly out of the box.
## Both Again
5. Run `build.bat` or `build.sh` respectively.
6. Edit your intellisense to read the compile_commands from `${workspaceFolder}/build/meson-src/compile_commands.json`

View file

@ -2,4 +2,4 @@ conan install . --output-folder=build --build=missing
cd build
meson setup --native-file conan_meson_native.ini .. meson-src
meson compile -C meson-src
meson-src\compressor.exe
meson-src\main.exe

5
build.sh Normal file
View file

@ -0,0 +1,5 @@
conan install . --output-folder=build --build=missing
cd build
meson setup --native-file conan_meson_native.ini .. meson-src
meson compile -C meson-src
./meson-src/main

View file

@ -4,8 +4,8 @@ CC = meson.get_compiler('cpp')
zlib = dependency('zlib', version : '1.2.11', static: true, required: true)
target_name = 'compressor'
target_name = 'main'
files = files('src/main.cpp')
executable(target_name, files, dependencies: [zlib])
executable(target_name, files, dependencies: [zlib], include_directories: include_directories('src/include'))

0
src/include/.gitkeep Normal file
View file