CMake build: Fix issues with Devel package for qmake-based plugins

Add the pch files that qmake uses.
On Windows, the .lib files must have the major version too,
like the DLLs.

Change-Id: I437bbeac0323c5b9bc174ddea8c0d9be6497b4e6
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
This commit is contained in:
Eike Ziller
2021-03-17 13:52:33 +01:00
parent 65d2f87f6c
commit 38ce4fb4ec
2 changed files with 8 additions and 0 deletions

View File

@@ -217,6 +217,8 @@ function(add_qtc_library name)
set_target_properties(${name} PROPERTIES
SUFFIX "${PROJECT_VERSION_MAJOR}${CMAKE_SHARED_LIBRARY_SUFFIX}"
PREFIX ""
IMPORT_SUFFIX "${IDE_VERSION_MAJOR}${CMAKE_IMPORT_LIBRARY_SUFFIX}"
IMPORT_PREFIX ""
)
endif()
@@ -469,6 +471,8 @@ function(add_qtc_plugin target_name)
set_target_properties(${target_name} PROPERTIES
SUFFIX "${PROJECT_VERSION_MAJOR}${CMAKE_SHARED_LIBRARY_SUFFIX}"
PREFIX ""
IMPORT_SUFFIX "${IDE_VERSION_MAJOR}${CMAKE_IMPORT_LIBRARY_SUFFIX}"
IMPORT_PREFIX ""
)
endif()
enable_pch(${target_name})

View File

@@ -5,6 +5,10 @@ add_subdirectory(qtlockedfile)
add_subdirectory(help)
add_subdirectory(registryaccess)
# PCHs used by qmake based plugin builds
qtc_add_public_header(qtcreator_pch.h)
qtc_add_public_header(qtcreator_gui_pch.h)
if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/qbs/CMakeLists.txt)
set(BUILD_QBS_DEFAULT YES)
else()