This commit is contained in:
Riley 2025-05-08 18:02:49 -05:00
parent ffe1bd554b
commit 075867d7a4
5 changed files with 32 additions and 2 deletions

23
README.md Normal file
View file

@ -0,0 +1,23 @@
# Conan-C
This is a Conan / Meson template. It's based on some online tutorials.
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,6 +4,8 @@ CC = meson.get_compiler('c')
zlib = dependency('zlib', version : '1.2.11', static: true, required: true)
target_name = 'main'
files = files('src/main.c')
executable('compressor', files, dependencies: zlib)
executable(target_name, files, dependencies: [zlib], include_directories: include_directories('src/include'))

0
src/include/.gitkeep Normal file
View file