Dugan Chen's Homepage

Various Things

Building SDL2 programs with CMake and PkgConfig

Here’s what I feel is currently the easiest and safest way to build SDL2 programs. First, you should never be writing Makefiles by hand. You should be generating them. And for generating Makefiles, CMake is more or less the current standard. How does CMake detect where a library and its header files are installed? Well, […]

Reading Environment Variables in Python. With Metaclasses.

I work in the animation industry. Here, the standard practice is to use environment variables to control the runtime behavior of software. It is common enough, in fact, that powerful open source projects such as Rez have been started to manage it. The idea is that before launching each application, you set the environment variables […]