summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorStephen Kelly <stephen.kelly@kdab.com>2013-11-11 16:34:51 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-11-15 20:24:59 +0100
commite9af987f2821112ec6b03af5e2527c37c5580c68 (patch)
tree26cd71d4ae3fbb6d1771af67600b64de6b4dde1a /src
parent345525db99cf0805af04492e08aeeb9a7bbc6bec (diff)
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>
Diffstat (limited to 'src')
-rw-r--r--src/gui/Qt5GuiConfigExtras.cmake.in18
1 files changed, 16 insertions, 2 deletions
diff --git a/src/gui/Qt5GuiConfigExtras.cmake.in b/src/gui/Qt5GuiConfigExtras.cmake.in
index b79845b07c..75a2385d57 100644
--- a/src/gui/Qt5GuiConfigExtras.cmake.in
+++ b/src/gui/Qt5GuiConfigExtras.cmake.in
@@ -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()