CMake build: Build Qbs if the submodule is available

Includes update of Qbs to current head of master, which enables this
feature on the Qbs build system side.

Fixes: QTCREATORBUG-23905
Change-Id: I9a537b640b7f7a753839ace3e44d174c8e0af526
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
This commit is contained in:
Eike Ziller
2020-10-07 13:31:13 +02:00
parent a722b7a093
commit 75adba735b
3 changed files with 36 additions and 4 deletions

View File

@@ -48,9 +48,7 @@ jobs:
- name: Checkout submodules
run: |
git submodule set-url -- perfparser https://code.qt.io/qt-creator/perfparser.git
git submodule update --init src/plugins/help/qlitehtml/litehtml
git submodule update --init src/tools/perfparser
git submodule update --init tests/unit/unittest/3rdparty/googletest
git submodule update --init
- name: Download Ninja and CMake
shell: cmake -P {0}

View File

@@ -4,3 +4,37 @@ add_subdirectory(qtsingleapplication)
add_subdirectory(qtlockedfile)
add_subdirectory(help)
add_subdirectory(registryaccess)
if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/qbs/CMakeLists.txt)
set(BUILD_QBS_DEFAULT YES)
else()
set(BUILD_QBS_DEFAULT FALSE)
endif()
option(BUILD_QBS "Build Qbs together with Qt Creator" ${BUILD_QBS_DEFAULT})
if (BUILD_QBS)
find_package(Qt5 COMPONENTS Script QUIET)
if (TARGET Qt5::Script)
set(ENABLE_BUILD_QBS YES)
endif()
else()
set(ENABLE_BUILD_QBS NO)
endif()
add_feature_info("Build Qbs" ENABLE_BUILD_QBS "with CONDITION TARGET Qt5::Script")
if (ENABLE_BUILD_QBS)
file(RELATIVE_PATH _REL_PATH_TO_QTC "${CMAKE_BINARY_DIR}" "${PROJECT_BINARY_DIR}")
set(QBS_OUTPUT_PREFIX "${_REL_PATH_TO_QTC}/" CACHE STRING "" FORCE)
set(QBS_APP_INSTALL_DIR "${IDE_BIN_PATH}" CACHE STRING "" FORCE)
set(QBS_LIB_INSTALL_DIR "${IDE_LIBRARY_PATH}" CACHE STRING "" FORCE)
set(QBS_DLL_INSTALL_DIR "${IDE_BIN_PATH}" CACHE STRING "" FORCE)
set(QBS_LIBEXEC_INSTALL_DIR "${IDE_LIBEXEC_PATH}" CACHE STRING "" FORCE)
set(QBS_PLUGINS_INSTALL_BASE "${IDE_PLUGIN_PATH}" CACHE STRING "" FORCE)
set(QBS_RESOURCES_INSTALL_BASE "${IDE_DATA_PATH}/qbs" CACHE STRING "" FORCE)
set(QBS_HEADERS_INSTALL_DIR "${IDE_DATA_PATH}/qbs/include/qbs" CACHE STRING "" FORCE)
set(INSTALL_PUBLIC_HEADERS OFF)
set(WITH_TESTS OFF)
add_subdirectory(qbs)
endif()