[CMake] Projects with C++ and Assembly

Mr David McKinnon s341552 at student.uq.edu.au
Wed Jun 22 10:46:03 EDT 2005


Hi,
  here is the functioning script I have in a lower directory cmake file
passing the terrain_asm_obj varibale containing the .obj file generated
from src.asm.

SET(src ${CMAKE_CURRENT_SOURCE_DIR}/${terrain_asm_sources}.asm)
SET(obj ${TGE_BINARY_DIR}/Debug/${terrain_asm_sources}.obj)
ADD_CUSTOM_COMMAND(OUTPUT ${obj}
                   MAIN_DEPENDENCY ${src}
                   COMMAND ${TGE_SOURCE_DIR}/bin/nasm/nasmw.exe
                   ARGS -fwin32 ${src})
SET(terrain_asm_obj ${obj} CACHE INTERNAL "cache")

I then intend to create a library from the .obj file using - perhaps the
ADD_LIBRARY(asm_library ${terrain_asm_obj})command - but I do not
understand how to create libraries using .obj files as opposed to
standard source files.

Furthermore how would I then bind two different libraries into single
library?

Thanks,
David...


More information about the CMake mailing list