At 10:18 AM 5/18/2006, Amitha Perera wrote: >I've been able to get relatively far by simply implementing a >Platform/Windows-bmc.cmake, and using NMake as the Makefile parser. I >thought I'd try this first before writing a generator for the Digital >Mars make. > >Right now, I'm stuck here: the Digital Mars linker wants full paths to >the libraries, or else will scan the LIB environment variable. Is >there a variable simliar to <LINK_LIBRARIES> that will expand to the >full paths of the required libraries? > >(Unfortunately, this is somewhat low priority for me, so I'll >apologize in advance for delayed responses.) Currently, there is not.
It does seem that the linker can not add paths to the link line: http://www.digitalmars.com/d/archives/c++/command-line/639.html I am not even sure we always have that information. For example, someone might do LINK_DIRECTORIES(....) LINK_LIBRARIES(A). Maybe we could set the LIB env as part of the link command. Then use the /SCANLIB option. Then do something like this: In Windows-bmc.cmake try this: SET(CMAKE_LIBRARY_PATH_FLAG ";") SET(CMAKE_CXX_CREATE_SHARED_LIBRARY "set LIB=<LINK_LIBRARIES>" "link ${CMAKE_CL_NOLOGO} ${CMAKE_START_TEMP_FILE} /out:<TARGET> /PDB:<TARGET_PDB> /dll <LINK_FLAGS> <OBJECTS> <LINK_LIBRARIES> ${CMAKE_END_TEMP_FILE}") We might need to create a <LINK_DIRECTORIES> that would only have the link directories part of the link line, but that might work with the extra junk at the end of the lib path. -Bill _______________________________________________ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake