cmake --trace . : run trace, which shows all variables set (for debugging)

# this is how to de-obfuscate build commands i.e. see what commands are being executed
#

When working on CMakeLists.txt you often need to clean cmake cache. I add this alias to my .bash_profile : alias cmake_clean="rm -f CMakeCache.txt; rm -rf CMakeFiles/; rm -f cmake_install.cmake" (or just the commends)

add_executable(djvudump tools/djvudump.cpp) : this defines djvudump binary built from tools/djvudump.cpp . Cmake figures out from .cpp extension that this is C++ binary and will use C++ rules to compile and link the executable.