and if you do the thing... it just works!

This commit is contained in:
Benjamin Palko 2024-08-07 23:55:26 -04:00
parent 3025671f4f
commit 5c3ef73c8c
4 changed files with 26 additions and 23 deletions

View file

@ -1,16 +0,0 @@
cmake_minimum_required(VERSION 3.29.6)
set(CMAKE_CXX_COMPILER clang++)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
project(HelloWorld CXX)
find_package(fmt CONFIG REQUIRED)
find_package(glfw3 CONFIG REQUIRED)
find_package(OpenGL REQUIRED)
add_executable(main src/main.cpp)
target_link_libraries(main PRIVATE fmt::fmt glfw OpenGL)

13
README.md Normal file
View file

@ -0,0 +1,13 @@
# Wayland Application
### Setup
```shell
mason setup build
```
### Build
```shell
mason compile
```

9
meson.build Normal file
View file

@ -0,0 +1,9 @@
project('test', 'cpp')
deps = []
deps += dependency('fmt')
deps += dependency('glfw3')
deps += dependency('gl')
executable('main', 'src/main.cpp', dependencies : deps)

View file

@ -6,23 +6,20 @@ pkgs.llvmPackages.stdenv.mkDerivation {
name = "Development";
buildInputs = with pkgs.buildPackages; [
fmt
fmt.dev
glfw-wayland
libGL
libGL.dev
];
# nativeBuildInputs is usually what you want -- tools you need to run
nativeBuildInputs = with pkgs.buildPackages; [
meson
ninja
gnumake
cmake
vcpkg
clang
clang-tools
pkg-config
];
shellHook = ''
export VCPKG_ROOT="${pkgs.vcpkg.outPath}/share/vcpkg";
# export CC="${pkgs.clang.outPath}/bin/clang";
# export CXX="${pkgs.clang.outPath}/bin/clang++";
'';
shellHook = '''';
}