[CMake] how to use CMAKE_LINK_DEF_FILE_FLAG

Cees Wesseling cwesseling at esri.com
Thu Oct 25 13:50:39 EDT 2007


Hi Gerhard,

Thanks that solved my problem. 

 

Best regards, Cees

 

________________________________

From: Gerhard Grimm [mailto:ggrimm at detec.de] 
Sent: Thursday, October 25, 2007 9:59 AM
To: Cees Wesseling; cmake at cmake.org
Subject: AW: [CMake] how to use CMAKE_LINK_DEF_FILE_FLAG

 

Hi Cees,

 

simply add the .def file to your sources in the ADD_LIBRARY command:

 

ADD_LIBRARY(Test SHARED InProcServer.cc dll.def)

 

Worked for me in a similar case.

 

Best regards, Gerhard

	-----Ursprüngliche Nachricht-----
	Von: cmake-bounces+ggrimm=detec.de at cmake.org [mailto:cmake-bounces+ggrimm=detec.de at cmake.org]Im Auftrag von Cees Wesseling
	Gesendet: Donnerstag, 25. Oktober 2007 18:36
	An: cmake at cmake.org
	Betreff: [CMake] how to use CMAKE_LINK_DEF_FILE_FLAG

	I am trying to build a C++ Windows dll that must use a linker definition file with the exports using cmake version 2.4-patch 7 for Visual Studio 2005 in nmake Makefile mode.

	 

	What I have tried is the following bare CMakeLists.txt:

	 

	SET (CMAKE_LINK_DEF_FILE_FLAG "/DEF:dll.def")

	ADD_LIBRARY(Test

	  SHARED

	  InProcServer.cc

	)

	 

	The dll builds fine, but has no entry points. In the resulting Makefile I do not find any mentioning of the DEF linker flag. And from inspecting Modules/Platform/Windows-cl.cmake of the cmake distro I am getting suspicious if the CMAKE_LINK_DEF_FILE_FLAG is ever rolled into the link options.

	 

	Am I overlooking something obvious? Is there another way to push this flag into the link options?

	 

	Thanks, Cees

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/cmake/attachments/20071025/f6c5b780/attachment.htm


More information about the CMake mailing list