mirror of
https://github.com/taglib/taglib.git
synced 2025-07-18 21:14:23 -04:00
Make it possible to build an OS X framework
This commit is contained in:
@ -21,14 +21,17 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/taglib_c.pc.cmake ${CMAKE_CURRENT_BIN
|
||||
set(tag_c_HDRS tag_c.h)
|
||||
|
||||
if(ENABLE_STATIC)
|
||||
add_library(tag_c STATIC tag_c.cpp)
|
||||
add_library(tag_c STATIC tag_c.cpp ${tag_c_HDRS})
|
||||
set_target_properties(tag_c PROPERTIES COMPILE_DEFINITIONS TAGLIB_STATIC)
|
||||
else()
|
||||
add_library(tag_c SHARED tag_c.cpp)
|
||||
add_library(tag_c SHARED tag_c.cpp ${tag_c_HDRS})
|
||||
endif()
|
||||
|
||||
target_link_libraries(tag_c tag)
|
||||
set_target_properties(tag_c PROPERTIES PUBLIC_HEADER "${tag_c_HDRS}")
|
||||
if(BUILD_FRAMEWORK)
|
||||
set_target_properties(tag_c PROPERTIES FRAMEWORK TRUE)
|
||||
endif()
|
||||
|
||||
# On Solaris we need to explicitly add the C++ standard and runtime
|
||||
# libraries to the libs used by the C bindings, because those C bindings
|
||||
@ -58,6 +61,7 @@ set_target_properties(tag_c PROPERTIES
|
||||
INSTALL_NAME_DIR ${LIB_INSTALL_DIR}
|
||||
)
|
||||
install(TARGETS tag_c
|
||||
FRAMEWORK DESTINATION ${FRAMEWORK_INSTALL_DIR}
|
||||
LIBRARY DESTINATION ${LIB_INSTALL_DIR}
|
||||
RUNTIME DESTINATION ${BIN_INSTALL_DIR}
|
||||
ARCHIVE DESTINATION ${LIB_INSTALL_DIR}
|
||||
|
Reference in New Issue
Block a user