[CMake] Building Libraries with C and ASM sources
Joe Cotellese
jcotellese at opgate.com
Tue Mar 15 10:56:46 EST 2005
Hello,
I'm trying to build a library from C and ASM sources. I found an earlier
post describing how this is done but I'm afraid I'm too dense to get it
working.
Here is what I have so far.
SET (MY_SRCS
a.cpp
b.cpp
c.cpp
d.cpp
e.cpp
f.c
)
SET (MY_ASM_SRCS
g.asm
h.asm
)
#This bit of code loops through the assembly files and calls
#nasm.
FOREACH (SOURCE ${MY_ASM_SRCS})
GET_FILENAME_COMPONENT (FILE_BASE ${SOURCE} NAME_WE)
ADD_CUSTOM_COMMAND (SOURCE ${SOURCE}
OUTPUT ${FILE_BASE}.o
ARGS "-felf" ${SOURCE}
COMMAND "nasm"
)
ENDFOREACH(SOURCE)
ADD_LIBRARY (mylib ${MY_SRCS})
Now, the question is, how do I add the objects to the ADD_LIBRARY line?
I tried adding g.o and h.o as such:
ADD_LIBRARY (mylib ${MY_SRCS} g.o h.o)
That didn't seem to help.
Any help in this area would be greatly appreciated, I'm banging my head
against the wall.
Regards,
Joe Cotellese
--
---------------------[ Ciphire Signature ]----------------------
From: jcotellese at opgate.com signed email body (719 characters)
Date: on 15 March 2005 at 16:00:07 UTC
To: cmake at cmake.org
----------------------------------------------------------------
: Ciphire has secured this email against identity theft.
: Free download at www.ciphire.com. The garbled lines
: below are the sender's verifiable digital signature.
----------------------------------------------------------------
00fAAAAAEAAACHBjdCzwIAAFQCAAIAAgACACB4nnrWWTehZZjEm9U4qgSoBbTqS1
+jElcmwlj8MXGVrwEAhMtBRTftIFcIGq9/Z/nBjF1xYtbgnnSvO5NY4xXL+osO4J
VciJBtvILcwNnMSwLxd03sZ7KNamwkztD5w9WWIg==
------------------[ End Ciphire Signed Message ]----------------
More information about the CMake
mailing list