imageworks/OpenColorIO — pull request #300 by frederikaalund (2012-12-13 14:01:29+00:00)
Title: Visual Studio 2010 compile fix

I changed the CMake files to fix the compilation issues I (and apparently others) had while trying to compile OpenColorIO on Windows 7 using Visual Studio 2010. This works for the STATIC version of OpenColorIO. I have not tried the SHARED version. Also, I only built the core OpenColorIO library and not any of the tools.

Notable changes:
* Both tinyxml and yaml-cpp can now be found externally.
* Removed the pkgconfig dependency for yaml-cpp by adding a *very* raw FindYAML_CPP.cmake package. The latter has a lot of room for improvement and is merely intended as a quick-fix.
* The static build of OpenColorIO is no longer linked with external libraries. Static libraries do not incorporate the binary objects of its dependencies. It is up to the runtime binary that links against OpenColorIO to link the entire hierarchy of dependencies. In other words, the target_link_libraries has no effect on archive targets (ceated with add_library(TARGET_NAME STATIC ...)). Sources:
* http://stackoverflow.com/questions/1242820/can-a-c-static-library-link-to-shared-library
* http://stackoverflow.com/questions/2157629/linking-static-libraries-to-other-static-libraries
* Added the definition OCIO_BUILD_STATIC to static builds so the code doesn't use __declspec(dllimport) when building statically. This caused a lot of linker errors.