Change the order in which the changes are included. I used in the past
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.0) SET(ENV{OSDEP} "linux") SET(ENV{BIT} 64) SET(ENV{XUL} 5000) ADD_SUBDIRECTORY(lib/src/json) add_definitions("-_DDEBUG")
which I changed the last two lines to
add_definitions("-_DDEBUG") ADD_SUBDIRECTORY(lib/src/json)
source share