Fix some compilation issues with the xmp

v0.27.3
Luis Díaz Más 8 years ago committed by Luis Diaz Mas
parent 2221a5c630
commit d206604743

@ -58,7 +58,8 @@ target_compile_definitions(xmp_object PRIVATE XML_STATIC)
# http://stackoverflow.com/questions/10046114/in-cmake-how-can-i-test-if-the-compiler-is-clang # http://stackoverflow.com/questions/10046114/in-cmake-how-can-i-test-if-the-compiler-is-clang
if ( NOT "${CMAKE_CXX_COMPILER_ID}" MATCHES "AppleClang") if ( NOT "${CMAKE_CXX_COMPILER_ID}" MATCHES "AppleClang")
# 1123 - hide xmpsdk symbols # 1123 - hide xmpsdk symbols
target_compile_definitions(xmp_object PRIVATE -fvisibility=hidden -fvisibility-inlines-hidden ) set_property(SOURCE ${XMPSRC} PROPERTY
COMPILE_FLAGS "-fvisibility=hidden -fvisibility-inlines-hidden")
endif() endif()
if( EXIV2_ENABLE_LIBXMP ) if( EXIV2_ENABLE_LIBXMP )
@ -69,6 +70,10 @@ if( EXIV2_ENABLE_LIBXMP )
target_include_directories(xmp PUBLIC ${EXPAT_INCLUDE_DIR}) target_include_directories(xmp PUBLIC ${EXPAT_INCLUDE_DIR})
target_compile_definitions(xmp PUBLIC XML_STATIC) target_compile_definitions(xmp PUBLIC XML_STATIC)
if (BUILD_SHARED_LIBS)
set_property(TARGET xmp_object PROPERTY COMPILE_FLAGS "-fPIC")
endif()
# 1119 Install libxmp.a for use by third party applications (Thanks, Emmanuel) # 1119 Install libxmp.a for use by third party applications (Thanks, Emmanuel)
install(TARGETS xmp install(TARGETS xmp
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}

Loading…
Cancel
Save