[CMake] Get Qt DLL paths for INSTALL

Mike Jackson mike.jackson at imts.us
Fri Jun 27 11:42:05 EDT 2008


I thought I had some code that did that so I dug around a bit and  
came up with this:

Basically what this does is loop through a list of libraries that is  
delimited by the "optimized" and "debug" words. As it loops through  
it will add the library to the OSX_BUNDLE_LIBRARIES variable.


     FOREACH (_lib ${LIB_LIST})
         IF (_next_one)
             SET (OSX_BUNDLE_LIBRARIES ${OSX_BUNDLE_LIBRARIES} ${_lib})
             SET (_next_one false)
         ENDIF (_next_one)
         IF(CMAKE_BUILD_TYPE MATCHES Debug AND ${_lib} MATCHES debug)
             SET (_next_one true)
         ENDIF(CMAKE_BUILD_TYPE MATCHES Debug AND ${_lib} MATCHES debug)

         IF(CMAKE_BUILD_TYPE MATCHES Release AND ${_lib} MATCHES  
optimized)
             SET (_next_one true)
         ENDIF(CMAKE_BUILD_TYPE MATCHES Release AND ${_lib} MATCHES  
optimized)
     ENDFOREACH (_lib ${LIB_LIST})

Maybe it will help someone.

-- 
Mike Jackson   Senior Research Engineer
Innovative Management & Technology Services


On Jun 27, 2008, at 10:47 AM, Mike Arthur wrote:

> On Thursday 26 June 2008 20:54:52 you wrote:
>>     Mike A. any chance you would like to share what you came up with?
> I just manually specified each release version of the library to  
> install.
>
> At some stage I have dreams of hacking through QT_LIBRARIES but  
> this was too
> much pain for now, had to stop playing with CMake and do some  
> actual coding
> work ;)
>
> -- 
> Cheers,
> Mike Arthur
>




More information about the CMake mailing list