and if you do the thing... it just works!
This commit is contained in:
parent
3025671f4f
commit
5c3ef73c8c
4 changed files with 26 additions and 23 deletions
|
|
@ -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
13
README.md
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
# Wayland Application
|
||||
|
||||
### Setup
|
||||
|
||||
```shell
|
||||
mason setup build
|
||||
```
|
||||
|
||||
### Build
|
||||
|
||||
```shell
|
||||
mason compile
|
||||
```
|
||||
9
meson.build
Normal file
9
meson.build
Normal 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)
|
||||
11
shell.nix
11
shell.nix
|
|
@ -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 = '''';
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue