[CMake] Projects with C++ and Assembly
David McKinnon
s341552 at student.uq.edu.au
Mon Jun 20 20:24:09 EDT 2005
Hi,
I have seen some previous posts about integrating assembly files into
a project. I have implemented something along the lines of the snippet
below and have successfully created the object files (.obj on Windows).
FOREACH (SOURCE ${MY_ASM_SRCS})
GET_FILENAME_COMPONENT (FILE_BASE ${SOURCE} NAME_WE)
ADD_CUSTOM_COMMAND (SOURCE ${SOURCE}
SET(OBJ ${CMAKE_CURRENT_BINARY_DIR}/${FILE_BASE}.o)
OUTPUT ${OBJ}
ARGS "-f win32" ${SOURCE}
COMMAND "nasm"
)
ENDFOREACH(SOURCE)
When I use the following method,
ADD_LIBRARY (mylib ${MY_SRCS} ${OBJ})
CMake says that it cannot find any files finishing with (.c,.cxx,.h) etc...
My problem is that I do not understand how to make a library (.lib or .dll)
in CMake out of .obj files as is suggested in a further post on the topic.
Assuming I have a set of object files ${OBJ} how do I manufacture a library
from the object files and merge this library into the original library
mylib?
Thanks,
David McKinnon...
More information about the CMake
mailing list