Disable Examples in static build

Do not build examples in static builds as they are not prepared
for this configuration.

Change-Id: Ia0fd0a6cdfa3733bf13eb2ca8398668f26c0bedf
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This commit is contained in:
Leander Beernaert 2019-09-03 12:33:11 +02:00
parent e0fbb7306d
commit 3f8ba1e55e

View File

@ -93,7 +93,7 @@ macro(qt_build_repo)
qt_build_repo_end()
if (BUILD_EXAMPLES AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/examples/CMakeLists.txt")
if (BUILD_EXAMPLES AND BUILD_SHARED_LIBS AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/examples/CMakeLists.txt")
add_subdirectory(examples)
endif()
endmacro()