[vtk-developers] VTK formula in homebrew: TK_INTERNAL_PATH
Samuel John
mail at samueljohn.de
Wed Jun 20 03:32:37 EDT 2012
A follow up information (and still not a solution - just awork-around)
At first, I thought this is a cmake related bug but I think it is cause by the .cmake files vtk 5.10 ships.
I have to add these two pathes manually to prevent vtk from mixing the headers in the MacOSX10.7.sdk and VTK/build/Utilities/TclTk/internals.
This happens only on Macs without the Command Line Tools.
> -DTK_INCLUDE_PATH:PATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/System/Library/Frameworks/Tk.framework/Headers
> -DTK_INTERNAL_PATH:PATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/System/Library/Frameworks/Tk.framework/Headers/tk-private
Anyone an idea how to teach VTK to always using the Framework? "-DCMAKE_FIND_FRAMEWORK=FIRST" did not work.
Setting
> CMAKE_FRAMEWORK_PATH="/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/System/Library/Frameworks"
> CMAKE_PREFIX_PATH="/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/usr"
doesn't help either.
I guess I have to open a ticket.
bests,
Samuel
On 18.06.2012, at 22:24, Samuel John wrote:
> Hi VTK people!
>
> We are trying to improve the vtk formula for homebrew and therefore I need your help with one issue.
> (There is a pull request for the new vtk 5.10 over at https://github.com/mxcl/homebrew/pull/12807)
> It looks pretty good so far but one issue puzzles me:
>
> Look at these strange results in my CMakeCache.txt on 10.7.4 OS X:
>
>> //Path to a file.
>> TK_INCLUDE_PATH:PATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/usr/include
>> this is fine, since the headers are symlinked from the framework to that dir.
>>
>> //The path to the Tk internal headers (tkMacOSXDefault.h).
>> TK_INTERNAL_PATH:PATH=/tmp/homebrew-vtk-5.10.0-Rfpt/VTK/Utilities/TclTk/internals/tk8.5
>> this is bullshit. The private headers are not symlinked to Xcode.app/.../usr/include :-(
>>
>> //Path to a library.
>> TK_LIBRARY:FILEPATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/usr/lib/libtk.dylib
>
> We have set the following CMAKE variables per default on homebrew:
>> -DCMAKE_INSTALL_PREFIX=#{prefix}
>> -DCMAKE_BUILD_TYPE=None
>> -DCMAKE_FIND_FRAMEWORK=LAST
>> -Wno-dev
>
> And these env vars for systems that only have Xcode but not the "Command Line Tools for Xcode":
>> CMAKE_PREFIX_PATH = "#{sdk}/usr"
>
>> CMAKE_FRAMEWORK_PATH = "#{sdk}/System/Library/Frameworks"
>
> with sdk=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk
>
> That works fine so far but not for TK_INTERNAL_PATH.
> To me it seems cmake or the vtk configuration mixes the Tk from within Xcode with the TclTK included in Utilities.
> Further I read the Modlues/FindTCL.cmake in a way that TK_INTERNAL_PATH is deprecated.
> I could just overwrite TK_INTERNAL_PATH but I'd like to find a better solution.
>
> In the tk.framework in Xcode there is a directory named Headers/tk-private that contains the needed files.
>
> Is there a switch to tell vtk to use the systems tk.framework and not the one in Utilities?
> Or alternatively use only the one in Utilities? I'd like to avoid setting the correct pathes 'by hand'.
>
>
> bests,
> Samuel
More information about the vtk-developers
mailing list