How to add a specific .o file generated (with cmake)

Brad King brad.king at kitware.com
Wed Oct 18 18:36:00 CEST 2006


Laurent Montel wrote:
> On Wednesday 18 October 2006 17:58, Alexander Neundorf wrote:
>> On Wednesday 18 October 2006 17:42, Laurent Montel wrote:
>>> Hi,
>>> Into kalzium we generate a .o file.
>>> We want to link it with kalzium binary.
>>>
>>> How is it possible to specify a obj file when we want to create a binary
>>> ? (obj file is a C file)
>> Can you please explain a bit more ? It sounds a bit like a hack.
> 
> We have an object file generated (into kdeedu/kalzium/src/solver/) with ocalm 
> program.
> We generate directly a obj file.
> After we must add this object file when we will create binary kalzium.

Just include the object file in the list of sources for the target.
CMake will recognize it as an external object file and include it in the
link line.

-Brad


More information about the Kde-buildsystem mailing list