[waffle] [PATCH 3/4] cmake: Add the installed package files to the registry on windows

Chad Versace chad.versace at intel.com
Wed Dec 31 14:44:45 PST 2014


On 12/29/2014 03:35 AM, Jose Fonseca wrote:

> FWIW, IMO the best way of finding things with CMake on Windows is using the `-C` cmake option.
> 
> For example, this is part of my MSVC Cmake cache:
> 
> $ cat msvc32/Cache.cmake
> set (CMAKE_ASM_MASM_COMPILER "${CMAKE_CURRENT_LIST_DIR}/masm/ml.exe" CACHE FILEPATH "" FORCE)
> 
> set (GLEXT_INCLUDE_DIR "H:/noarch/glext" CACHE PATH "" FORCE)
> 
> set (GLEW_INCLUDE_DIR "${CMAKE_CURRENT_LIST_DIR}/glew/include" CACHE PATH "" FORCE)
> set (GLEW_glew_LIBRARY "${CMAKE_CURRENT_LIST_DIR}/glew/lib/glew32.lib" CACHE FILEPATH "" FORCE)
> 
> set (GLFW_INCLUDE_DIR "${CMAKE_CURRENT_LIST_DIR}/glfw/include" CACHE PATH "" FORCE)
> set (GLFW_LIBRARY "${CMAKE_CURRENT_LIST_DIR}/glfw/lib/glfw32.lib" CACHE FILEPATH "" FORCE)
> 
> set (GLUT_INCLUDE_DIR "H:/msvc32/freeglut/include" CACHE PATH "" FORCE)
> set (GLUT_glut_LIBRARY "H:/msvc32/freeglut/lib/freeglut.lib" CACHE FILEPATH "" FORCE)
> 
> set (PNG_PNG_INCLUDE_DIR "${CMAKE_CURRENT_LIST_DIR}/libpng/include" CACHE PATH "" FORCE)
> set (PNG_LIBRARY "${CMAKE_CURRENT_LIST_DIR}/libpng/lib/libpng.lib" CACHE FILEPATH "" FORCE)
> 
> set (ZLIB_INCLUDE_DIR "${CMAKE_CURRENT_LIST_DIR}/zlib/include" CACHE PATH "" FORCE)
> set (ZLIB_LIBRARY "${CMAKE_CURRENT_LIST_DIR}/zlib/lib/zlib.lib" CACHE FILEPATH "" FORCE)
> 
> [...]
> 
> 
> So all I need to do when building any Cmake project is to pass -C /path/to/Cache.cmake and it will find everything I need.  All this is in a network share so it can be used both from my Windows development machines and build slaves.
> 
> 
> Of course, this only works if the cmake project is not too smart for its own good.

Jose, I believe you've encountered many more CMakeLists in the wild than I have. If you find
any CMake magic in Waffle that you think is too clever or too nonstandard, don't hesitate
to point it out. Even if no patch or no outline of a solution accompanies your "complaint"
email, if it's simply a complaint email, that would still help.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 884 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freedesktop.org/archives/waffle/attachments/20141231/0726ee88/attachment.sig>


More information about the waffle mailing list