[CMake] CMAKE_OSX_SYSROOT and find_XXX
Michael Wild
themiwi at gmail.com
Thu Oct 29 11:04:06 EDT 2009
On 29. Oct, 2009, at 15:39 , Sean McBride wrote:
> On 10/29/09 3:30 PM, Michael Wild said:
>
>> I'm a bit struggling with using CMAKE_OSX_SYSROOT. The problem is
>> that
>> find_library and cohorts do not consider CMAKE_OSX_SYSROOT at all,
>> thus reporting bogus paths.
>>
>> I think that find_library, find_path and find_file (did I forget
>> any?)
>> should honour CMAKE_OSX_SYSROOT and treat it as if CMAKE_PREFIX_PATH
>> and CMAKE_FRAMEWORK_PATH were set to "${CMAKE_OSX_SYSROOT}/usr" and
>> "$
>> {CMAKE_OSX_SYSROOT}/Library/Frameworks:${CMAKE_OSX_SYSROOT}/System/
>> Library/Frameworks", respectively.
>
> Are you sure this is a problem? Maybe I misunderstand, but note that
> the gcc man page says of -sysroot:
>
> --sysroot=dir
> Use dir as the logical root directory for headers and libraries. For
> example, if the compiler would normally search for headers in /usr/
> include and libraries in /usr/lib, it will instead search dir/usr/
> include and dir/usr/lib.
>
>
Great, now that I created a small test case, things seem to work
fine... Sorry for the noise
Michael
More information about the CMake
mailing list