Merge topic 'find_path-in-framework'

188baef0 find_path: Fix location of <dir/header.h> in a framework on OS X
This commit is contained in:
Brad King 2016-06-08 12:56:00 -04:00 committed by CMake Topic Stage
commit 8632251b25
5 changed files with 9 additions and 1 deletions

View File

@ -117,7 +117,7 @@ std::string cmFindPathCommand::FindHeaderInFramework(std::string const& file,
if (this->IncludeFileInPath) {
return fheader;
}
fheader = cmSystemTools::GetFilenamePath(fheader);
fheader.resize(fheader.size() - file.size());
return fheader;
}
return "";

View File

@ -0,0 +1 @@
-- SOME_INCLUDE_DIR='[^']*Tests/RunCMake/find_path/Frameworks/Foo.framework/Headers'

View File

@ -0,0 +1,3 @@
set(CMAKE_FRAMEWORK_PATH "${CMAKE_CURRENT_SOURCE_DIR}/Frameworks")
find_path(SOME_INCLUDE_DIR "Some/Dir/Header.h")
message(STATUS "SOME_INCLUDE_DIR='${SOME_INCLUDE_DIR}'")

View File

@ -3,3 +3,7 @@ include(RunCMake)
if(WIN32 OR CYGWIN)
run_cmake(PrefixInPATH)
endif()
if(APPLE)
run_cmake(FrameworksWithSubdirs)
endif()