[Piglit] [RFC PATCH 2/2] cmake: build the util libraries as shared under Windows

Jose Fonseca jfonseca at vmware.com
Sun Nov 23 03:18:32 PST 2014

On 22/11/14 22:26, Emil Velikov wrote:
> Rather than rebuilding every single test as we change the util
> libraries and increase the size of each test by ~9MiB (as noticed
> in the mingw-w64 build), just revert to shared piglitutil* libs.

This is great. I actually tried to do this, a year ago or so, but I gave 
up half way through trying to overcome "missing symbols". I don't know 
if changes in piglit made this easier or if you found a better solution, 
but I'm happy you worked it out.

>   - Check if the DLLs are installed and where.
>   - If there is one or more executables linking against them, but located
> in a different folder, see the next todo note.
>   - Modify the python scripts to set PATH to the location of the DLLs.
> Alternatively apply any of the other solutions as mentioned here

The solution is to put all .dlls on the bin directory, next to the 

And I think that the


on piglit's top CMakeLists.txt.

That said, I think I'd like first to get piglit + waffle on windows 
wokring reliably, before DLL'ifying the libraries.  This way I don't 
have to worry about testing with glut.

Patch 1 seems safe however.


> https://urldefense.proofpoint.com/v2/url?u=http-3A__msdn.microsoft.com_en-2Dus_library_7d83bc18.aspxy&d=AAIDaQ&c=Sqcl0Ez6M0X8aeM67LKIiDJAXVeAw-YihVMNtXt-uEs&r=zfmBZnnVGHeYde45pMKNnVyzeaZbdIqVLprmZCM2zzE&m=GyXzdF0T86tcgDV01peMuyaqku0wVklpsZ3tVP6wP88&s=59LK-XMoX7wyBTHd0g06gq8UAIQfQHrAQ2VJTW_Yf54&e=
> Cc: José Fonseca <jfonseca at vmware.com>
> Signed-off-by: Emil Velikov <emil.l.velikov at gmail.com>
> ---
>   cmake/piglit_util.cmake | 8 ++------
>   1 file changed, 2 insertions(+), 6 deletions(-)
> diff --git a/cmake/piglit_util.cmake b/cmake/piglit_util.cmake
> index 411fa54..48e89c1 100644
> --- a/cmake/piglit_util.cmake
> +++ b/cmake/piglit_util.cmake
> @@ -77,12 +77,8 @@ endfunction(piglit_add_executable)
>   function(piglit_add_library name)
>       list(REMOVE_AT ARGV 0)
> -    if(WIN32)
> -        add_library(${name} STATIC ${ARGV})
> -    else(WIN32)
> -        add_library(${name} SHARED ${ARGV})
> -        install(TARGETS ${name} DESTINATION ${PIGLIT_INSTALL_LIBDIR}/lib)
> -    endif(WIN32)
> +    add_library(${name} SHARED ${ARGV})
>       add_dependencies(${name} piglit_dispatch_gen)
>           set_target_properties(${name} PROPERTIES SOVERSION "0")

More information about the Piglit mailing list