[CMake] Digital Mars
William A. Hoffman
billlist at nycap.rr.com
Fri May 19 11:09:30 EDT 2006
At 10:44 AM 5/19/2006, Amitha Perera wrote:
>On Thu 18 May 2006, William A. Hoffman wrote:
>> I am not even sure we always have that information. For example,
>> someone might do LINK_DIRECTORIES(....) LINK_LIBRARIES(A).
>
>In principle, CMake has enough knowledge to look for it by scanning
>the current LINK_DIRECTORIES for libA.
Sure, cmake would have to be a linker.... Or at least act like one...
>> 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}")
>
>I tried this before my previous post, and it didn't work. The problem
>is that the directory still appears on the command line, and it is
>interpreted as a library.
>
>> 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.
>
>I think both a <LINK_DIRECTORIES> and a <LINK_ONLY_LIBRARIES> is
>necessary, because dmc can't deal with the directory paths being on
>the command line.
Yea, I think that is what is needed.
The other option is to use the Microsoft linker....
-Bill
More information about the CMake
mailing list