[CMake] implib option for linker on Win32
Brad King
brad.king at kitware.com
Thu Aug 4 15:04:54 EDT 2005
dohadwala, moiz wrote:
> Sorry, that email went out before I was finished.
>
> The problems with this is that I loose dependency checking. I could probably
> add the .def file to the sources to force dependency checks, but that means
> that
> If the def filename is changed, it has to be changed in at least 2
> locations, which is less than ideal.
You can put the name in a variable and then use the variable in both
places. Then changing the name of the file needs only one CMake code
change.
> I have tried adding the the .def file to the sources but that did not add
> the /implib Linker option to the link command in the make file.
>
> Wbat does work is the following:
>
> IF (${CMAKE_SYSTEM_NAME} EQUAL WINDOWS)
> SET ( ELM_LINK_FLAGS "/implib:elm.lib /def:filename.def" )
> SET_TARGET_PROPERTIES( elm PROPERTIES LINK_FLAGS "${ELM_LINK_FLAGS}"
> )
> ENDIF (${CMAKE_SYSTEM_NAME} EQUAL WINDOWS)
I think adding the .def file is supposed to work. What generator are
you using again? Either way please report the bug here:
http://www.cmake.org/Bug
Thanks,
-Brad
More information about the CMake
mailing list