qt5base-lts/tests/auto/cmake
Stephen Kelly 8266de089c CMake: Create a Qt5::<ModuleName>Private target for each module
Make it depend on the corresponding Private target of each
dependency.  This way, user code can write

 find_package(Qt5Gui REQUIRED)

 add_executable(hello hello.cpp)

 target_link_libraries(hello Qt5::GuiPrivate)

and get the private include directories for both Qt5Core and Qt5Gui.

Don't create the Private target if any of the private include
directories do not exist.  This way, if user code uses one of the
targets, CMake will issue an error if the private include directories do
not exist.  Unfortunately the error is somewhat cryptic (eg, 'the
"Qt5::CorePrivate" was not found'), but this is still an improvement
over an error at compile time.

This is an improvement on the situation described in QTBUG-37417 using
Modern CMake features.

Change-Id: I034f8216c3ec64d1a3309682456a713cac9bf854
Reviewed-by: Kai Pastor <dg0yt@darc.de>
Reviewed-by: Stephen Kelly <steveire@gmail.com>
2016-12-23 19:24:35 +00:00
..
test_add_binary_resources_delayed_file Updated license headers 2016-01-21 18:55:18 +00:00
test_add_resource_options Updated license headers 2016-01-21 18:55:18 +00:00
test_add_resources_delayed_file Updated license headers 2016-01-21 18:55:18 +00:00
test_concurrent_module Updated license headers 2016-01-21 18:55:18 +00:00
test_dbus_module Updated license headers 2016-01-21 18:55:18 +00:00
test_dependent_modules Updated license headers 2016-01-21 18:55:18 +00:00
test_egl_lib Updated license headers 2016-01-21 18:55:18 +00:00
test_interface Updated license headers 2016-01-21 18:55:18 +00:00
test_interface_link_libraries Updated license headers 2016-01-21 18:55:18 +00:00
test_json_plugin_includes Updated license headers 2016-01-21 18:55:18 +00:00
test_moc_macro_target Updated license headers 2016-01-21 18:55:18 +00:00
test_multiple_find_package Updated license headers 2016-01-21 18:55:18 +00:00
test_opengl_lib Updated license headers 2016-01-21 18:55:18 +00:00
test_openglextensions_module Updated license headers 2016-01-21 18:55:18 +00:00
test_platform_defs_include Updated license headers 2016-01-21 18:55:18 +00:00
test_plugins Teach CMake about Qt 5 plugins. 2013-09-10 14:38:18 +02:00
test_private_includes Updated license headers 2016-01-21 18:55:18 +00:00
test_private_targets CMake: Create a Qt5::<ModuleName>Private target for each module 2016-12-23 19:24:35 +00:00
test_QFINDTESTDATA Fix QFINDTESTDATA when using cmake ninja generator 2016-03-19 13:44:21 +00:00
test_qtmainwin_library Updated license headers 2016-01-21 18:55:18 +00:00
test_testlib_definitions Merge remote-tracking branch 'origin/5.6' into 5.7 2016-04-04 08:59:18 +02:00
test_testlib_no_link_gui Doc: Fix module name format 2013-01-25 17:27:44 +01:00
test_testlib_no_link_widgets Doc: Fix module name format 2013-01-25 17:27:44 +01:00
test_umbrella_config Generate a Qt5ConfigVersion.cmake file. 2013-03-13 16:07:09 +01:00
test_use_modules_function Updated license headers 2016-01-21 18:55:18 +00:00
test_wrap_cpp_and_resources Updated license headers 2016-01-21 18:55:18 +00:00
test_wrap_cpp_options Updated license headers 2016-01-21 18:55:18 +00:00
test(needsquoting)dirname Updated license headers 2016-01-21 18:55:18 +00:00
cmake.pro Increase CI timeout for cmake tests. 2014-03-06 17:22:55 +01:00
CMakeLists.txt CMake: Create a Qt5::<ModuleName>Private target for each module 2016-12-23 19:24:35 +00:00