Fixes #113: call add_subdirectory after ALL add_definitions

(cherry picked from commit 35cb7961084433f223e7d3b03ef8f52b36a1a690)
Detect GTK before other packages

(cherry picked from commit e354cd2038d350ca11ec2ea84e7ac7a4b558ccd8)