[Cmake] Link Lib Bug?
Bill Hoffman
bill . hoffman at kitware . com
Thu, 07 Jun 2001 08:59:56 -0400
OK, sorry, the vtkTcl libraries are not being linked to all the libraries.
The problem is in the vtkCMakeOptions.cmake, it does this:
IF (TCL_LIBRARY)
LINK_LIBRARIES (${TCL_LIBRARY})
ENDIF (TCL_LIBRARY)
It should be done with a TARGET_LINK_LIBRARIES in each of the CMakeLists.txt files.
It was just never fixed.
Python is done right.
-Bill
At 11:37 AM 6/7/2001 +0100, John Biddiscombe wrote:
>>That is not happening here. The only thing that happens is that the wrapTclExe is
>>in the depends of all the targets. It used to be like that but was fixed.
>
>I just a cvs update and rebuild. The MSProject generator links tcl and tk to the incorrect targets. As does my Borland generator. The unix one seems to have lost the tcl/tk bits but probably because I'm running it on windows and it won't find stuff properly as I've kludged the scripts.
>
>vtkRendering.dsp
># ADD LINK32 /LIBPATH:"c:\bin/$(IntDir)" /LIBPATH:"c:\bin/" /LIBPATH:"d:/vtk_bin/Rendering/$(OUTDIR)" /LIBPATH:"d:/vtk_bin/Rendering" /LIBPATH:"d:/vtk_bin/Hybrid/$(OUTDIR)" /LIBPATH:"d:/vtk_bin/Hybrid" /LIBPATH:"d:/vtk_bin/Common/$(OUTDIR)" /LIBPATH:"d:/vtk_bin/Common" /LIBPATH:"d:/vtk_bin/Filtering/$(OUTDIR)" /LIBPATH:"d:/vtk_bin/Filtering" /LIBPATH:"d:/vtk_bin/Imaging/$(OUTDIR)" /LIBPATH:"d:/vtk_bin/Imaging" /LIBPATH:"d:/vtk_bin/Graphics/$(OUTDIR)" /LIBPATH:"d:/vtk_bin/Graphics" /LIBPATH:"d:/vtk_bin/IO/$(OUTDIR)" /LIBPATH:"d:/vtk_bin/IO" "C:/PROGRA~1/Tcl/bin/tcl83.lib"
>************************
>"opengl32.lib" "C:/Program Files/Tcl/lib/tk82.lib" "vtkCommon.lib" "vtkFiltering.lib"
>************************
>"vtkImaging.lib" "vtkGraphics.lib" /STACK:10000000 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /stack:0x989680 /dll /machine:I386
>
>
>I'm creating a library list for each target using this code...
> //
> // Create the link lib list for each target
> //
> for (cmTargets::const_iterator t=tgts.begin(); t!=tgts.end(); t++) {
> cmTarget::LinkLibraries& libs = t->second.GetLinkLibraries();
> fout << t->first << "_LINK_LIB = ";
> for (cmTarget::LinkLibraries::const_iterator l=libs.begin(); l!=libs.end(); l++) {
> if ((t->first!=l->first) && t->second.GetType()!=cmTarget::INSTALL) {
> fout << " \\\n " << l->first << ".lib";
> }
> }
> fout << "\n\n";
> }
>
>can you see any problem with this ?
>
>
>
>
>
>>At 09:29 PM 6/6/2001 +0100, John Biddiscombe wrote:
>>
>>>>The TARGET_LINK_LIBRARIES command can be used to add libraries to
>>>>only one target.
>>>
>>>Ummm.. Does that imply that there is something amiss with the tcl wrapping. The tcl/tk libraries are linked to all targets and shouldn't be. Should I try to find where this happens and change it?
>>>
>>>JB
>>>
>>>
>>>
>>>
>>>
>>>>At 08:26 AM 6/2/2001 +0100, John Biddiscombe wrote:
>>>>>The Library commands in cmake appear to be a bit unselective. I'm dumping out the lib linked to by each target...
>>>>>
>>>>>example
>>>>>
>>>>>Mace_LINK_LIB = \
>>>>> C:/PROGRA~1/Tcl/bin/tcl83.lib \
>>>>> opengl32 \
>>>>> C:/Program Files/Tcl/lib/tk82.lib \
>>>>> vtkCommon \
>>>>> vtkFiltering \
>>>>> vtkImaging \
>>>>> vtkGraphics \
>>>>> vtkRendering
>>>>>
>>>>>vtkRendering_LINK_DIR = \
>>>>> C:/PROGRA~1/Tcl/bin/tcl83.lib \
>>>>> opengl32 \
>>>>> C:/Program Files/Tcl/lib/tk82.lib \
>>>>> vtkCommon \
>>>>> vtkFiltering \
>>>>> vtkImaging \
>>>>> vtkGraphics
>>>>>
>>>>>Mace and Rendering are linking to tcl and tk when these are selected. This is wrong. How do I stop this? (Only the Rendering_TCL should be doing this).
>>>>>
>>>>>[Should the ADD_LIBRARY(stuff) command have the target(s) specified?]
>>>>>
>>>>>[NB. I may be doing something wrong, in which case please correct me!]
>>>>>
>>>>>thanks
>>>>>
>>>>>JB
>>>>>
>>>>>_______________________________________________
>>>>>Cmake mailing list
>>>>>Cmake at public . kitware . com
>>>>>http://public . kitware . com/mailman/listinfo/cmake
>>>>
>>>>
>>>>_______________________________________________
>>>>Cmake mailing list
>>>>Cmake at public . kitware . com
>>>>http://public . kitware . com/mailman/listinfo/cmake