Merge pull request #158 from daleglass/linux_dynamic_build

Force dynamic build on Linux
This commit is contained in:
Thijs Wenker 2020-02-22 20:36:19 +01:00 committed by GitHub
commit 6d9f040bfd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 1 deletions

View file

@ -61,4 +61,12 @@ endif ()
if (APPLE)
set(CMAKE_XCODE_ATTRIBUTE_OTHER_CODE_SIGN_FLAGS "--deep")
endif()
endif()
if (UNIX)
# Static libs result in duplicated constructor and destructor calls on Linux
# and crashes on exit, and perhaps loss of global state on plugin loads.
#
# This will need to be looked at closely before Linux can have a static build.
set(BUILD_SHARED_LIBS ON)
endif ()

View file

@ -142,6 +142,9 @@ if (APPLE)
list(APPEND INTERFACE_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/icon/${INTERFACE_ICON_FILENAME})
endif()
if (UNIX)
set(BUILD_SHARED_LIBS ON)
endif ()
# create the executable, make it a bundle on OS X
if (APPLE)