[CMake] Add a .obj file to a library

Anton Deguet anton.deguet at jhu.edu
Fri Mar 9 12:15:20 EST 2007


Hello,

I am trying to add a pre-compiled object in a library.  I am  
generating a "solution" for  Microsoft Visual Studio .net 2003 using  
CMake 2.4.5.   I used FIND_FILE to locate the ".obj" file and then  
simply add it to the list of source files for my library.   I found a  
couple of reference on the web related to this problem so I was hopeful.

It doesn't work as is because CMake prepends the current source path  
to my file name (which already contains a full path).   So I get a  
message stating that "C:/current-source-path/C:/path-to-my-obj/ 
file.obj" can not be found.   Is there an easy way to tell CMake to  
not prepend the current source path?

Also, all examples found on the web referred to ".o" files but not  
".obj" files.  I am pretty sure that CMake can handle this difference  
but I just wanted verify.

Thanks,

Anton


---
Anton Deguet, Research Engineer, ERC-CISST, Johns Hopkins University
anton.deguet at jhu.edu, 410-516-5261



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/cmake/attachments/20070309/e75bbbbe/attachment.htm


More information about the CMake mailing list