[CMake] Shared libraries cannot be found after deploying a CPack package

Timothy M. Shead tshead at sandia.gov
Thu Jul 16 12:22:29 EDT 2009


Timothy M. Shead wrote:
> Michael Wild wrote:
>> On 16. Jul, 2009, at 16:17, Bill Hoffman wrote:
>>
>>> Michael Wild wrote:
>>>
>>>> Actually, I'm planning on doing this with the .def files. But then,  
>>>> maintaining them might also become a nightmare.
>>> You can generate them if you use dumpbin and some scripting....   
>>> But, it is much easier to just use the declspec stuff....
>>>
>>> -Bill
>> Only thing is, how do I find the files which need exporting/importing?  
>> I have 5000 source/header files, many of which do not export a single  
>> symbol, because they contain pure template code.
>>
>> Probably I'll do some scripting (at least for the first conversion)  
>> which searches through all the .obj files and uses dumpbin to  
>> determine whether the corresponding source file exports something.  
>> Then I could try to demangle the name and print it along with the  
>> source file name into a file.
> 
> Here is a tool (developed by others) that our project uses for this purpose:
> 
> http://k3d.hg.sourceforge.net/hgweb/k3d/file/079fa1503f31/gendef

Forgot to mention, here is how we call the gendef executable from CMake:

http://k3d.hg.sourceforge.net/hgweb/k3d/file/079fa1503f31/cmake/modules/K3DGenerateDEF.cmake

Cheers,
Tim


-- 
Timothy M. Shead
Data Analysis & Visualization (1424)
Sandia National Laboratories
505-284-0139



More information about the CMake mailing list