From 569ad988525e29140b47d7338468bd60cac37614 Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Fri, 26 Jun 2020 11:59:19 +0200 Subject: [PATCH] CMake build: Fix library version numbers on macOS The plugin libraries got version 0 and compatibility version 0 and libraries compatibility version 4.0.0, which is not compatible to plugins built with qmake and the runtime linker prevents loading. Use the correct IDE_VERSION and IDE_VERSION_COMPAT. Change-Id: I9a17627c5d212052df644bbc6711dc8fb8307315 Reviewed-by: Alessandro Portale --- cmake/QtCreatorAPI.cmake | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cmake/QtCreatorAPI.cmake b/cmake/QtCreatorAPI.cmake index 1e1c362ad59..24264f9c600 100644 --- a/cmake/QtCreatorAPI.cmake +++ b/cmake/QtCreatorAPI.cmake @@ -152,6 +152,8 @@ function(add_qtc_library name) SOURCES_DIR "${CMAKE_CURRENT_SOURCE_DIR}" VERSION "${IDE_VERSION}" SOVERSION "${PROJECT_VERSION_MAJOR}" + MACHO_CURRENT_VERSION ${IDE_VERSION} + MACHO_COMPATIBILITY_VERSION ${IDE_VERSION_COMPAT} CXX_EXTENSIONS OFF CXX_VISIBILITY_PRESET hidden VISIBILITY_INLINES_HIDDEN ON @@ -400,6 +402,8 @@ function(add_qtc_plugin target_name) qtc_output_binary_dir(_output_binary_dir) set_target_properties(${target_name} PROPERTIES SOURCES_DIR "${CMAKE_CURRENT_SOURCE_DIR}" + MACHO_CURRENT_VERSION ${IDE_VERSION} + MACHO_COMPATIBILITY_VERSION ${IDE_VERSION_COMPAT} CXX_EXTENSIONS OFF CXX_VISIBILITY_PRESET hidden VISIBILITY_INLINES_HIDDEN ON