diff options
author | Stephen Kelly <stephen.kelly@kdab.com> | 2013-05-14 14:33:15 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-05-20 15:20:26 +0200 |
commit | c2f2c8a4e725249d29df73eed7af726c7a5db592 (patch) | |
tree | 0a51c0dee18592dd57d538abf300205fc8b32a01 /src/gui/Qt5GuiConfigExtras.cmake.in | |
parent | 0feb1aadfdd0654f17b523035e57ddf35efd11cf (diff) |
Check that files we expect to find actually exist when using a cmake package.
Change-Id: If7c724daa85df5e29e410b8deb4e69beb43ee8ea
Reviewed-by: Alexander Neundorf <neundorf@kde.org>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Diffstat (limited to 'src/gui/Qt5GuiConfigExtras.cmake.in')
-rw-r--r-- | src/gui/Qt5GuiConfigExtras.cmake.in | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/src/gui/Qt5GuiConfigExtras.cmake.in b/src/gui/Qt5GuiConfigExtras.cmake.in index ff0c3543ce..4dc5e623d2 100644 --- a/src/gui/Qt5GuiConfigExtras.cmake.in +++ b/src/gui/Qt5GuiConfigExtras.cmake.in @@ -7,22 +7,27 @@ set(Qt5Gui_EGL_INCLUDE_DIRS \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$$CMAK set(Qt5Gui_EGL_INCLUDE_DIRS \"$$CMAKE_INCLUDE_DIR\") !!ENDIF +_qt5_Gui_check_file_exists(${Qt5Gui_EGL_INCLUDE_DIRS}) + set(Qt5Gui_OPENGL_INCLUDE_DIRS ${Qt5Gui_EGL_INCLUDE_DIRS}) macro(_populate_qt5gui_gl_target_properties TargetName Configuration LIB_LOCATION IMPLIB_LOCATION) set_property(TARGET Qt5::${TargetName} APPEND PROPERTY IMPORTED_CONFIGURATIONS ${Configuration}) - set_target_properties(Qt5::${TargetName} PROPERTIES !!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE) - \"IMPORTED_LOCATION_${Configuration}\" \"${_qt5Gui_install_prefix}/$${CMAKE_LIB_DIR}${LIB_LOCATION}\" + set(imported_location \"${_qt5Gui_install_prefix}/$${CMAKE_LIB_DIR}${LIB_LOCATION}\") !!ELSE - \"IMPORTED_LOCATION_${Configuration}\" \"$${CMAKE_LIB_DIR}${LIB_LOCATION}\" + set(imported_location \"$${CMAKE_LIB_DIR}${LIB_LOCATION}\") !!ENDIF !!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE) - \"IMPORTED_IMPLIB_${Configuration}\" \"${_qt5Gui_install_prefix}/$${CMAKE_LIB_DIR}${IMPLIB_LOCATION}\" + set(imported_implib \"${_qt5Gui_install_prefix}/$${CMAKE_LIB_DIR}${IMPLIB_LOCATION}\") !!ELSE - \"IMPORTED_IMPLIB_${Configuration}\" \"$${CMAKE_LIB_DIR}${IMPLIB_LOCATION}\" + set(imported_implib \"$${CMAKE_LIB_DIR}${IMPLIB_LOCATION}\") !!ENDIF + + set_target_properties(Qt5::${TargetName} PROPERTIES + \"IMPORTED_LOCATION_${Configuration}\" ${imported_location} + \"IMPORTED_IMPLIB_${Configuration}\" ${imported_implib} ) endmacro() @@ -53,6 +58,8 @@ if (NOT _qt5gui_OPENGL_INCLUDE_DIR) message(FATAL_ERROR \"Failed to find \\\"$$CMAKE_GL_HEADER_NAME\\\" in \\\"$$CMAKE_GL_INCDIRS\\\", using the CMAKE_FIND_ROOT_PATH \\\"${CMAKE_FIND_ROOT_PATH}\\\".\") endif() +_qt5_Gui_check_file_exists(${_qt5gui_OPENGL_INCLUDE_DIR}) + list(APPEND Qt5Gui_INCLUDE_DIRS ${_qt5gui_OPENGL_INCLUDE_DIR}) set_property(TARGET Qt5::Gui APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${_qt5gui_OPENGL_INCLUDE_DIR}) @@ -81,7 +88,9 @@ macro(_qt5gui_find_extra_libs Name Libs LibDir IncDirs) set_property(TARGET Qt5::Gui_${_cmake_lib_name} APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${IncDirs}) set_property(TARGET Qt5::Gui_${_cmake_lib_name} APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE) + _qt5_Gui_check_file_exists(\"${Qt5Gui_${_cmake_lib_name}_LIBRARY}\") set_property(TARGET Qt5::Gui_${_cmake_lib_name} PROPERTY IMPORTED_LOCATION_RELEASE \"${Qt5Gui_${_cmake_lib_name}_LIBRARY}\") + !!IF !isEmpty(CMAKE_WINDOWS_BUILD) set_property(TARGET Qt5::Gui_${_cmake_lib_name} PROPERTY IMPORTED_IMPLIB_RELEASE \"${Qt5Gui_${_cmake_lib_name}_LIBRARY}\") !!ENDIF @@ -91,6 +100,7 @@ macro(_qt5gui_find_extra_libs Name Libs LibDir IncDirs) PATHS \"${LibDir}\" NO_DEFAULT_PATH) if (Qt5Gui_${_cmake_lib_name}_LIBRARY_DEBUG) set_property(TARGET Qt5::Gui_${_cmake_lib_name} APPEND PROPERTY IMPORTED_CONFIGURATIONS DEBUG) + _qt5_Gui_check_file_exists(\"${Qt5Gui_${_cmake_lib_name}_LIBRARY_DEBUG}\") set_property(TARGET Qt5::Gui_${_cmake_lib_name} PROPERTY IMPORTED_LOCATION_DEBUG \"${Qt5Gui_${_cmake_lib_name}_LIBRARY_DEBUG}\") !!IF !isEmpty(CMAKE_WINDOWS_BUILD) set_property(TARGET Qt5::Gui_${_cmake_lib_name} PROPERTY IMPORTED_IMPLIB_DEBUG \"${Qt5Gui_${_cmake_lib_name}_LIBRARY_DEBUG}\") @@ -100,6 +110,9 @@ macro(_qt5gui_find_extra_libs Name Libs LibDir IncDirs) endif() list(APPEND Qt5Gui_${Name}_LIBRARIES Qt5::Gui_${_cmake_lib_name}) endforeach() + foreach(_dir ${IncDirs}) + _qt5_Gui_check_file_exists(${_dir}) + endforeach() endmacro() |