AdobeXMPsdk. Revert most of xmpsdk/CMakeLists.txt to enable debugging with Xcode.

This commit is contained in:
clanmills 2017-09-14 17:42:28 +01:00
parent 657d59b293
commit 35c244e911
3 changed files with 21 additions and 25 deletions

View File

@ -1,6 +1,8 @@
// File generated by cmake from config/config.h.cmake.
#pragma once
#ifndef _EXV_CONF_H_
#define _EXV_CONF_H_
// Defined if you want to use libssh for SshIO.
#cmakedefine EXV_USE_SSH
@ -171,6 +173,6 @@
#endif /* !EXV_COMMERCIAL_VERSION */
// ------------------------------------------------------------------
#endif /* !_EXV_CONF_H_ */
// That's All Folks!
// ------------------------------------------------------------------

View File

@ -9,35 +9,29 @@ foreach(_currentfile ${XMPSRC})
endif()
endforeach()
# CMake OBJECT LIBRARY (collection of object files)
add_library( xmp_object OBJECT ${XMPSRC} )
target_include_directories(xmp_object PRIVATE ${EXPAT_INCLUDE_DIR})
target_include_directories(xmp_object PRIVATE ${CMAKE_SOURCE_DIR}/xmpsdk/include)
check_include_file( "stdint.h" EXV_HAVE_STDINT_H )
if (EXV_HAVE_STDINT_H)
target_compile_definitions(xmp_object PUBLIC EXV_HAVE_STDINT_H)
if(NOT MSVC)
# http://stackoverflow.com/questions/10046114/in-cmake-how-can-i-test-if-the-compiler-is-clang
if ( NOT "${CMAKE_CXX_COMPILER_ID}" MATCHES "AppleClang")
# 1123 - hide xmpsdk symbols
add_definitions( -fvisibility=hidden -fvisibility-inlines-hidden )
endif()
endif()
if( EXIV2_ENABLE_LIBXMP )
add_library(xmp STATIC $<TARGET_OBJECTS:xmp_object>)
target_link_libraries(xmp PUBLIC ${EXPAT_LIBRARIES})
target_include_directories(xmp PUBLIC ${EXPAT_INCLUDE_DIR})
target_include_directories(xmp PUBLIC ${CMAKE_SOURCE_DIR}/xmpsdk/include)
add_library( xmp STATIC ${XMPSRC} )
target_include_directories(xmp PUBLIC ${CMAKE_SOURCE_DIR}/xmpsdk/include)
target_include_directories(xmp PUBLIC ${EXPAT_INCLUDE_DIR})
# http://stackoverflow.com/questions/10046114/in-cmake-how-can-i-test-if-the-compiler-is-clang
if ( NOT "${CMAKE_CXX_COMPILER_ID}" MATCHES "AppleClang")
# 1123 - hide xmpsdk symbols
target_compile_definitions(xmp PRIVATE -fvisibility=hidden -fvisibility-inlines-hidden )
endif()
if ( NOT MSVC )
target_link_libraries(xmp ${EXPAT_LIBRARIES})
else()
target_link_libraries(xmp Threads::Threads ${EXPAT_LIBRARIES})
endif()
# 1119 Install libxmp.a for use by third party applications (Thanks, Emmanuel)
install(TARGETS xmp
# 1119 Install libxmp.a for use by third party applications (Thanks, Emmanuel)
install(TARGETS xmp
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
)
endif()
)
# That's all Folks!
##

View File

@ -34,7 +34,7 @@
# endif
#endif
#if defined(EXV_HAVE_STDINT_H) || defined(__MINGW32__) || defined(__MING64__)
#if defined(EXV_HAVE_STDINT_H) || defined(__MINGW32__) || defined(__MING64__) || defined(__APPLE__)
# include <stdint.h>
#endif