CMake build: Make it possible to separately build wininterrupt & cdbext

By making them separate projects. Follow the pattern from sdktool.
This is needed for building these tools on Windows 32bit for the
Qt6-based installers - because Qt 6 doesn't provide Windows 32bit
builds anymore.

Change-Id: I82e2fdc7312e95079bb13f8c5f0ac1028c09222f
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
This commit is contained in:
Eike Ziller
2021-02-22 14:23:23 +01:00
parent 83c61a7c53
commit 28a8516394
2 changed files with 35 additions and 1 deletions

View File

@@ -1,3 +1,19 @@
cmake_minimum_required(VERSION 3.10)
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake")
project(qtcreatorcdbext)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
if (NOT QT_CREATOR_API_DEFINED)
# standalone build
include(QtCreatorIDEBranding)
include(QtCreatorAPI)
endif()
if (NOT WIN32 OR NOT MSVC)
return()
endif()
@@ -111,8 +127,10 @@ if (_library_enabled)
COMPONENT qtcreatorcdbext)
add_custom_target(copy_python_dll ALL VERBATIM)
qtc_output_binary_dir(output_binary_dir)
add_custom_command(TARGET copy_python_dll POST_BUILD
COMMAND "${CMAKE_COMMAND}" -E copy_if_different ${deployPythonFiles} "${PROJECT_BINARY_DIR}/lib/qtcreatorcdbext${ArchSuffix}/"
COMMAND "${CMAKE_COMMAND}" -E copy_if_different ${deployPythonFiles} "${output_binary_dir}/lib/qtcreatorcdbext${ArchSuffix}/"
VERBATIM
)
endif()

View File

@@ -1,3 +1,19 @@
cmake_minimum_required(VERSION 3.10)
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake")
project(wininterrupt)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
if (NOT QT_CREATOR_API_DEFINED)
# standalone build
include(QtCreatorIDEBranding)
include(QtCreatorAPI)
endif()
if (NOT WIN32)
return()
endif()