aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Ziller <eike.ziller@qt.io>2021-03-17 13:52:33 +0100
committerEike Ziller <eike.ziller@qt.io>2021-03-17 13:15:58 +0000
commit38ce4fb4ec589fdf7585a5b9a1d60a2f38586dac (patch)
treef17885048d6f51621600f0bc6458d0b8a01470f1
parent65d2f87f6c577f51d9324075dd4cb5cfa2e99028 (diff)
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>
-rw-r--r--cmake/QtCreatorAPI.cmake4
-rw-r--r--src/shared/CMakeLists.txt4
2 files changed, 8 insertions, 0 deletions
diff --git a/cmake/QtCreatorAPI.cmake b/cmake/QtCreatorAPI.cmake
index fc9d90d27d..10716fd911 100644
--- a/cmake/QtCreatorAPI.cmake
+++ b/cmake/QtCreatorAPI.cmake
@@ -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})
diff --git a/src/shared/CMakeLists.txt b/src/shared/CMakeLists.txt
index ec0069078d..90965fbd1c 100644
--- a/src/shared/CMakeLists.txt
+++ b/src/shared/CMakeLists.txt
@@ -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()