Skip to content

Instantly share code, notes, and snippets.

View rotoglup's full-sized avatar

Nicolas Lelong rotoglup

View GitHub Profile
@rotoglup
rotoglup / minimal-metal-app.mm
Last active May 20, 2021 08:10
Minimal OSX Metal Application, single file
#include <Cocoa/Cocoa.h>
#import <Metal/Metal.h>
#import <MetalKit/MetalKit.h>
#import <simd/simd.h>
// BUG: on OSX 10.15.6, the App menu is not clickable at the first activation, but becomes so after switching to another app
//----------------------------------------------------------------------------
@rotoglup
rotoglup / CMake usage.md
Last active December 20, 2022 12:02
Some notes about CMake constructs I had to use here and there

IMPORTED library

add_library(NvGPUDirect::DVP SHARED IMPORTED)
target_include_directories(NvGPUDirect::DVP INTERFACE "${NV_GPU_DIRECT_INCLUDE_DIR}")
set_target_properties(NvGPUDirect::DVP 
  PROPERTIES
    IMPORTED_IMPLIB ${NV_GPU_DIRECT_IMPLIB}
)