Ticket #32302: patch-CMake_Utils_FindPkgMacros.cmake.diff
File patch-CMake_Utils_FindPkgMacros.cmake.diff, 1.7 KB (added by marin.saric@…, 13 years ago) |
---|
-
CMake/Utils/FindPkgMacros.cmake
old new 126 126 # Slightly customised framework finder 127 127 MACRO(findpkg_framework fwk) 128 128 IF(APPLE) 129 SET(${fwk}_FRAMEWORK_PATH 129 SET(${fwk}_FRAMEWORK_PATH "") # The pessimistic assumption 130 SET(${fwk}_FRAMEWORK_TEMP_SEARCH_PATH 130 131 ${${fwk}_FRAMEWORK_SEARCH_PATH} 131 132 ${CMAKE_FRAMEWORK_PATH} 132 133 ~/Library/Frameworks … … 138 139 ${CMAKE_CURRENT_SOURCE_DIR}/lib/Debug 139 140 ) 140 141 # These could be arrays of paths, add each individually to the search paths 141 foreach(i ${OGRE_PREFIX_PATH}) 142 set(${fwk}_FRAMEWORK_PATH ${${fwk}_FRAMEWORK_PATH} ${i}/lib/Release ${i}/lib/Debug) 142 foreach(i ${OGRE_PREFIX_PATH} ${OGRE_PREFIX_BUILD}) 143 LIST(APPEND ${fwk}_FRAMEWORK_TEMP_SEARCH_PATH 144 ${i}/lib/Release ${i}/lib/Debug) 143 145 endforeach(i) 144 146 145 foreach(i ${OGRE_PREFIX_BUILD}) 146 set(${fwk}_FRAMEWORK_PATH ${${fwk}_FRAMEWORK_PATH} ${i}/lib/Release ${i}/lib/Debug) 147 endforeach(i) 148 149 FOREACH(dir ${${fwk}_FRAMEWORK_PATH}) 147 FOREACH(dir ${${fwk}_FRAMEWORK_TEMP_SEARCH_PATH}) 150 148 SET(fwkpath ${dir}/${fwk}.framework) 151 149 IF(EXISTS ${fwkpath}) 152 SET(${fwk}_FRAMEWORK_INCLUDES ${${fwk}_FRAMEWORK_INCLUDES} 153 ${fwkpath}/Headers ${fwkpath}/PrivateHeaders) 154 SET(${fwk}_FRAMEWORK_PATH ${dir}) 150 IF (NOT ${fwk}_FRAMEWORK_PATH) 151 SET(${fwk}_FRAMEWORK_PATH ${dir}) 152 SET(${fwk}_FRAMEWORK_INCLUDES ${${fwk}_FRAMEWORK_INCLUDES} 153 ${fwkpath}/Headers ${fwkpath}/PrivateHeaders) 154 ENDIF() 155 155 if (NOT ${fwk}_LIBRARY_FWK) 156 156 SET(${fwk}_LIBRARY_FWK "-framework ${fwk}") 157 157 endif ()