From 86bf83bce820be87cbb3eee8cd52e1fda5d60927 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Val=C3=A8s?= <7755128+stvales@users.noreply.github.com> Date: Wed, 16 Sep 2020 16:52:18 +0200 Subject: [PATCH] Problem: cmake generates faulty xcode projects also for dynamic lib (#4042) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * apply the use of sources for xcode project also to dynamic library Co-authored-by: Stéphane Valès Co-authored-by: stephane vales --- CMakeLists.txt | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e08b388f..85747f62 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1357,8 +1357,14 @@ else() add_library(libzmq SHARED ${sources} ${public_headers} ${html-docs} ${readme-docs} ${zmq-pkgconfig} ${CMAKE_CURRENT_BINARY_DIR}/version.rc) else() - add_library(libzmq SHARED $ ${public_headers} ${html-docs} ${readme-docs} - ${zmq-pkgconfig} ${CMAKE_CURRENT_BINARY_DIR}/version.rc) + if (CMAKE_GENERATOR STREQUAL "Xcode") + add_library(libzmq SHARED ${sources} ${public_headers} ${html-docs} ${readme-docs} + ${zmq-pkgconfig} ${CMAKE_CURRENT_BINARY_DIR}/version.rc) + else() + add_library(libzmq SHARED $ ${public_headers} ${html-docs} ${readme-docs} + ${zmq-pkgconfig} ${CMAKE_CURRENT_BINARY_DIR}/version.rc) + endif() + endif() # NOTE: the SOVERSION and VERSION MUST be the same as the one generated by libtool! It is NOT the same as the # version of the package.