[CMake] faking convenience libraries
Brandon J. Van Every
bvanevery at gmail.com
Mon Feb 12 03:58:50 EST 2007
Bill Hoffman wrote:
>
> CMake does not directly support [static libraries as part of a static
> library].
> However, you can put a full path to a .o file as a source for a
> library and cmake will do the right thing for with it. The catch is I
> have never done this, and it will be difficult to figure out the paths
> to the .o files, and make sure they are built before they are used in
> the archive. It may or may not be possible to do what you want, and I
> am sure it will be ugly....
>
Well I figured out the paths to the .OBJ files. Note they're coming out
as .OBJ files on Windows, both for MinGW and for MSVC. When I dump my
.OBJ file absolute pathnames into ADD_LIBRARY, CMakeSetup complains that
"the source file doesn't exist," because of course they haven't been
built yet. I tried SET_SOURCE_FILES_PROPERTIES(${theobjs}PROPERTIES
GENERATED true), but it doesn't suppress the error. I don't think that
function thinks they're source files. Says it tried just about every
extension, except the .obj and .o extensions I might actually be
interested in.
So what now?
Cheers,
Brandon Van Every
More information about the CMake
mailing list