If I type in console:
$ echo $COCOS_ROOT
I get the correct path because I have this variable defined in my .bashrc file. However, when I execute this code,
SET(COCOS_HOME "$ENV{COCOS_ROOT}")
if (COCOS_HOME)
message( STATUS "COCOS2D installed in" ${COCOS_HOME})
else()
message( WARNING "COCOS2D is undefined")
endif()
The environment var is not defined. If I define the ENV var in console making:
$ export COCOS_ROOT=/path/to/cocos
Then the script is correctly set with cocos2D path.
My question is: where do I need to define the env vars to be found by cmake?
Thanks