Try to find GL headers in Mac SDKs.

Task-number: QTBUG-32308

Change-Id: Ibbab3852e5cc289faa63d0a66a3816ab8062ccb9
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Reviewed-by: Brad King <brad.king@kitware.com>
This commit is contained in:
Stephen Kelly 2013-11-11 16:34:51 +01:00 committed by The Qt Project
parent 345525db99
commit e9af987f28

View File

@ -77,7 +77,21 @@ unset(_qt5gui_OPENGL_INCLUDE_DIR CACHE)
macro(_qt5gui_find_extra_libs Name Libs LibDir IncDirs)
set(Qt5Gui_${Name}_LIBRARIES)
!!IF !mac
set(Qt5Gui_${Name}_INCLUDE_DIRS ${IncDirs})
!!ELSE
foreach(_dir ${IncDirs})
if (EXISTS ${_dir})
list(APPEND Qt5Gui_${Name}_INCLUDE_DIRS ${_dir})
else()
find_path(_actual_dir ${_dir}) # Look in sdk directories
if (_actual_dir)
list(APPEND Qt5Gui_${Name}_INCLUDE_DIRS ${_actual_dir})
endif()
unset(_actual_dir CACHE)
endif()
endforeach()
!!ENDIF
foreach(_lib ${Libs})
string(REGEX REPLACE "[^_A-Za-z0-9]" "_" _cmake_lib_name ${_lib})
if (NOT TARGET Qt5::Gui_${_cmake_lib_name})
@ -100,7 +114,7 @@ macro(_qt5gui_find_extra_libs Name Libs LibDir IncDirs)
endif()
endif()
add_library(Qt5::Gui_${_cmake_lib_name} SHARED IMPORTED)
set_property(TARGET Qt5::Gui_${_cmake_lib_name} APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${IncDirs})
set_property(TARGET Qt5::Gui_${_cmake_lib_name} APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${Qt5Gui_${Name}_INCLUDE_DIRS})
set_property(TARGET Qt5::Gui_${_cmake_lib_name} APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE)
_qt5_Gui_check_file_exists(\"${Qt5Gui_${_cmake_lib_name}_LIBRARY}\")
@ -130,7 +144,7 @@ macro(_qt5gui_find_extra_libs Name Libs LibDir IncDirs)
list(APPEND Qt5Gui_${Name}_LIBRARIES Qt5::Gui_${_cmake_lib_name})
endforeach()
if (NOT CMAKE_CROSSCOMPILING)
foreach(_dir ${IncDirs})
foreach(_dir ${Qt5Gui_${Name}_INCLUDE_DIRS})
_qt5_Gui_check_file_exists(${_dir})
endforeach()
endif()