View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0007827CMakeModulespublic2008-10-18 11:082016-06-10 14:30
ReporterBoris Dušek 
Assigned ToBill Hoffman 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionmoved 
PlatformOSOS Version
Product VersionCMake-2-6 
Target VersionFixed in Version 
Summary0007827: FindEXPAT finds expat.h in /Library/Frameworks/Mono.framework/Headers instead of /usr/include on Mac OS X.
DescriptionHi,

title pretty says it all - when using find_package(EXPAT REQUIRED), ${EXPAT_INCLUDE_DIRS} gets set to /Library/Frameworks/Mono.framework/Headers even though the header expat.h is clearly in /usr/include as well.

I looked at FindEXPAT, EXPAT_INCLUDE_DIRS is set by FIND_PATH(EXPAT_INCLUDE_DIR NAMES expat.h) ... SET(EXPAT_INCLUDE_DIRS ${EXPAT_INCLUDE_DIR}).

Reading the documentation for find_path, I concluded that the reason for this undesirable behavior happening is that CMAKE_FIND_FRAMEWORK is set to "FIRST" by default, so frameworks on OS X are searched before /usr/include. So even though Mono.framework ships expat.h as a "side effect" to support its own headers, it gets searched first.

I really don't know what to think about this, since CMake behaves correctly, and Mono also neads this header for its own ones. I vaugely remember that there might be something like Private Headers or Private Frameworks where it would be more appropriate for Mono to put the headers of 3rdpatry libraries like expat, but I am not sure about this.
TagsNo tags attached.
Attached Files

 Relationships

  Notes
(0013898)
Boris Dušek (reporter)
2008-10-18 11:33

set(CMAKE_FIND_FRAMEWORK LAST) before find_package(EXPAT) is a working workaround.
(0041454)
Kitware Robot (administrator)
2016-06-10 14:27

Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page.

 Issue History
Date Modified Username Field Change
2008-10-18 11:08 Boris Dušek New Issue
2008-10-18 11:33 Boris Dušek Note Added: 0013898
2008-10-27 13:46 Bill Hoffman Status new => assigned
2008-10-27 13:46 Bill Hoffman Assigned To => Bill Hoffman
2009-01-10 09:29 Alex Neundorf Category CMake => Modules
2016-06-10 14:27 Kitware Robot Note Added: 0041454
2016-06-10 14:27 Kitware Robot Status assigned => resolved
2016-06-10 14:27 Kitware Robot Resolution open => moved
2016-06-10 14:30 Kitware Robot Status resolved => closed


Copyright © 2000 - 2018 MantisBT Team