realXtend/naali — pull request #489 by jonnenauha (2012-05-29 11:40:14+00:00)
Title: Adminotech cmake fixes

This branch solves the problem we have had after we transitioned to fullbuild and our "hand made" cmake preparations. The detection will break if the proper env variables are not set on *every run*. This is not what we want as we can cache them if they are set and just use cache as long as its valid.

This is especially problematic for windows developers who change CMakeLists.txt and hits build. This will trigger a plain `cmake .` inside visual studio and your link/include params will get swapped to some guessed defaults. This branch fixes this issue by utilizing the cmake built in cache.

* Fixes caching our "hand made" *_HOME, *_DIR and *_ROOT detection that replace sagase macros in multiple places after we moved to fullbuild. Now you only have to define the env variables once before running cmake. They will get cached and used from there on sequential runs. Any smart Find*.cmake shipped macro also does this, so should we if are to implement similar functionality.
* Replace `$ENV{TUNDRA_DEP_PATH}` with `${ENV_TUNDRA_DEP_PATH}` because ENV_TUNDRA_DEP_PATH is cached, so it will work if its set correctly once. $ENV{ variable is only there if the variable is set.
* Remove/combine skyx/hydrax duplicat cmake macros. Move skyx/hydrax related macros inside the plugin cmakelists.txt. IMO all non-shared/non-global deps should be handled locally by the plugin. This is already the way eg. VlcPlugin and MumblePlugin do it, we should transition to this to not bloat cmake/ConfigurePackages.cmake with non-core things.
* Fix printing correctly the used dependency paths in the end of the cmake run.

This branch has been tested to work with windows and mac. Linux is untested but most paths that I touched are same as mac, in that they still use sagase for certain things (skyx/hydrax).