On Sat, May 26, 2007 at 02:41:37PM +0100, Trevor Kellaway wrote:
> Hi,
> 
> Does anyone know how to add an explicit reference to a pre-existing
> object file (no related source file) to the link?
> 
> I've tried:
> 
>       ADD_EXECUTABLE(myapp mysrc1.c mysrc2. myexisiting.o)
> 
> If I perform the above CMake complains it doesn't know how to build
> myexisiting.o.
> 
> FYI, my myexisiting.o is an embedded compiler's startup code that is
> delivered as a pre-built object.

  Why don't you add it in the LINK_FLAGS or whatever the name is ? If
this .o is floating in the ether, you don't really need to list it as a
dependency right ? You just need to have it linked.

  And if you stil need the dependency, I guess an
ADD_DEPENDENCY(myapp myexisting.o) could do it.


-- 
·O·  Pierre Habouzit
··O                                                [EMAIL PROTECTED]
OOO                                                http://www.madism.org

Attachment: pgpd49Ar0bkDH.pgp
Description: PGP signature

_______________________________________________
CMake mailing list
[email protected]
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to