I am writing some definition in parent CMakeLists.txt I want those definition got inherited in sub directory of the project. So If I have project like
root
|- CMakeLists.txt
|- A
| |- CMakeLists.txt
|- B
|- CMakeLists.txt
the definition I had written in root CMakeLists.txt should go to child.
How to do that ?
Change the order of include made those changes. In past I was using
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 last two line to
add_definitions("-_DDEBUG")
ADD_SUBDIRECTORY(lib/src/json)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With