2008/5/1 Dick Hollenbeck <dick@...>:
I doubt the linkers can choose individual bitmaps from the library this
way. I believe a typical linker can only pull in an entire *.o file
from the library, not a partial. So this is not what I had in mind.
What I had in mind was to put each bitmap into a library separately.
By separately, I mean as an individual *.o file tucked into the library,
one for each bitmap.
Gotcha. In theory that's easy enough, however I've hit a bug in cmake.
I've tested with a release candidate of cmake 2.6 and it works
properly there, but we should probably wait at least until it's out
before pre-reqing it. In case I'm busier at the time I'll get it out
on the mailing list...
bitmaps/CMakeLists.txt:
-------------------------------
add_definitions(-DXPMMAIN)
FILE(GLOB BITMAP_SRCS *.xpm)
SET_SOURCE_FILES_PROPERTIES(${BITMAP_SRCS} PROPERTIES LANGUAGE CXX
COMPILE_FLAGS "-x c++")
add_library(bitmaps ${BITMAP_SRCS})
SET_TARGET_PROPERTIES(bitmaps PROPERTIES LINKER_LANGUAGE CXX)
-------------------------------