Use standard CMake's CXX_VISIBILITY_PRESET property.
endif()
option(VISIBILITY_HIDDEN "Build with -fvisibility=hidden" OFF)
-if(VISIBILITY_HIDDEN)
- add_definitions(-fvisibility=hidden)
-endif()
-
option(BUILD_TESTS "Build the test suite" OFF)
option(BUILD_EXAMPLES "Build the examples" OFF)
option(BUILD_BINDINGS "Build the bindings" ON)
add_library(tag_c tag_c.cpp ${tag_c_HDRS})
target_link_libraries(tag_c tag)
-set_target_properties(tag_c PROPERTIES PUBLIC_HEADER "${tag_c_HDRS}")
+set_target_properties(tag_c PROPERTIES
+ PUBLIC_HEADER "${tag_c_HDRS}"
+ DEFINE_SYMBOL MAKE_TAGLIB_LIB
+)
+if(VISIBILITY_HIDDEN)
+ set_target_properties(tag_c PROPERTIES C_VISIBILITY_PRESET hidden
+ )
+endif()
if(BUILD_FRAMEWORK)
set_target_properties(tag_c PROPERTIES FRAMEWORK TRUE)
endif()
LINK_INTERFACE_LIBRARIES ""
PUBLIC_HEADER "${tag_HDRS}"
)
+if(VISIBILITY_HIDDEN)
+ set_target_properties(tag PROPERTIES C_VISIBILITY_PRESET hidden
+ )
+endif()
+
if(BUILD_FRAMEWORK)
unset(INSTALL_NAME_DIR)
set_target_properties(tag PROPERTIES