File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -19,9 +19,6 @@ if(APPLE)
1919 set (FRAMEWORK_INSTALL_DIR "/Library/Frameworks" CACHE STRING "Directory to install frameworks to." )
2020 endif ()
2121endif ()
22- if (NOT BUILD_SHARED_LIBS )
23- add_definitions (-DTAGLIB_STATIC )
24- endif ()
2522option (ENABLE_STATIC_RUNTIME "Visual Studio, link with runtime statically" OFF )
2623
2724option (ENABLE_CCACHE "Use ccache when building libtag" OFF )
Original file line number Diff line number Diff line change @@ -112,6 +112,9 @@ set_target_properties(tag_c PROPERTIES
112112 DEFINE_SYMBOL MAKE_TAGLIB_C_LIB
113113 INSTALL_NAME_DIR ${CMAKE_INSTALL_FULL_LIBDIR}
114114)
115+ if (NOT BUILD_SHARED_LIBS )
116+ target_compile_definitions (tag_c PUBLIC TAGLIB_STATIC )
117+ endif ()
115118
116119if (TAGLIB_INSTALL_SUFFIX)
117120 if (BUILD_SHARED_LIBS )
Original file line number Diff line number Diff line change @@ -461,6 +461,9 @@ set_target_properties(tag PROPERTIES
461461 INTERFACE_LINK_LIBRARIES "${ZLIB_INTERFACE_LINK_LIBRARIES} "
462462 PUBLIC_HEADER "${tag_HDRS} "
463463)
464+ if (NOT BUILD_SHARED_LIBS )
465+ target_compile_definitions (tag PUBLIC TAGLIB_STATIC )
466+ endif ()
464467if (VISIBILITY_HIDDEN)
465468 set_target_properties (tag PROPERTIES C_VISIBILITY_PRESET hidden )
466469 set_target_properties (tag PROPERTIES CXX_VISIBILITY_PRESET hidden )
You can’t perform that action at this time.
0 commit comments