Skip to content
Commits on Source (3)
#
# W A R N I N G
# -------------
#
# This file is not part of the Qt API. It exists purely as an
# implementation detail. This file, and its contents may change from version to
# version without notice, or even be removed.
#
# We mean it.
message("CMAKE_VERSION: ${CMAKE_VERSION}")
message("CMAKE_PREFIX_PATH: ${CMAKE_PREFIX_PATH}")
message("CMAKE_MODULES_UNDER_TEST: ${CMAKE_MODULES_UNDER_TEST}")
foreach(_mod ${CMAKE_MODULES_UNDER_TEST})
message("CMAKE_${_mod}_MODULE_MAJOR_VERSION: ${CMAKE_${_mod}_MODULE_MAJOR_VERSION}")
message("CMAKE_${_mod}_MODULE_MINOR_VERSION: ${CMAKE_${_mod}_MODULE_MINOR_VERSION}")
message("CMAKE_${_mod}_MODULE_PATCH_VERSION: ${CMAKE_${_mod}_MODULE_PATCH_VERSION}")
endforeach()
set(BUILD_OPTIONS_LIST)
if (CMAKE_C_COMPILER)
list(APPEND BUILD_OPTIONS_LIST "-DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}")
endif()
if (CMAKE_CXX_COMPILER)
list(APPEND BUILD_OPTIONS_LIST "-DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}")
endif()
if (CMAKE_BUILD_TYPE)
list(APPEND BUILD_OPTIONS_LIST "-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}")
endif()
if (CMAKE_TOOLCHAIN_FILE)
list(APPEND BUILD_OPTIONS_LIST "-DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}")
endif()
if (CMAKE_VERBOSE_MAKEFILE)
list(APPEND BUILD_OPTIONS_LIST "-DCMAKE_VERBOSE_MAKEFILE=1")
endif()
if (NO_GUI)
list(APPEND BUILD_OPTIONS_LIST "-DNO_GUI=True")
endif()
if (NO_WIDGETS)
list(APPEND BUILD_OPTIONS_LIST "-DNO_WIDGETS=True")
endif()
if (NO_DBUS)
list(APPEND BUILD_OPTIONS_LIST "-DNO_DBUS=True")
endif()
# Qt requires C++11 features in header files, which means
# the buildsystem needs to add a -std flag for certain compilers
# CMake adds the flag automatically in most cases, but notably not
# on Windows prior to CMake 3.3
if (CMAKE_VERSION VERSION_LESS 3.3)
if (CMAKE_CXX_COMPILER_ID STREQUAL AppleClang
OR (APPLE AND CMAKE_CXX_COMPILER_ID STREQUAL Clang))
list(APPEND BUILD_OPTIONS_LIST "-DCMAKE_CXX_FLAGS=-std=gnu++0x -stdlib=libc++")
elseif (CMAKE_CXX_COMPILER_ID STREQUAL GNU
OR CMAKE_CXX_COMPILER_ID STREQUAL Clang)
list(APPEND BUILD_OPTIONS_LIST "-DCMAKE_CXX_FLAGS=-std=gnu++0x")
endif()
endif()
foreach(module ${CMAKE_MODULES_UNDER_TEST})
list(APPEND BUILD_OPTIONS_LIST
"-DCMAKE_${module}_MODULE_MAJOR_VERSION=${CMAKE_${module}_MODULE_MAJOR_VERSION}"
"-DCMAKE_${module}_MODULE_MINOR_VERSION=${CMAKE_${module}_MODULE_MINOR_VERSION}"
"-DCMAKE_${module}_MODULE_PATCH_VERSION=${CMAKE_${module}_MODULE_PATCH_VERSION}"
)
endforeach()
macro(expect_pass _dir)
cmake_parse_arguments(_ARGS "" "BINARY" "" ${ARGN})
string(REPLACE "(" "_" testname "${_dir}")
string(REPLACE ")" "_" testname "${testname}")
add_test(${testname} ${CMAKE_CTEST_COMMAND}
--build-and-test
"${CMAKE_CURRENT_SOURCE_DIR}/${_dir}"
"${CMAKE_CURRENT_BINARY_DIR}/${_dir}"
--build-config "${CMAKE_BUILD_TYPE}"
--build-generator ${CMAKE_GENERATOR}
--build-makeprogram ${CMAKE_MAKE_PROGRAM}
--build-project ${_dir}
--build-options "-DCMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH}" ${BUILD_OPTIONS_LIST}
--test-command ${_ARGS_BINARY}
)
endmacro()
macro(expect_fail _dir)
string(REPLACE "(" "_" testname "${_dir}")
string(REPLACE ")" "_" testname "${testname}")
file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/failbuild/${_dir}")
file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/${_dir}" DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/failbuild/${_dir}")
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/failbuild/${_dir}/${_dir}/FindPackageHints.cmake" "set(Qt5Tests_PREFIX_PATH \"${CMAKE_PREFIX_PATH}\")")
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/failbuild/${_dir}/CMakeLists.txt"
"
cmake_minimum_required(VERSION 2.8)
project(${_dir})
try_compile(Result \${CMAKE_CURRENT_BINARY_DIR}/${_dir}
\${CMAKE_CURRENT_SOURCE_DIR}/${_dir}
${_dir}
OUTPUT_VARIABLE Out
)
message(\"\${Out}\")
if (Result)
message(SEND_ERROR \"Succeeded build which should fail\")
endif()
"
)
add_test(${testname} ${CMAKE_CTEST_COMMAND}
--build-and-test
"${CMAKE_CURRENT_BINARY_DIR}/failbuild/${_dir}"
"${CMAKE_CURRENT_BINARY_DIR}/failbuild/${_dir}/build"
--build-config "${CMAKE_BUILD_TYPE}"
--build-generator ${CMAKE_GENERATOR}
--build-makeprogram ${CMAKE_MAKE_PROGRAM}
--build-project ${_dir}
--build-options "-DCMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH}" ${BUILD_OPTIONS_LIST}
)
endmacro()
function(test_module_includes)
set(all_args ${ARGN})
set(packages_string "")
set(libraries_string "")
foreach(_package ${Qt5_MODULE_TEST_DEPENDS})
set(packages_string
"
${packages_string}
find_package(Qt5${_package} 5.0.0 REQUIRED)
"
)
endforeach()
while(all_args)
list(GET all_args 0 qtmodule)
list(REMOVE_AT all_args 0 1)
set(CMAKE_MODULE_VERSION ${CMAKE_${qtmodule}_MODULE_MAJOR_VERSION}.${CMAKE_${qtmodule}_MODULE_MINOR_VERSION}.${CMAKE_${qtmodule}_MODULE_PATCH_VERSION} )
set(packages_string
"${packages_string}
find_package(Qt5${qtmodule} 5.0.0 REQUIRED)
include_directories(\${Qt5${qtmodule}_INCLUDE_DIRS})
add_definitions(\${Qt5${qtmodule}_DEFINITIONS})\n")
list(FIND CMAKE_MODULES_UNDER_TEST ${qtmodule} _findIndex)
if (NOT _findIndex STREQUAL -1)
set(packages_string
"${packages_string}
if(NOT \"\${Qt5${qtmodule}_VERSION}\" VERSION_EQUAL ${CMAKE_MODULE_VERSION})
message(SEND_ERROR \"Qt5${qtmodule}_VERSION variable was not ${CMAKE_MODULE_VERSION}. Got \${Qt5${qtmodule}_VERSION} instead.\")
endif()
if(NOT \"\${Qt5${qtmodule}_VERSION_MAJOR}\" VERSION_EQUAL ${CMAKE_${qtmodule}_MODULE_MAJOR_VERSION})
message(SEND_ERROR \"Qt5${qtmodule}_VERSION_MAJOR variable was not ${CMAKE_${qtmodule}_MODULE_MAJOR_VERSION}. Got \${Qt5${qtmodule}_VERSION_MAJOR} instead.\")
endif()
if(NOT \"\${Qt5${qtmodule}_VERSION_MINOR}\" VERSION_EQUAL ${CMAKE_${qtmodule}_MODULE_MINOR_VERSION})
message(SEND_ERROR \"Qt5${qtmodule}_VERSION_MINOR variable was not ${CMAKE_${qtmodule}_MODULE_MINOR_VERSION}. Got \${Qt5${qtmodule}_VERSION_MINOR} instead.\")
endif()
if(NOT \"\${Qt5${qtmodule}_VERSION_PATCH}\" VERSION_EQUAL ${CMAKE_${qtmodule}_MODULE_PATCH_VERSION})
message(SEND_ERROR \"Qt5${qtmodule}_VERSION_PATCH variable was not ${CMAKE_${qtmodule}_MODULE_PATCH_VERSION}. Got \${Qt5${qtmodule}_VERSION_PATCH} instead.\")
endif()
if(NOT \"\${Qt5${qtmodule}_VERSION_STRING}\" VERSION_EQUAL ${CMAKE_MODULE_VERSION})
message(SEND_ERROR \"Qt5${qtmodule}_VERSION_STRING variable was not ${CMAKE_MODULE_VERSION}. Got \${Qt5${qtmodule}_VERSION_STRING} instead.\")
endif()\n"
)
endif()
set(libraries_string "${libraries_string} Qt5::${qtmodule}")
endwhile()
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/module_includes/CMakeLists.txt"
"
cmake_minimum_required(VERSION 2.8)
project(module_includes)
${packages_string}
set(CMAKE_CXX_FLAGS \"\${CMAKE_CXX_FLAGS} \${Qt5Core_EXECUTABLE_COMPILE_FLAGS}\")
if (CMAKE_VERSION VERSION_LESS 3.3)
if (CMAKE_CXX_COMPILER_ID STREQUAL AppleClang
OR (APPLE AND CMAKE_CXX_COMPILER_ID STREQUAL Clang))
set(CMAKE_CXX_FLAGS \"\${CMAKE_CXX_FLAGS} -std=gnu++0x -stdlib=libc++\")
elseif (CMAKE_CXX_COMPILER_ID STREQUAL GNU
OR CMAKE_CXX_COMPILER_ID STREQUAL Clang)
set(CMAKE_CXX_FLAGS \"\${CMAKE_CXX_FLAGS} -std=gnu++0x\")
endif()
endif()
add_executable(module_includes_exe \"\${CMAKE_CURRENT_SOURCE_DIR}/main.cpp\")
target_link_libraries(module_includes_exe ${libraries_string})\n"
)
set(all_args ${ARGN})
set(includes_string "")
set(instances_string "")
while(all_args)
list(GET all_args 0 qtmodule)
list(GET all_args 1 qtclass)
if (${qtclass}_NAMESPACE)
set(qtinstancetype ${${qtclass}_NAMESPACE}::${qtclass})
else()
set(qtinstancetype ${qtclass})
endif()
list(REMOVE_AT all_args 0 1)
set(includes_string
"${includes_string}
#include <${qtclass}>
#include <Qt${qtmodule}/${qtclass}>
#include <Qt${qtmodule}>
#include <Qt${qtmodule}/Qt${qtmodule}>"
)
set(instances_string
"${instances_string}
${qtinstancetype} local${qtclass};
")
endwhile()
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/module_includes/main.cpp"
"
${includes_string}
int main(int, char **) { ${instances_string} return 0; }\n"
)
add_test(module_includes ${CMAKE_CTEST_COMMAND}
--build-and-test
"${CMAKE_CURRENT_BINARY_DIR}/module_includes/"
"${CMAKE_CURRENT_BINARY_DIR}/module_includes/build"
--build-config "${CMAKE_BUILD_TYPE}"
--build-generator ${CMAKE_GENERATOR}
--build-makeprogram ${CMAKE_MAKE_PROGRAM}
--build-project module_includes
--build-options "-DCMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH}" ${BUILD_OPTIONS_LIST}
)
endfunction()
if (CMAKE_VERSION VERSION_LESS 2.8.3)
message(FATAL_ERROR "Qt 5 requires at least CMake version 2.8.3")
endif()
get_filename_component(_qt5Core_install_prefix "${FAST_EXTERNAL_INSTALL_DIR}" ABSOLUTE)
# For backwards compatibility only. Use Qt5Core_VERSION instead.
set(Qt5Core_VERSION_STRING 5.8.0)
set(Qt5Core_LIBRARIES Qt5::Core)
macro(_qt5_Core_check_file_exists file)
#if(NOT EXISTS "${file}" )
# message(FATAL_ERROR "The imported target \"Qt5::Core\" references the file
#\"${file}\"
#but this file does not exist. Possible reasons include:
#* The file was deleted, renamed, or moved to another location.
#* An install or uninstall procedure did not complete successfully.
#* The installation package was faulty and contained
# \"${CMAKE_CURRENT_LIST_FILE}\"
#but not all the files it references.
#")
# endif()
endmacro()
macro(_populate_Core_target_properties Configuration LIB_LOCATION IMPLIB_LOCATION)
set_property(TARGET Qt5::Core APPEND PROPERTY IMPORTED_CONFIGURATIONS ${Configuration})
set(imported_location "${_qt5Core_install_prefix}/lib/${LIB_LOCATION}")
_qt5_Core_check_file_exists(${imported_location})
set_target_properties(Qt5::Core PROPERTIES
"INTERFACE_LINK_LIBRARIES" "${_Qt5Core_LIB_DEPENDENCIES}"
"IMPORTED_LOCATION_${Configuration}" ${imported_location}
"IMPORTED_SONAME_${Configuration}" "libQt5Core.so.5"
# For backward compatibility with CMake < 2.8.12
"IMPORTED_LINK_INTERFACE_LIBRARIES_${Configuration}" "${_Qt5Core_LIB_DEPENDENCIES}"
)
endmacro()
if (NOT TARGET Qt5::Core)
set(_Qt5Core_OWN_INCLUDE_DIRS "${_qt5Core_install_prefix}/include/" "${_qt5Core_install_prefix}/include/QtCore")
set(Qt5Core_PRIVATE_INCLUDE_DIRS "")
include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL)
foreach(_dir ${_Qt5Core_OWN_INCLUDE_DIRS})
_qt5_Core_check_file_exists(${_dir})
endforeach()
# Only check existence of private includes if the Private component is
# specified.
list(FIND Qt5Core_FIND_COMPONENTS Private _check_private)
if (NOT _check_private STREQUAL -1)
foreach(_dir ${Qt5Core_PRIVATE_INCLUDE_DIRS})
_qt5_Core_check_file_exists(${_dir})
endforeach()
endif()
set(Qt5Core_INCLUDE_DIRS ${_Qt5Core_OWN_INCLUDE_DIRS})
set(Qt5Core_DEFINITIONS -DQT_CORE_LIB)
set(Qt5Core_COMPILE_DEFINITIONS QT_CORE_LIB)
set(_Qt5Core_MODULE_DEPENDENCIES "")
set(_Qt5Core_FIND_DEPENDENCIES_REQUIRED)
if (Qt5Core_FIND_REQUIRED)
set(_Qt5Core_FIND_DEPENDENCIES_REQUIRED REQUIRED)
endif()
set(_Qt5Core_FIND_DEPENDENCIES_QUIET)
if (Qt5Core_FIND_QUIETLY)
set(_Qt5Core_DEPENDENCIES_FIND_QUIET QUIET)
endif()
set(_Qt5Core_FIND_VERSION_EXACT)
if (Qt5Core_FIND_VERSION_EXACT)
set(_Qt5Core_FIND_VERSION_EXACT EXACT)
endif()
set(Qt5Core_EXECUTABLE_COMPILE_FLAGS "")
foreach(_module_dep ${_Qt5Core_MODULE_DEPENDENCIES})
if (NOT Qt5${_module_dep}_FOUND)
find_package(Qt5${_module_dep}
5.8.0 ${_Qt5Core_FIND_VERSION_EXACT}
${_Qt5Core_DEPENDENCIES_FIND_QUIET}
${_Qt5Core_FIND_DEPENDENCIES_REQUIRED}
PATHS "${CMAKE_CURRENT_LIST_DIR}/.." NO_DEFAULT_PATH
)
endif()
if (NOT Qt5${_module_dep}_FOUND)
set(Qt5Core_FOUND False)
return()
endif()
list(APPEND Qt5Core_INCLUDE_DIRS "${Qt5${_module_dep}_INCLUDE_DIRS}")
list(APPEND Qt5Core_PRIVATE_INCLUDE_DIRS "${Qt5${_module_dep}_PRIVATE_INCLUDE_DIRS}")
list(APPEND Qt5Core_DEFINITIONS ${Qt5${_module_dep}_DEFINITIONS})
list(APPEND Qt5Core_COMPILE_DEFINITIONS ${Qt5${_module_dep}_COMPILE_DEFINITIONS})
list(APPEND Qt5Core_EXECUTABLE_COMPILE_FLAGS ${Qt5${_module_dep}_EXECUTABLE_COMPILE_FLAGS})
endforeach()
list(REMOVE_DUPLICATES Qt5Core_INCLUDE_DIRS)
list(REMOVE_DUPLICATES Qt5Core_PRIVATE_INCLUDE_DIRS)
list(REMOVE_DUPLICATES Qt5Core_DEFINITIONS)
list(REMOVE_DUPLICATES Qt5Core_COMPILE_DEFINITIONS)
list(REMOVE_DUPLICATES Qt5Core_EXECUTABLE_COMPILE_FLAGS)
set(_Qt5Core_LIB_DEPENDENCIES "")
add_library(Qt5::Core SHARED IMPORTED)
#set_property(TARGET Qt5::Core PROPERTY
# INTERFACE_INCLUDE_DIRECTORIES ${_Qt5Core_OWN_INCLUDE_DIRS})
set_property(TARGET Qt5::Core PROPERTY
INTERFACE_COMPILE_DEFINITIONS QT_CORE_LIB)
_populate_Core_target_properties(RELEASE "libQt5Core.so.5.8.0" "" )
file(GLOB pluginTargets "${CMAKE_CURRENT_LIST_DIR}/Qt5Core_*Plugin.cmake")
macro(_populate_Core_plugin_properties Plugin Configuration PLUGIN_LOCATION)
set_property(TARGET Qt5::${Plugin} APPEND PROPERTY IMPORTED_CONFIGURATIONS ${Configuration})
set(imported_location "${_qt5Core_install_prefix}/plugins/${PLUGIN_LOCATION}")
_qt5_Core_check_file_exists(${imported_location})
set_target_properties(Qt5::${Plugin} PROPERTIES
"IMPORTED_LOCATION_${Configuration}" ${imported_location}
)
endmacro()
if (pluginTargets)
foreach(pluginTarget ${pluginTargets})
include(${pluginTarget})
endforeach()
endif()
include("${CMAKE_CURRENT_LIST_DIR}/Qt5CoreConfigExtras.cmake")
include("${CMAKE_CURRENT_LIST_DIR}/Qt5CoreMacros.cmake")
_qt5_Core_check_file_exists("${CMAKE_CURRENT_LIST_DIR}/Qt5CoreConfigVersion.cmake")
endif()
if (NOT TARGET Qt5::qmake)
add_executable(Qt5::qmake IMPORTED)
set(imported_location "${_qt5Core_install_prefix}/bin/qmake")
_qt5_Core_check_file_exists(${imported_location})
set_target_properties(Qt5::qmake PROPERTIES
IMPORTED_LOCATION ${imported_location}
)
endif()
if (NOT TARGET Qt5::moc)
add_executable(Qt5::moc IMPORTED)
set(imported_location "${_qt5Core_install_prefix}/bin/moc")
_qt5_Core_check_file_exists(${imported_location})
set_target_properties(Qt5::moc PROPERTIES
IMPORTED_LOCATION ${imported_location}
)
# For CMake automoc feature
get_target_property(QT_MOC_EXECUTABLE Qt5::moc LOCATION)
endif()
if (NOT TARGET Qt5::rcc)
add_executable(Qt5::rcc IMPORTED)
set(imported_location "${_qt5Core_install_prefix}/bin/rcc")
_qt5_Core_check_file_exists(${imported_location})
set_target_properties(Qt5::rcc PROPERTIES
IMPORTED_LOCATION ${imported_location}
)
endif()
set(Qt5Core_QMAKE_EXECUTABLE Qt5::qmake)
set(Qt5Core_MOC_EXECUTABLE Qt5::moc)
set(Qt5Core_RCC_EXECUTABLE Qt5::rcc)
set_property(TARGET Qt5::Core PROPERTY INTERFACE_QT_MAJOR_VERSION 5)
set_property(TARGET Qt5::Core PROPERTY INTERFACE_QT_COORD_TYPE double)
set_property(TARGET Qt5::Core APPEND PROPERTY
COMPATIBLE_INTERFACE_STRING QT_MAJOR_VERSION QT_COORD_TYPE
)
include("${CMAKE_CURRENT_LIST_DIR}/Qt5CoreConfigExtrasMkspecDir.cmake")
foreach(_dir ${_qt5_corelib_extra_includes})
_qt5_Core_check_file_exists(${_dir})
endforeach()
list(APPEND Qt5Core_INCLUDE_DIRS ${_qt5_corelib_extra_includes})
#set_property(TARGET Qt5::Core APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${_qt5_corelib_extra_includes})
set(_qt5_corelib_extra_includes)
# Targets using Qt need to use the POSITION_INDEPENDENT_CODE property. The
# Qt5_POSITION_INDEPENDENT_CODE variable is used in the # qt5_use_module
# macro to add it.
set(Qt5_POSITION_INDEPENDENT_CODE True)
# On x86 and x86-64 systems with ELF binaries (especially Linux), due to
# a new optimization in GCC 5.x in combination with a recent version of
# GNU binutils, compiling Qt applications with -fPIE is no longer
# enough.
# Applications now need to be compiled with the -fPIC option if the Qt option
# "reduce relocations" is active. For backward compatibility only, Qt accepts
# the use of -fPIE for GCC 4.x versions.
if (CMAKE_VERSION VERSION_LESS 2.8.12
AND (NOT CMAKE_CXX_COMPILER_ID STREQUAL "GNU"
OR CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.0))
set_property(TARGET Qt5::Core APPEND PROPERTY INTERFACE_POSITION_INDEPENDENT_CODE "ON")
else()
set_property(TARGET Qt5::Core APPEND PROPERTY INTERFACE_COMPILE_OPTIONS -fPIC)
endif()
# Applications using qmake or cmake >= 2.8.12 as their build system will
# adapt automatically. Applications using an older release of cmake in
# combination with GCC 5.x need to change their CMakeLists.txt to add
# Qt5Core_EXECUTABLE_COMPILE_FLAGS to CMAKE_CXX_FLAGS. In particular,
# applications using cmake >= 2.8.9 and < 2.8.11 will continue to build
# with the -fPIE option and invoke the special compatibility mode if using
# GCC 4.x.
set(Qt5Core_EXECUTABLE_COMPILE_FLAGS "")
if (CMAKE_VERSION VERSION_LESS 2.8.12
AND (CMAKE_CXX_COMPILER_ID STREQUAL "GNU"
AND NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.0))
set(Qt5Core_EXECUTABLE_COMPILE_FLAGS "-fPIC")
endif()
set(Qt5_DISABLED_FEATURES
cups
imageformat-jpeg
)
set_property(TARGET Qt5::Core APPEND PROPERTY INTERFACE_COMPILE_DEFINITIONS $<$<NOT:$<CONFIG:Debug>>:QT_NO_DEBUG>)
set_property(TARGET Qt5::Core PROPERTY INTERFACE_COMPILE_FEATURES cxx_decltype)
set(QT_VISIBILITY_AVAILABLE "True")
get_filename_component(_Qt5CoreConfigDir ${CMAKE_CURRENT_LIST_FILE} PATH)
set(_Qt5CTestMacros "${_Qt5CoreConfigDir}/Qt5CTestMacros.cmake")
_qt5_Core_check_file_exists(${_Qt5CTestMacros})
set(_qt5_corelib_extra_includes "${_qt5Core_install_prefix}/external/qt5/src/qt5/qtbase//mkspecs/linux-g++")
set(PACKAGE_VERSION 5.8.0)
if(PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION)
set(PACKAGE_VERSION_COMPATIBLE FALSE)
else()
set(PACKAGE_VERSION_COMPATIBLE TRUE)
if(PACKAGE_FIND_VERSION STREQUAL PACKAGE_VERSION)
set(PACKAGE_VERSION_EXACT TRUE)
endif()
endif()
#=============================================================================
# Copyright 2005-2011 Kitware, Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
# * Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
#
# * Neither the name of Kitware, Inc. nor the names of its
# contributors may be used to endorse or promote products derived
# from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
# HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#=============================================================================
######################################
#
# Macros for building Qt files
#
######################################
include(CMakeParseArguments)
# macro used to create the names of output files preserving relative dirs
macro(QT5_MAKE_OUTPUT_FILE infile prefix ext outfile )
string(LENGTH ${CMAKE_CURRENT_BINARY_DIR} _binlength)
string(LENGTH ${infile} _infileLength)
set(_checkinfile ${CMAKE_CURRENT_SOURCE_DIR})
if(_infileLength GREATER _binlength)
string(SUBSTRING "${infile}" 0 ${_binlength} _checkinfile)
if(_checkinfile STREQUAL "${CMAKE_CURRENT_BINARY_DIR}")
file(RELATIVE_PATH rel ${CMAKE_CURRENT_BINARY_DIR} ${infile})
else()
file(RELATIVE_PATH rel ${CMAKE_CURRENT_SOURCE_DIR} ${infile})
endif()
else()
file(RELATIVE_PATH rel ${CMAKE_CURRENT_SOURCE_DIR} ${infile})
endif()
if(WIN32 AND rel MATCHES "^([a-zA-Z]):(.*)$") # absolute path
set(rel "${CMAKE_MATCH_1}_${CMAKE_MATCH_2}")
endif()
set(_outfile "${CMAKE_CURRENT_BINARY_DIR}/${rel}")
string(REPLACE ".." "__" _outfile ${_outfile})
get_filename_component(outpath ${_outfile} PATH)
get_filename_component(_outfile ${_outfile} NAME_WE)
file(MAKE_DIRECTORY ${outpath})
set(${outfile} ${outpath}/${prefix}${_outfile}.${ext})
endmacro()
macro(QT5_GET_MOC_FLAGS _moc_flags)
set(${_moc_flags})
get_directory_property(_inc_DIRS INCLUDE_DIRECTORIES)
if(CMAKE_INCLUDE_CURRENT_DIR)
list(APPEND _inc_DIRS ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
endif()
foreach(_current ${_inc_DIRS})
if("${_current}" MATCHES "\\.framework/?$")
string(REGEX REPLACE "/[^/]+\\.framework" "" framework_path "${_current}")
set(${_moc_flags} ${${_moc_flags}} "-F${framework_path}")
else()
set(${_moc_flags} ${${_moc_flags}} "-I${_current}")
endif()
endforeach()
get_directory_property(_defines COMPILE_DEFINITIONS)
foreach(_current ${_defines})
set(${_moc_flags} ${${_moc_flags}} "-D${_current}")
endforeach()
if(WIN32)
set(${_moc_flags} ${${_moc_flags}} -DWIN32)
endif()
endmacro()
# helper macro to set up a moc rule
function(QT5_CREATE_MOC_COMMAND infile outfile moc_flags moc_options moc_target moc_depends)
# Pass the parameters in a file. Set the working directory to
# be that containing the parameters file and reference it by
# just the file name. This is necessary because the moc tool on
# MinGW builds does not seem to handle spaces in the path to the
# file given with the @ syntax.
get_filename_component(_moc_outfile_name "${outfile}" NAME)
get_filename_component(_moc_outfile_dir "${outfile}" PATH)
if(_moc_outfile_dir)
set(_moc_working_dir WORKING_DIRECTORY ${_moc_outfile_dir})
endif()
set (_moc_parameters_file ${outfile}_parameters)
set (_moc_parameters ${moc_flags} ${moc_options} -o "${outfile}" "${infile}")
string (REPLACE ";" "\n" _moc_parameters "${_moc_parameters}")
if(moc_target)
set(_moc_parameters_file ${_moc_parameters_file}$<$<BOOL:$<CONFIGURATION>>:_$<CONFIGURATION>>)
set(targetincludes "$<TARGET_PROPERTY:${moc_target},INCLUDE_DIRECTORIES>")
set(targetdefines "$<TARGET_PROPERTY:${moc_target},COMPILE_DEFINITIONS>")
set(targetincludes "$<$<BOOL:${targetincludes}>:-I$<JOIN:${targetincludes},\n-I>\n>")
set(targetdefines "$<$<BOOL:${targetdefines}>:-D$<JOIN:${targetdefines},\n-D>\n>")
file (GENERATE
OUTPUT ${_moc_parameters_file}
CONTENT "${targetdefines}${targetincludes}${_moc_parameters}\n"
)
set(targetincludes)
set(targetdefines)
else()
file(WRITE ${_moc_parameters_file} "${_moc_parameters}\n")
endif()
set(_moc_extra_parameters_file @${_moc_parameters_file})
add_custom_command(OUTPUT ${outfile}
COMMAND ${Qt5Core_MOC_EXECUTABLE} ${_moc_extra_parameters_file}
DEPENDS ${infile} ${moc_depends}
${_moc_working_dir}
VERBATIM)
endfunction()
function(QT5_GENERATE_MOC infile outfile )
# get include dirs and flags
qt5_get_moc_flags(moc_flags)
get_filename_component(abs_infile ${infile} ABSOLUTE)
set(_outfile "${outfile}")
if(NOT IS_ABSOLUTE "${outfile}")
set(_outfile "${CMAKE_CURRENT_BINARY_DIR}/${outfile}")
endif()
if ("x${ARGV2}" STREQUAL "xTARGET")
if (CMAKE_VERSION VERSION_LESS 2.8.12)
message(FATAL_ERROR "The TARGET parameter to qt5_generate_moc is only available when using CMake 2.8.12 or later.")
endif()
set(moc_target ${ARGV3})
endif()
qt5_create_moc_command(${abs_infile} ${_outfile} "${moc_flags}" "" "${moc_target}" "")
set_source_files_properties(${outfile} PROPERTIES SKIP_AUTOMOC TRUE) # dont run automoc on this file
endfunction()
# qt5_wrap_cpp(outfiles inputfile ... )
function(QT5_WRAP_CPP outfiles )
# get include dirs
qt5_get_moc_flags(moc_flags)
set(options)
set(oneValueArgs TARGET)
set(multiValueArgs OPTIONS DEPENDS)
cmake_parse_arguments(_WRAP_CPP "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
set(moc_files ${_WRAP_CPP_UNPARSED_ARGUMENTS})
set(moc_options ${_WRAP_CPP_OPTIONS})
set(moc_target ${_WRAP_CPP_TARGET})
set(moc_depends ${_WRAP_CPP_DEPENDS})
if (moc_target AND CMAKE_VERSION VERSION_LESS 2.8.12)
message(FATAL_ERROR "The TARGET parameter to qt5_wrap_cpp is only available when using CMake 2.8.12 or later.")
endif()
foreach(it ${moc_files})
get_filename_component(it ${it} ABSOLUTE)
qt5_make_output_file(${it} moc_ cpp outfile)
qt5_create_moc_command(${it} ${outfile} "${moc_flags}" "${moc_options}" "${moc_target}" "${moc_depends}")
list(APPEND ${outfiles} ${outfile})
endforeach()
set(${outfiles} ${${outfiles}} PARENT_SCOPE)
endfunction()
# _qt5_parse_qrc_file(infile _out_depends _rc_depends)
# internal
function(_QT5_PARSE_QRC_FILE infile _out_depends _rc_depends)
get_filename_component(rc_path ${infile} PATH)
if(EXISTS "${infile}")
# parse file for dependencies
# all files are absolute paths or relative to the location of the qrc file
file(READ "${infile}" RC_FILE_CONTENTS)
string(REGEX MATCHALL "<file[^<]+" RC_FILES "${RC_FILE_CONTENTS}")
foreach(RC_FILE ${RC_FILES})
string(REGEX REPLACE "^<file[^>]*>" "" RC_FILE "${RC_FILE}")
if(NOT IS_ABSOLUTE "${RC_FILE}")
set(RC_FILE "${rc_path}/${RC_FILE}")
endif()
set(RC_DEPENDS ${RC_DEPENDS} "${RC_FILE}")
endforeach()
# Since this cmake macro is doing the dependency scanning for these files,
# let's make a configured file and add it as a dependency so cmake is run
# again when dependencies need to be recomputed.
qt5_make_output_file("${infile}" "" "qrc.depends" out_depends)
configure_file("${infile}" "${out_depends}" COPYONLY)
else()
# The .qrc file does not exist (yet). Let's add a dependency and hope
# that it will be generated later
set(out_depends)
endif()
set(${_out_depends} ${out_depends} PARENT_SCOPE)
set(${_rc_depends} ${RC_DEPENDS} PARENT_SCOPE)
endfunction()
# qt5_add_binary_resources(target inputfiles ... )
function(QT5_ADD_BINARY_RESOURCES target )
set(options)
set(oneValueArgs DESTINATION)
set(multiValueArgs OPTIONS)
cmake_parse_arguments(_RCC "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
set(rcc_files ${_RCC_UNPARSED_ARGUMENTS})
set(rcc_options ${_RCC_OPTIONS})
set(rcc_destination ${_RCC_DESTINATION})
if(NOT rcc_destination)
set(rcc_destination ${CMAKE_CURRENT_BINARY_DIR}/${target}.rcc)
endif()
foreach(it ${rcc_files})
get_filename_component(infile ${it} ABSOLUTE)
_QT5_PARSE_QRC_FILE(${infile} _out_depends _rc_depends)
set(infiles ${infiles} ${infile})
set(out_depends ${out_depends} ${_out_depends})
set(rc_depends ${rc_depends} ${_rc_depends})
endforeach()
add_custom_command(OUTPUT ${rcc_destination}
COMMAND ${Qt5Core_RCC_EXECUTABLE}
ARGS ${rcc_options} --binary --name ${target} --output ${rcc_destination} ${infiles}
DEPENDS ${rc_depends} ${out_depends} VERBATIM)
add_custom_target(${target} ALL DEPENDS ${rcc_destination})
endfunction()
# qt5_add_resources(outfiles inputfile ... )
function(QT5_ADD_RESOURCES outfiles )
set(options)
set(oneValueArgs)
set(multiValueArgs OPTIONS)
cmake_parse_arguments(_RCC "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
set(rcc_files ${_RCC_UNPARSED_ARGUMENTS})
set(rcc_options ${_RCC_OPTIONS})
if("${rcc_options}" MATCHES "-binary")
message(WARNING "Use qt5_add_binary_resources for binary option")
endif()
foreach(it ${rcc_files})
get_filename_component(outfilename ${it} NAME_WE)
get_filename_component(infile ${it} ABSOLUTE)
set(outfile ${CMAKE_CURRENT_BINARY_DIR}/qrc_${outfilename}.cpp)
_QT5_PARSE_QRC_FILE(${infile} _out_depends _rc_depends)
add_custom_command(OUTPUT ${outfile}
COMMAND ${Qt5Core_RCC_EXECUTABLE}
ARGS ${rcc_options} --name ${outfilename} --output ${outfile} ${infile}
MAIN_DEPENDENCY ${infile}
DEPENDS ${_rc_depends} "${out_depends}" VERBATIM)
list(APPEND ${outfiles} ${outfile})
endforeach()
set(${outfiles} ${${outfiles}} PARENT_SCOPE)
endfunction()
set(_Qt5_COMPONENT_PATH "${CMAKE_CURRENT_LIST_DIR}/..")
if (NOT CMAKE_VERSION VERSION_LESS 2.8.9)
macro(qt5_use_modules _target _link_type)
if(NOT CMAKE_MINIMUM_REQUIRED_VERSION VERSION_LESS 2.8.11)
if(CMAKE_WARN_DEPRECATED)
set(messageType WARNING)
endif()
if(CMAKE_ERROR_DEPRECATED)
set(messageType FATAL_ERROR)
endif()
if(messageType)
message(${messageType} "The qt5_use_modules macro is obsolete. Use target_link_libraries with IMPORTED targets instead.")
endif()
endif()
if (NOT TARGET ${_target})
message(FATAL_ERROR "The first argument to qt5_use_modules must be an existing target.")
endif()
if ("${_link_type}" STREQUAL "LINK_PUBLIC" OR "${_link_type}" STREQUAL "LINK_PRIVATE" )
set(_qt5_modules ${ARGN})
set(_qt5_link_type ${_link_type})
else()
set(_qt5_modules ${_link_type} ${ARGN})
endif()
if ("${_qt5_modules}" STREQUAL "")
message(FATAL_ERROR "qt5_use_modules requires at least one Qt module to use.")
endif()
foreach(_module ${_qt5_modules})
if (NOT Qt5${_module}_FOUND)
find_package(Qt5${_module} PATHS "${_Qt5_COMPONENT_PATH}" NO_DEFAULT_PATH)
if (NOT Qt5${_module}_FOUND)
message(FATAL_ERROR "Can not use \"${_module}\" module which has not yet been found.")
endif()
endif()
#target_link_libraries(${_target} ${_qt5_link_type} ${Qt5${_module}_LIBRARIES})
set_property(TARGET ${_target} APPEND PROPERTY INCLUDE_DIRECTORIES ${Qt5${_module}_INCLUDE_DIRS})
set_property(TARGET ${_target} APPEND PROPERTY COMPILE_DEFINITIONS ${Qt5${_module}_COMPILE_DEFINITIONS})
set_property(TARGET ${_target} APPEND PROPERTY COMPILE_DEFINITIONS_RELEASE QT_NO_DEBUG)
set_property(TARGET ${_target} APPEND PROPERTY COMPILE_DEFINITIONS_RELWITHDEBINFO QT_NO_DEBUG)
set_property(TARGET ${_target} APPEND PROPERTY COMPILE_DEFINITIONS_MINSIZEREL QT_NO_DEBUG)
if (Qt5_POSITION_INDEPENDENT_CODE
AND (CMAKE_VERSION VERSION_LESS 2.8.12
AND (NOT CMAKE_CXX_COMPILER_ID STREQUAL "GNU"
OR CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.0)))
set_property(TARGET ${_target} PROPERTY POSITION_INDEPENDENT_CODE ${Qt5_POSITION_INDEPENDENT_CODE})
endif()
endforeach()
endmacro()
endif()
if (CMAKE_VERSION VERSION_LESS 2.8.3)
message(FATAL_ERROR "Qt 5 requires at least CMake version 2.8.3")
endif()
get_filename_component(_qt5Gui_install_prefix "${FAST_EXTERNAL_INSTALL_DIR}" ABSOLUTE)
# For backwards compatibility only. Use Qt5Gui_VERSION instead.
set(Qt5Gui_VERSION_STRING 5.8.0)
set(Qt5Gui_LIBRARIES Qt5::Gui)
macro(_qt5_Gui_check_file_exists file)
#if(NOT EXISTS "${file}" )
# message(FATAL_ERROR "The imported target \"Qt5::Gui\" references the file
#\"${file}\"
#but this file does not exist. Possible reasons include:
#* The file was deleted, renamed, or moved to another location.
#* An install or uninstall procedure did not complete successfully.
#* The installation package was faulty and contained
# \"${CMAKE_CURRENT_LIST_FILE}\"
#but not all the files it references.
#")
# endif()
endmacro()
macro(_populate_Gui_target_properties Configuration LIB_LOCATION IMPLIB_LOCATION)
set_property(TARGET Qt5::Gui APPEND PROPERTY IMPORTED_CONFIGURATIONS ${Configuration})
set(imported_location "${_qt5Gui_install_prefix}/lib/${LIB_LOCATION}")
_qt5_Gui_check_file_exists(${imported_location})
set_target_properties(Qt5::Gui PROPERTIES
"INTERFACE_LINK_LIBRARIES" "${_Qt5Gui_LIB_DEPENDENCIES}"
"IMPORTED_LOCATION_${Configuration}" ${imported_location}
"IMPORTED_SONAME_${Configuration}" "libQt5Gui.so.5"
# For backward compatibility with CMake < 2.8.12
"IMPORTED_LINK_INTERFACE_LIBRARIES_${Configuration}" "${_Qt5Gui_LIB_DEPENDENCIES}"
)
endmacro()
if (NOT TARGET Qt5::Gui)
set(_Qt5Gui_OWN_INCLUDE_DIRS "${_qt5Gui_install_prefix}/include/" "${_qt5Gui_install_prefix}/include/QtGui")
set(Qt5Gui_PRIVATE_INCLUDE_DIRS "")
include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL)
#foreach(_dir ${_Qt5Gui_OWN_INCLUDE_DIRS})
# _qt5_Gui_check_file_exists(${_dir})
#endforeach()
# Only check existence of private includes if the Private component is
# specified.
list(FIND Qt5Gui_FIND_COMPONENTS Private _check_private)
if (NOT _check_private STREQUAL -1)
foreach(_dir ${Qt5Gui_PRIVATE_INCLUDE_DIRS})
_qt5_Gui_check_file_exists(${_dir})
endforeach()
endif()
set(Qt5Gui_INCLUDE_DIRS ${_Qt5Gui_OWN_INCLUDE_DIRS})
set(Qt5Gui_DEFINITIONS -DQT_GUI_LIB)
set(Qt5Gui_COMPILE_DEFINITIONS QT_GUI_LIB)
set(_Qt5Gui_MODULE_DEPENDENCIES "Core")
set(_Qt5Gui_FIND_DEPENDENCIES_REQUIRED)
if (Qt5Gui_FIND_REQUIRED)
set(_Qt5Gui_FIND_DEPENDENCIES_REQUIRED REQUIRED)
endif()
set(_Qt5Gui_FIND_DEPENDENCIES_QUIET)
if (Qt5Gui_FIND_QUIETLY)
set(_Qt5Gui_DEPENDENCIES_FIND_QUIET QUIET)
endif()
set(_Qt5Gui_FIND_VERSION_EXACT)
if (Qt5Gui_FIND_VERSION_EXACT)
set(_Qt5Gui_FIND_VERSION_EXACT EXACT)
endif()
set(Qt5Gui_EXECUTABLE_COMPILE_FLAGS "")
foreach(_module_dep ${_Qt5Gui_MODULE_DEPENDENCIES})
if (NOT Qt5${_module_dep}_FOUND)
find_package(Qt5${_module_dep}
5.8.0 ${_Qt5Gui_FIND_VERSION_EXACT}
${_Qt5Gui_DEPENDENCIES_FIND_QUIET}
${_Qt5Gui_FIND_DEPENDENCIES_REQUIRED}
PATHS "${CMAKE_CURRENT_LIST_DIR}/.." NO_DEFAULT_PATH
)
endif()
if (NOT Qt5${_module_dep}_FOUND)
set(Qt5Gui_FOUND False)
return()
endif()
list(APPEND Qt5Gui_INCLUDE_DIRS "${Qt5${_module_dep}_INCLUDE_DIRS}")
list(APPEND Qt5Gui_PRIVATE_INCLUDE_DIRS "${Qt5${_module_dep}_PRIVATE_INCLUDE_DIRS}")
list(APPEND Qt5Gui_DEFINITIONS ${Qt5${_module_dep}_DEFINITIONS})
list(APPEND Qt5Gui_COMPILE_DEFINITIONS ${Qt5${_module_dep}_COMPILE_DEFINITIONS})
list(APPEND Qt5Gui_EXECUTABLE_COMPILE_FLAGS ${Qt5${_module_dep}_EXECUTABLE_COMPILE_FLAGS})
endforeach()
list(REMOVE_DUPLICATES Qt5Gui_INCLUDE_DIRS)
list(REMOVE_DUPLICATES Qt5Gui_PRIVATE_INCLUDE_DIRS)
list(REMOVE_DUPLICATES Qt5Gui_DEFINITIONS)
list(REMOVE_DUPLICATES Qt5Gui_COMPILE_DEFINITIONS)
list(REMOVE_DUPLICATES Qt5Gui_EXECUTABLE_COMPILE_FLAGS)
set(_Qt5Gui_LIB_DEPENDENCIES "Qt5::Core")
add_library(Qt5::Gui SHARED IMPORTED)
#set_property(TARGET Qt5::Gui PROPERTY
# INTERFACE_INCLUDE_DIRECTORIES ${_Qt5Gui_OWN_INCLUDE_DIRS})
set_property(TARGET Qt5::Gui PROPERTY
INTERFACE_COMPILE_DEFINITIONS QT_GUI_LIB)
_populate_Gui_target_properties(RELEASE "libQt5Gui.so.5.8.0" "" )
file(GLOB pluginTargets "${CMAKE_CURRENT_LIST_DIR}/Qt5Gui_*Plugin.cmake")
macro(_populate_Gui_plugin_properties Plugin Configuration PLUGIN_LOCATION)
set_property(TARGET Qt5::${Plugin} APPEND PROPERTY IMPORTED_CONFIGURATIONS ${Configuration})
set(imported_location "${_qt5Gui_install_prefix}/plugins/${PLUGIN_LOCATION}")
_qt5_Gui_check_file_exists(${imported_location})
set_target_properties(Qt5::${Plugin} PROPERTIES
"IMPORTED_LOCATION_${Configuration}" ${imported_location}
)
endmacro()
if (pluginTargets)
foreach(pluginTarget ${pluginTargets})
include(${pluginTarget})
endforeach()
endif()
include("${CMAKE_CURRENT_LIST_DIR}/Qt5GuiConfigExtras.cmake")
_qt5_Gui_check_file_exists("${CMAKE_CURRENT_LIST_DIR}/Qt5GuiConfigVersion.cmake")
endif()
set(_GL_INCDIRS "/usr/include/libdrm")
find_path(_qt5gui_OPENGL_INCLUDE_DIR GL/gl.h
PATHS ${_GL_INCDIRS}
)
#if (NOT _qt5gui_OPENGL_INCLUDE_DIR)
# message(FATAL_ERROR "Failed to find \"GL/gl.h\" in \"${_GL_INCDIRS}\".")
#endif()
unset(_GL_INCDIRS)
# Don't check for existence of the _qt5gui_OPENGL_INCLUDE_DIR because it is
# optional.
#list(APPEND Qt5Gui_INCLUDE_DIRS ${_qt5gui_OPENGL_INCLUDE_DIR})
#set_property(TARGET Qt5::Gui APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${_qt5gui_OPENGL_INCLUDE_DIR})
unset(_qt5gui_OPENGL_INCLUDE_DIR CACHE)
macro(_qt5gui_find_extra_libs Name Libs LibDir IncDirs)
set(Qt5Gui_${Name}_LIBRARIES)
set(Qt5Gui_${Name}_INCLUDE_DIRS ${IncDirs})
foreach(_lib ${Libs})
string(REGEX REPLACE [^_A-Za-z0-9] _ _cmake_lib_name ${_lib})
if (NOT TARGET Qt5::Gui_${_cmake_lib_name} AND NOT _Qt5Gui_${_cmake_lib_name}_LIBRARY_DONE)
find_library(Qt5Gui_${_cmake_lib_name}_LIBRARY ${_lib}
)
if (NOT Qt5Gui_${_cmake_lib_name}_LIBRARY)
# The above find_library call doesn't work for finding
# libraries in Windows SDK paths outside of the proper
# environment, even if the libraries are present. In other
# cases it is OK for the libraries to not be found
# because they are optional dependencies of Qt5Gui, needed
# only if the qopengl.h header is used.
# We try to find the libraries in the first place because Qt may be
# compiled with another set of GL libraries (such as coming
# from ANGLE). The point of these find calls is to try to
# find the same binaries as Qt is compiled with (as they are
# in the interface of QtGui), so an effort is made to do so
# above with paths known to qmake.
set(_Qt5Gui_${_cmake_lib_name}_LIBRARY_DONE TRUE)
unset(Qt5Gui_${_cmake_lib_name}_LIBRARY CACHE)
else()
add_library(Qt5::Gui_${_cmake_lib_name} SHARED IMPORTED)
#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}")
set_property(TARGET Qt5::Gui_${_cmake_lib_name} PROPERTY IMPORTED_LOCATION_RELEASE "${Qt5Gui_${_cmake_lib_name}_LIBRARY}")
unset(Qt5Gui_${_cmake_lib_name}_LIBRARY CACHE)
find_library(Qt5Gui_${_cmake_lib_name}_LIBRARY_DEBUG ${_lib}d
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}")
endif()
unset(Qt5Gui_${_cmake_lib_name}_LIBRARY_DEBUG CACHE)
list(APPEND Qt5Gui_${Name}_LIBRARIES Qt5::Gui_${_cmake_lib_name})
endif()
endif()
endforeach()
endmacro()
_qt5gui_find_extra_libs(EGL "EGL" "" "/usr/include/libdrm")
_qt5gui_find_extra_libs(OPENGL "GL" "" "/usr/include/libdrm")
set(Qt5Gui_OPENGL_IMPLEMENTATION GL)
get_target_property(_configs Qt5::Gui IMPORTED_CONFIGURATIONS)
foreach(_config ${_configs})
set_property(TARGET Qt5::Gui APPEND PROPERTY
IMPORTED_LINK_DEPENDENT_LIBRARIES_${_config}
${Qt5Gui_EGL_LIBRARIES} ${Qt5Gui_OPENGL_LIBRARIES}
)
endforeach()
unset(_configs)
set(PACKAGE_VERSION 5.8.0)
if(PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION)
set(PACKAGE_VERSION_COMPATIBLE FALSE)
else()
set(PACKAGE_VERSION_COMPATIBLE TRUE)
if(PACKAGE_FIND_VERSION STREQUAL PACKAGE_VERSION)
set(PACKAGE_VERSION_EXACT TRUE)
endif()
endif()
if (CMAKE_VERSION VERSION_LESS 2.8.3)
message(FATAL_ERROR "Qt 5 requires at least CMake version 2.8.3")
endif()
get_filename_component(_qt5Multimedia_install_prefix "${CMAKE_CURRENT_LIST_DIR}/../../../" ABSOLUTE)
# For backwards compatibility only. Use Qt5Multimedia_VERSION instead.
set(Qt5Multimedia_VERSION_STRING 5.8.0)
set(Qt5Multimedia_LIBRARIES Qt5::Multimedia)
macro(_qt5_Multimedia_check_file_exists file)
if(NOT EXISTS "${file}" )
# message(FATAL_ERROR "The imported target \"Qt5::Multimedia\" references the file
# \"${file}\"
#but this file does not exist. Possible reasons include:
#* The file was deleted, renamed, or moved to another location.
#* An install or uninstall procedure did not complete successfully.
#* The installation package was faulty and contained
# \"${CMAKE_CURRENT_LIST_FILE}\"
#but not all the files it references.
#")
endif()
endmacro()
macro(_populate_Multimedia_target_properties Configuration LIB_LOCATION IMPLIB_LOCATION)
set_property(TARGET Qt5::Multimedia APPEND PROPERTY IMPORTED_CONFIGURATIONS ${Configuration})
set(imported_location "${_qt5Multimedia_install_prefix}/lib/${LIB_LOCATION}")
_qt5_Multimedia_check_file_exists(${imported_location})
set_target_properties(Qt5::Multimedia PROPERTIES
"INTERFACE_LINK_LIBRARIES" "${_Qt5Multimedia_LIB_DEPENDENCIES}"
"IMPORTED_LOCATION_${Configuration}" ${imported_location}
"IMPORTED_SONAME_${Configuration}" "libQt5Multimedia.so.5"
# For backward compatibility with CMake < 2.8.12
"IMPORTED_LINK_INTERFACE_LIBRARIES_${Configuration}" "${_Qt5Multimedia_LIB_DEPENDENCIES}"
)
endmacro()
if (NOT TARGET Qt5::Multimedia)
set(_Qt5Multimedia_OWN_INCLUDE_DIRS "${_qt5Multimedia_install_prefix}/include/" "${_qt5Multimedia_install_prefix}/include/QtMultimedia")
set(Qt5Multimedia_PRIVATE_INCLUDE_DIRS "")
include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL)
foreach(_dir ${_Qt5Multimedia_OWN_INCLUDE_DIRS})
_qt5_Multimedia_check_file_exists(${_dir})
endforeach()
# Only check existence of private includes if the Private component is
# specified.
list(FIND Qt5Multimedia_FIND_COMPONENTS Private _check_private)
if (NOT _check_private STREQUAL -1)
foreach(_dir ${Qt5Multimedia_PRIVATE_INCLUDE_DIRS})
_qt5_Multimedia_check_file_exists(${_dir})
endforeach()
endif()
set(Qt5Multimedia_INCLUDE_DIRS ${_Qt5Multimedia_OWN_INCLUDE_DIRS})
set(Qt5Multimedia_DEFINITIONS -DQT_MULTIMEDIA_LIB)
set(Qt5Multimedia_COMPILE_DEFINITIONS QT_MULTIMEDIA_LIB)
set(_Qt5Multimedia_MODULE_DEPENDENCIES "Network;Gui;Core")
set(_Qt5Multimedia_FIND_DEPENDENCIES_REQUIRED)
if (Qt5Multimedia_FIND_REQUIRED)
set(_Qt5Multimedia_FIND_DEPENDENCIES_REQUIRED REQUIRED)
endif()
set(_Qt5Multimedia_FIND_DEPENDENCIES_QUIET)
if (Qt5Multimedia_FIND_QUIETLY)
set(_Qt5Multimedia_DEPENDENCIES_FIND_QUIET QUIET)
endif()
set(_Qt5Multimedia_FIND_VERSION_EXACT)
if (Qt5Multimedia_FIND_VERSION_EXACT)
set(_Qt5Multimedia_FIND_VERSION_EXACT EXACT)
endif()
set(Qt5Multimedia_EXECUTABLE_COMPILE_FLAGS "")
foreach(_module_dep ${_Qt5Multimedia_MODULE_DEPENDENCIES})
if (NOT Qt5${_module_dep}_FOUND)
find_package(Qt5${_module_dep}
5.8.0 ${_Qt5Multimedia_FIND_VERSION_EXACT}
${_Qt5Multimedia_DEPENDENCIES_FIND_QUIET}
${_Qt5Multimedia_FIND_DEPENDENCIES_REQUIRED}
PATHS "${CMAKE_CURRENT_LIST_DIR}/.." NO_DEFAULT_PATH
)
endif()
if (NOT Qt5${_module_dep}_FOUND)
set(Qt5Multimedia_FOUND False)
return()
endif()
list(APPEND Qt5Multimedia_INCLUDE_DIRS "${Qt5${_module_dep}_INCLUDE_DIRS}")
list(APPEND Qt5Multimedia_PRIVATE_INCLUDE_DIRS "${Qt5${_module_dep}_PRIVATE_INCLUDE_DIRS}")
list(APPEND Qt5Multimedia_DEFINITIONS ${Qt5${_module_dep}_DEFINITIONS})
list(APPEND Qt5Multimedia_COMPILE_DEFINITIONS ${Qt5${_module_dep}_COMPILE_DEFINITIONS})
list(APPEND Qt5Multimedia_EXECUTABLE_COMPILE_FLAGS ${Qt5${_module_dep}_EXECUTABLE_COMPILE_FLAGS})
endforeach()
list(REMOVE_DUPLICATES Qt5Multimedia_INCLUDE_DIRS)
list(REMOVE_DUPLICATES Qt5Multimedia_PRIVATE_INCLUDE_DIRS)
list(REMOVE_DUPLICATES Qt5Multimedia_DEFINITIONS)
list(REMOVE_DUPLICATES Qt5Multimedia_COMPILE_DEFINITIONS)
list(REMOVE_DUPLICATES Qt5Multimedia_EXECUTABLE_COMPILE_FLAGS)
set(_Qt5Multimedia_LIB_DEPENDENCIES "Qt5::Network;Qt5::Gui;Qt5::Core")
add_library(Qt5::Multimedia SHARED IMPORTED)
#set_property(TARGET Qt5::Multimedia PROPERTY
# INTERFACE_INCLUDE_DIRECTORIES ${_Qt5Multimedia_OWN_INCLUDE_DIRS})
set_property(TARGET Qt5::Multimedia PROPERTY
INTERFACE_COMPILE_DEFINITIONS QT_MULTIMEDIA_LIB)
_populate_Multimedia_target_properties(RELEASE "libQt5Multimedia.so.5.8.0" "" )
file(GLOB pluginTargets "${CMAKE_CURRENT_LIST_DIR}/Qt5Multimedia_*Plugin.cmake")
macro(_populate_Multimedia_plugin_properties Plugin Configuration PLUGIN_LOCATION)
set_property(TARGET Qt5::${Plugin} APPEND PROPERTY IMPORTED_CONFIGURATIONS ${Configuration})
set(imported_location "${_qt5Multimedia_install_prefix}/plugins/${PLUGIN_LOCATION}")
_qt5_Multimedia_check_file_exists(${imported_location})
set_target_properties(Qt5::${Plugin} PROPERTIES
"IMPORTED_LOCATION_${Configuration}" ${imported_location}
)
endmacro()
if (pluginTargets)
foreach(pluginTarget ${pluginTargets})
include(${pluginTarget})
endforeach()
endif()
_qt5_Multimedia_check_file_exists("${CMAKE_CURRENT_LIST_DIR}/Qt5MultimediaConfigVersion.cmake")
endif()
set(PACKAGE_VERSION 5.8.0)
if(PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION)
set(PACKAGE_VERSION_COMPATIBLE FALSE)
else()
set(PACKAGE_VERSION_COMPATIBLE TRUE)
if(PACKAGE_FIND_VERSION STREQUAL PACKAGE_VERSION)
set(PACKAGE_VERSION_EXACT TRUE)
endif()
endif()
add_library(Qt5::AudioCaptureServicePlugin MODULE IMPORTED)
_populate_Multimedia_plugin_properties(AudioCaptureServicePlugin RELEASE "mediaservice/libqtmedia_audioengine.so")
list(APPEND Qt5Multimedia_PLUGINS Qt5::AudioCaptureServicePlugin)
add_library(Qt5::QM3uPlaylistPlugin MODULE IMPORTED)
_populate_Multimedia_plugin_properties(QM3uPlaylistPlugin RELEASE "playlistformats/libqtmultimedia_m3u.so")
list(APPEND Qt5Multimedia_PLUGINS Qt5::QM3uPlaylistPlugin)
if (CMAKE_VERSION VERSION_LESS 2.8.3)
message(FATAL_ERROR "Qt 5 requires at least CMake version 2.8.3")
endif()
get_filename_component(_qt5MultimediaWidgets_install_prefix "${CMAKE_CURRENT_LIST_DIR}/../../../" ABSOLUTE)
# For backwards compatibility only. Use Qt5MultimediaWidgets_VERSION instead.
set(Qt5MultimediaWidgets_VERSION_STRING 5.8.0)
set(Qt5MultimediaWidgets_LIBRARIES Qt5::MultimediaWidgets)
macro(_qt5_MultimediaWidgets_check_file_exists file)
if(NOT EXISTS "${file}" )
# message(FATAL_ERROR "The imported target \"Qt5::MultimediaWidgets\" references the file
# \"${file}\"
#but this file does not exist. Possible reasons include:
#* The file was deleted, renamed, or moved to another location.
#* An install or uninstall procedure did not complete successfully.
#* The installation package was faulty and contained
# \"${CMAKE_CURRENT_LIST_FILE}\"
#but not all the files it references.
#")
endif()
endmacro()
macro(_populate_MultimediaWidgets_target_properties Configuration LIB_LOCATION IMPLIB_LOCATION)
set_property(TARGET Qt5::MultimediaWidgets APPEND PROPERTY IMPORTED_CONFIGURATIONS ${Configuration})
set(imported_location "${_qt5MultimediaWidgets_install_prefix}/lib/${LIB_LOCATION}")
_qt5_MultimediaWidgets_check_file_exists(${imported_location})
set_target_properties(Qt5::MultimediaWidgets PROPERTIES
"INTERFACE_LINK_LIBRARIES" "${_Qt5MultimediaWidgets_LIB_DEPENDENCIES}"
"IMPORTED_LOCATION_${Configuration}" ${imported_location}
"IMPORTED_SONAME_${Configuration}" "libQt5MultimediaWidgets.so.5"
# For backward compatibility with CMake < 2.8.12
"IMPORTED_LINK_INTERFACE_LIBRARIES_${Configuration}" "${_Qt5MultimediaWidgets_LIB_DEPENDENCIES}"
)
endmacro()
if (NOT TARGET Qt5::MultimediaWidgets)
set(_Qt5MultimediaWidgets_OWN_INCLUDE_DIRS "${_qt5MultimediaWidgets_install_prefix}/include/" "${_qt5MultimediaWidgets_install_prefix}/include/QtMultimediaWidgets")
set(Qt5MultimediaWidgets_PRIVATE_INCLUDE_DIRS "")
include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL)
foreach(_dir ${_Qt5MultimediaWidgets_OWN_INCLUDE_DIRS})
_qt5_MultimediaWidgets_check_file_exists(${_dir})
endforeach()
# Only check existence of private includes if the Private component is
# specified.
list(FIND Qt5MultimediaWidgets_FIND_COMPONENTS Private _check_private)
if (NOT _check_private STREQUAL -1)
foreach(_dir ${Qt5MultimediaWidgets_PRIVATE_INCLUDE_DIRS})
_qt5_MultimediaWidgets_check_file_exists(${_dir})
endforeach()
endif()
set(Qt5MultimediaWidgets_INCLUDE_DIRS ${_Qt5MultimediaWidgets_OWN_INCLUDE_DIRS})
set(Qt5MultimediaWidgets_DEFINITIONS -DQT_MULTIMEDIAWIDGETS_LIB)
set(Qt5MultimediaWidgets_COMPILE_DEFINITIONS QT_MULTIMEDIAWIDGETS_LIB)
set(_Qt5MultimediaWidgets_MODULE_DEPENDENCIES "Multimedia;Widgets;Gui;Core")
set(_Qt5MultimediaWidgets_FIND_DEPENDENCIES_REQUIRED)
if (Qt5MultimediaWidgets_FIND_REQUIRED)
set(_Qt5MultimediaWidgets_FIND_DEPENDENCIES_REQUIRED REQUIRED)
endif()
set(_Qt5MultimediaWidgets_FIND_DEPENDENCIES_QUIET)
if (Qt5MultimediaWidgets_FIND_QUIETLY)
set(_Qt5MultimediaWidgets_DEPENDENCIES_FIND_QUIET QUIET)
endif()
set(_Qt5MultimediaWidgets_FIND_VERSION_EXACT)
if (Qt5MultimediaWidgets_FIND_VERSION_EXACT)
set(_Qt5MultimediaWidgets_FIND_VERSION_EXACT EXACT)
endif()
set(Qt5MultimediaWidgets_EXECUTABLE_COMPILE_FLAGS "")
foreach(_module_dep ${_Qt5MultimediaWidgets_MODULE_DEPENDENCIES})
if (NOT Qt5${_module_dep}_FOUND)
find_package(Qt5${_module_dep}
5.8.0 ${_Qt5MultimediaWidgets_FIND_VERSION_EXACT}
${_Qt5MultimediaWidgets_DEPENDENCIES_FIND_QUIET}
${_Qt5MultimediaWidgets_FIND_DEPENDENCIES_REQUIRED}
PATHS "${CMAKE_CURRENT_LIST_DIR}/.." NO_DEFAULT_PATH
)
endif()
if (NOT Qt5${_module_dep}_FOUND)
set(Qt5MultimediaWidgets_FOUND False)
return()
endif()
list(APPEND Qt5MultimediaWidgets_INCLUDE_DIRS "${Qt5${_module_dep}_INCLUDE_DIRS}")
list(APPEND Qt5MultimediaWidgets_PRIVATE_INCLUDE_DIRS "${Qt5${_module_dep}_PRIVATE_INCLUDE_DIRS}")
list(APPEND Qt5MultimediaWidgets_DEFINITIONS ${Qt5${_module_dep}_DEFINITIONS})
list(APPEND Qt5MultimediaWidgets_COMPILE_DEFINITIONS ${Qt5${_module_dep}_COMPILE_DEFINITIONS})
list(APPEND Qt5MultimediaWidgets_EXECUTABLE_COMPILE_FLAGS ${Qt5${_module_dep}_EXECUTABLE_COMPILE_FLAGS})
endforeach()
list(REMOVE_DUPLICATES Qt5MultimediaWidgets_INCLUDE_DIRS)
list(REMOVE_DUPLICATES Qt5MultimediaWidgets_PRIVATE_INCLUDE_DIRS)
list(REMOVE_DUPLICATES Qt5MultimediaWidgets_DEFINITIONS)
list(REMOVE_DUPLICATES Qt5MultimediaWidgets_COMPILE_DEFINITIONS)
list(REMOVE_DUPLICATES Qt5MultimediaWidgets_EXECUTABLE_COMPILE_FLAGS)
set(_Qt5MultimediaWidgets_LIB_DEPENDENCIES "Qt5::Multimedia;Qt5::Widgets;Qt5::Gui;Qt5::Core")
add_library(Qt5::MultimediaWidgets SHARED IMPORTED)
#set_property(TARGET Qt5::MultimediaWidgets PROPERTY
# INTERFACE_INCLUDE_DIRECTORIES ${_Qt5MultimediaWidgets_OWN_INCLUDE_DIRS})
set_property(TARGET Qt5::MultimediaWidgets PROPERTY
INTERFACE_COMPILE_DEFINITIONS QT_MULTIMEDIAWIDGETS_LIB)
_populate_MultimediaWidgets_target_properties(RELEASE "libQt5MultimediaWidgets.so.5.8.0" "" )
file(GLOB pluginTargets "${CMAKE_CURRENT_LIST_DIR}/Qt5MultimediaWidgets_*Plugin.cmake")
macro(_populate_MultimediaWidgets_plugin_properties Plugin Configuration PLUGIN_LOCATION)
set_property(TARGET Qt5::${Plugin} APPEND PROPERTY IMPORTED_CONFIGURATIONS ${Configuration})
set(imported_location "${_qt5MultimediaWidgets_install_prefix}/plugins/${PLUGIN_LOCATION}")
_qt5_MultimediaWidgets_check_file_exists(${imported_location})
set_target_properties(Qt5::${Plugin} PROPERTIES
"IMPORTED_LOCATION_${Configuration}" ${imported_location}
)
endmacro()
if (pluginTargets)
foreach(pluginTarget ${pluginTargets})
include(${pluginTarget})
endforeach()
endif()
_qt5_MultimediaWidgets_check_file_exists("${CMAKE_CURRENT_LIST_DIR}/Qt5MultimediaWidgetsConfigVersion.cmake")
endif()
set(PACKAGE_VERSION 5.8.0)
if(PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION)
set(PACKAGE_VERSION_COMPATIBLE FALSE)
else()
set(PACKAGE_VERSION_COMPATIBLE TRUE)
if(PACKAGE_FIND_VERSION STREQUAL PACKAGE_VERSION)
set(PACKAGE_VERSION_EXACT TRUE)
endif()
endif()
if (CMAKE_VERSION VERSION_LESS 2.8.3)
message(FATAL_ERROR "Qt 5 requires at least CMake version 2.8.3")
endif()
get_filename_component(_qt5Network_install_prefix "${CMAKE_CURRENT_LIST_DIR}/../../../" ABSOLUTE)
# For backwards compatibility only. Use Qt5Network_VERSION instead.
set(Qt5Network_VERSION_STRING 5.8.0)
set(Qt5Network_LIBRARIES Qt5::Network)
macro(_qt5_Network_check_file_exists file)
if(NOT EXISTS "${file}" )
# message(FATAL_ERROR "The imported target \"Qt5::Network\" references the file
# \"${file}\"
#but this file does not exist. Possible reasons include:
#* The file was deleted, renamed, or moved to another location.
#* An install or uninstall procedure did not complete successfully.
#* The installation package was faulty and contained
# \"${CMAKE_CURRENT_LIST_FILE}\"
#but not all the files it references.
#")
endif()
endmacro()
macro(_populate_Network_target_properties Configuration LIB_LOCATION IMPLIB_LOCATION)
set_property(TARGET Qt5::Network APPEND PROPERTY IMPORTED_CONFIGURATIONS ${Configuration})
set(imported_location "${_qt5Network_install_prefix}/lib/${LIB_LOCATION}")
_qt5_Network_check_file_exists(${imported_location})
set_target_properties(Qt5::Network PROPERTIES
"INTERFACE_LINK_LIBRARIES" "${_Qt5Network_LIB_DEPENDENCIES}"
"IMPORTED_LOCATION_${Configuration}" ${imported_location}
"IMPORTED_SONAME_${Configuration}" "libQt5Network.so.5"
# For backward compatibility with CMake < 2.8.12
"IMPORTED_LINK_INTERFACE_LIBRARIES_${Configuration}" "${_Qt5Network_LIB_DEPENDENCIES}"
)
endmacro()
if (NOT TARGET Qt5::Network)
set(_Qt5Network_OWN_INCLUDE_DIRS "${_qt5Network_install_prefix}/include/" "${_qt5Network_install_prefix}/include/QtNetwork")
set(Qt5Network_PRIVATE_INCLUDE_DIRS "")
include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL)
foreach(_dir ${_Qt5Network_OWN_INCLUDE_DIRS})
_qt5_Network_check_file_exists(${_dir})
endforeach()
# Only check existence of private includes if the Private component is
# specified.
list(FIND Qt5Network_FIND_COMPONENTS Private _check_private)
if (NOT _check_private STREQUAL -1)
foreach(_dir ${Qt5Network_PRIVATE_INCLUDE_DIRS})
_qt5_Network_check_file_exists(${_dir})
endforeach()
endif()
set(Qt5Network_INCLUDE_DIRS ${_Qt5Network_OWN_INCLUDE_DIRS})
set(Qt5Network_DEFINITIONS -DQT_NETWORK_LIB)
set(Qt5Network_COMPILE_DEFINITIONS QT_NETWORK_LIB)
set(_Qt5Network_MODULE_DEPENDENCIES "Core")
set(_Qt5Network_FIND_DEPENDENCIES_REQUIRED)
if (Qt5Network_FIND_REQUIRED)
set(_Qt5Network_FIND_DEPENDENCIES_REQUIRED REQUIRED)
endif()
set(_Qt5Network_FIND_DEPENDENCIES_QUIET)
if (Qt5Network_FIND_QUIETLY)
set(_Qt5Network_DEPENDENCIES_FIND_QUIET QUIET)
endif()
set(_Qt5Network_FIND_VERSION_EXACT)
if (Qt5Network_FIND_VERSION_EXACT)
set(_Qt5Network_FIND_VERSION_EXACT EXACT)
endif()
set(Qt5Network_EXECUTABLE_COMPILE_FLAGS "")
foreach(_module_dep ${_Qt5Network_MODULE_DEPENDENCIES})
if (NOT Qt5${_module_dep}_FOUND)
find_package(Qt5${_module_dep}
5.8.0 ${_Qt5Network_FIND_VERSION_EXACT}
${_Qt5Network_DEPENDENCIES_FIND_QUIET}
${_Qt5Network_FIND_DEPENDENCIES_REQUIRED}
PATHS "${CMAKE_CURRENT_LIST_DIR}/.." NO_DEFAULT_PATH
)
endif()
if (NOT Qt5${_module_dep}_FOUND)
set(Qt5Network_FOUND False)
return()
endif()
list(APPEND Qt5Network_INCLUDE_DIRS "${Qt5${_module_dep}_INCLUDE_DIRS}")
list(APPEND Qt5Network_PRIVATE_INCLUDE_DIRS "${Qt5${_module_dep}_PRIVATE_INCLUDE_DIRS}")
list(APPEND Qt5Network_DEFINITIONS ${Qt5${_module_dep}_DEFINITIONS})
list(APPEND Qt5Network_COMPILE_DEFINITIONS ${Qt5${_module_dep}_COMPILE_DEFINITIONS})
list(APPEND Qt5Network_EXECUTABLE_COMPILE_FLAGS ${Qt5${_module_dep}_EXECUTABLE_COMPILE_FLAGS})
endforeach()
list(REMOVE_DUPLICATES Qt5Network_INCLUDE_DIRS)
list(REMOVE_DUPLICATES Qt5Network_PRIVATE_INCLUDE_DIRS)
list(REMOVE_DUPLICATES Qt5Network_DEFINITIONS)
list(REMOVE_DUPLICATES Qt5Network_COMPILE_DEFINITIONS)
list(REMOVE_DUPLICATES Qt5Network_EXECUTABLE_COMPILE_FLAGS)
set(_Qt5Network_LIB_DEPENDENCIES "Qt5::Core")
add_library(Qt5::Network SHARED IMPORTED)
#set_property(TARGET Qt5::Network PROPERTY
# INTERFACE_INCLUDE_DIRECTORIES ${_Qt5Network_OWN_INCLUDE_DIRS})
set_property(TARGET Qt5::Network PROPERTY
INTERFACE_COMPILE_DEFINITIONS QT_NETWORK_LIB)
_populate_Network_target_properties(RELEASE "libQt5Network.so.5.8.0" "" )
file(GLOB pluginTargets "${CMAKE_CURRENT_LIST_DIR}/Qt5Network_*Plugin.cmake")
macro(_populate_Network_plugin_properties Plugin Configuration PLUGIN_LOCATION)
set_property(TARGET Qt5::${Plugin} APPEND PROPERTY IMPORTED_CONFIGURATIONS ${Configuration})
set(imported_location "${_qt5Network_install_prefix}/plugins/${PLUGIN_LOCATION}")
_qt5_Network_check_file_exists(${imported_location})
set_target_properties(Qt5::${Plugin} PROPERTIES
"IMPORTED_LOCATION_${Configuration}" ${imported_location}
)
endmacro()
if (pluginTargets)
foreach(pluginTarget ${pluginTargets})
include(${pluginTarget})
endforeach()
endif()
_qt5_Network_check_file_exists("${CMAKE_CURRENT_LIST_DIR}/Qt5NetworkConfigVersion.cmake")
endif()
set(PACKAGE_VERSION 5.8.0)
if(PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION)
set(PACKAGE_VERSION_COMPATIBLE FALSE)
else()
set(PACKAGE_VERSION_COMPATIBLE TRUE)
if(PACKAGE_FIND_VERSION STREQUAL PACKAGE_VERSION)
set(PACKAGE_VERSION_EXACT TRUE)
endif()
endif()
add_library(Qt5::QConnmanEnginePlugin MODULE IMPORTED)
_populate_Network_plugin_properties(QConnmanEnginePlugin RELEASE "bearer/libqconnmanbearer.so")
list(APPEND Qt5Network_PLUGINS Qt5::QConnmanEnginePlugin)
add_library(Qt5::QGenericEnginePlugin MODULE IMPORTED)
_populate_Network_plugin_properties(QGenericEnginePlugin RELEASE "bearer/libqgenericbearer.so")
list(APPEND Qt5Network_PLUGINS Qt5::QGenericEnginePlugin)
add_library(Qt5::QNetworkManagerEnginePlugin MODULE IMPORTED)
_populate_Network_plugin_properties(QNetworkManagerEnginePlugin RELEASE "bearer/libqnmbearer.so")
list(APPEND Qt5Network_PLUGINS Qt5::QNetworkManagerEnginePlugin)