From 0ce96f3b8d9cd146f1c18c4f651c208a8884f7cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Sat, 17 Dec 2016 22:56:41 +0200 Subject: [PATCH 2/2] Build a static and non-static version --- taglib/CMakeLists.txt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/taglib/CMakeLists.txt b/taglib/CMakeLists.txt index 4f8c876..5f894db 100644 --- a/taglib/CMakeLists.txt +++ b/taglib/CMakeLists.txt @@ -342,7 +342,9 @@ set(tag_LIB_SRCS tagutils.cpp ) -add_library(tag ${tag_LIB_SRCS} ${tag_HDRS}) +add_library(tag SHARED ${tag_LIB_SRCS} ${tag_HDRS}) +add_library(tag_static STATIC ${tag_LIB_SRCS} ${tag_HDRS}) +set_target_properties(tag_static PROPERTIES COMPILE_DEFINITIONS TAGLIB_STATIC) set_property(TARGET tag PROPERTY CXX_STANDARD 98) if(HAVE_ZLIB AND NOT HAVE_ZLIB_SOURCE) @@ -372,7 +374,7 @@ if(BUILD_FRAMEWORK) ) endif() -install(TARGETS tag +install(TARGETS tag tag_static FRAMEWORK DESTINATION ${FRAMEWORK_INSTALL_DIR} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} -- 2.11.0