Patch #696 ยป out-of-src.patch
config/ConfigureChecks.cmake (working copy) | ||
---|---|---|
30 | 30 |
# |
31 | 31 |
# ConfigureChecks for exiv2 |
32 | 32 | |
33 |
set( CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/config ) |
|
33 |
set( CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/config )
|
|
34 | 34 |
include( CheckIncludeFile ) |
35 | 35 |
include( CheckFunctionExists ) |
36 | 36 |
include( CheckSymbolExists ) |
37 | 37 |
include( CheckCSourceCompiles ) |
38 | 38 |
include( CheckCXXSourceCompiles ) |
39 | 39 | |
40 |
include( FindIconv ) |
|
41 | ||
40 | 42 |
set( STDC_HEADERS ON ) |
41 | 43 |
set( HAVE_DECL_STRERROR_R 0 ) |
42 | 44 | |
43 | 45 |
set( HAVE_PRINTUCS2 ${EXIV2_ENABLE_PRINTUCS2} ) |
44 | 46 |
set( HAVE_LENSDATA ${EXIV2_ENABLE_LENSDATA} ) |
45 | 47 | |
46 |
include_directories( ${CMAKE_INCLUDE_PATH} ${CMAKE_BINARY_DIR} ${CMAKE_SOURCE_DIR}/xmpsdk/include )
|
|
48 |
include_directories( ${CMAKE_INCLUDE_PATH} ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/xmpsdk/include )
|
|
47 | 49 |
link_directories( ${CMAKE_LIBRARY_PATH} ) |
48 | 50 |
set( CMAKE_REQUIRED_INCLUDES ${CMAKE_INCLUDE_PATH} ) |
49 | 51 | |
... | ... | |
84 | 86 |
endif( EXIV2_ENABLE_COMMERCIAL ) |
85 | 87 | |
86 | 88 |
find_package(Iconv) |
87 |
if( ICONV_TEST )
|
|
89 |
if( ICONV_FOUND )
|
|
88 | 90 |
set( HAVE_ICONV 1 ) |
91 |
include_directories(${ICONV_INCLUDE_DIR}) |
|
89 | 92 |
message ( "================> ICONV_LIBRARIES : " ${ICONV_LIBRARIES} ) |
90 |
endif( ICONV_TEST )
|
|
93 |
endif( ICONV_FOUND )
|
|
91 | 94 | |
92 | 95 |
if( ICONV_ACCEPTS_CONST_INPUT ) |
93 | 96 |
message ( "ICONV_ACCEPTS_CONST_INPUT : yes" ) |
... | ... | |
236 | 239 |
# message( EXV_${entry} " : " ${${entry}} ) |
237 | 240 |
endforeach( entry ${EXV_SYMBOLS} ) |
238 | 241 | |
239 |
configure_file( config/config.h.cmake ${CMAKE_BINARY_DIR}/exv_conf.h ) |
|
240 |
configure_file( config/exv_msvc.h.cmake ${CMAKE_BINARY_DIR}/exv_msvc.h COPYONLY ) |
|
241 |
install( FILES ${CMAKE_BINARY_DIR}/exv_conf.h DESTINATION include/exiv2 ) |
|
242 |
install( FILES ${CMAKE_BINARY_DIR}/exv_msvc.h DESTINATION include/exiv2 ) |
|
242 |
configure_file( config/config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/exv_conf.h )
|
|
243 |
configure_file( config/exv_msvc.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/exv_msvc.h COPYONLY )
|
|
244 |
install( FILES ${CMAKE_CURRENT_BINARY_DIR}/exv_conf.h DESTINATION include/exiv2 )
|
|
245 |
install( FILES ${CMAKE_CURRENT_BINARY_DIR}/exv_msvc.h DESTINATION include/exiv2 )
|
|
243 | 246 | |
244 | 247 |
if( NOT MSVC ) |
245 |
configure_file( config/exiv2.pc.cmake ${CMAKE_BINARY_DIR}/exiv2.pc ) |
|
246 |
install( FILES ${CMAKE_BINARY_DIR}/exiv2.pc DESTINATION lib/pkgconfig ) |
|
248 |
configure_file( config/exiv2.pc.cmake ${CMAKE_CURRENT_BINARY_DIR}/exiv2.pc )
|
|
249 |
install( FILES ${CMAKE_CURRENT_BINARY_DIR}/exiv2.pc DESTINATION lib/pkgconfig )
|
|
247 | 250 |
endif( NOT MSVC ) |
248 | 251 | |
249 | 252 |
# ****************************************************************************** |
CMakeLists.txt (working copy) | ||
---|---|---|
54 | 54 |
option( BUILD_samples "Build the unit tests" OFF ) |
55 | 55 | |
56 | 56 |
if( MINGW OR UNIX ) |
57 |
add_definitions( -Wall -Wcast-align -Wpointer-arith -Wformat-security -Wmissing-format-attribute -Woverloaded-virtual -W ) |
|
57 |
add_definitions( -Wall -Wcast-align -Wpointer-arith -Wformat-security -Wmissing-format-attribute -Woverloaded-virtual -W )
|
|
58 | 58 |
endif( MINGW OR UNIX ) |
59 | 59 | |
60 | 60 |
if( EXIV2_ENABLE_XMP ) |
... | ... | |
71 | 71 |
set( INSTALL_TARGET_STANDARD_ARGS RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib ) |
72 | 72 | |
73 | 73 |
# add sources from XMPSDK directory - this needs to be done here |
74 |
set( XMPSRC ${CMAKE_SOURCE_DIR}/xmpsdk/src/ExpatAdapter.cpp |
|
75 |
${CMAKE_SOURCE_DIR}/xmpsdk/src/MD5.cpp |
|
76 |
${CMAKE_SOURCE_DIR}/xmpsdk/src/ParseRDF.cpp |
|
77 |
${CMAKE_SOURCE_DIR}/xmpsdk/src/UnicodeConversions.cpp |
|
78 |
${CMAKE_SOURCE_DIR}/xmpsdk/src/WXMPIterator.cpp |
|
79 |
${CMAKE_SOURCE_DIR}/xmpsdk/src/WXMPMeta.cpp |
|
80 |
${CMAKE_SOURCE_DIR}/xmpsdk/src/WXMPUtils.cpp |
|
81 |
${CMAKE_SOURCE_DIR}/xmpsdk/src/XML_Node.cpp |
|
82 |
${CMAKE_SOURCE_DIR}/xmpsdk/src/XMPCore_Impl.cpp |
|
83 |
${CMAKE_SOURCE_DIR}/xmpsdk/src/XMPIterator.cpp |
|
84 |
${CMAKE_SOURCE_DIR}/xmpsdk/src/XMPMeta-GetSet.cpp |
|
85 |
${CMAKE_SOURCE_DIR}/xmpsdk/src/XMPMeta-Parse.cpp |
|
86 |
${CMAKE_SOURCE_DIR}/xmpsdk/src/XMPMeta-Serialize.cpp |
|
87 |
${CMAKE_SOURCE_DIR}/xmpsdk/src/XMPMeta.cpp |
|
88 |
${CMAKE_SOURCE_DIR}/xmpsdk/src/XMPUtils-FileInfo.cpp |
|
89 |
${CMAKE_SOURCE_DIR}/xmpsdk/src/XMPUtils.cpp ) |
|
74 |
set( XMPSRC ${CMAKE_CURRENT_SOURCE_DIR}/xmpsdk/src/ExpatAdapter.cpp
|
|
75 |
${CMAKE_CURRENT_SOURCE_DIR}/xmpsdk/src/MD5.cpp
|
|
76 |
${CMAKE_CURRENT_SOURCE_DIR}/xmpsdk/src/ParseRDF.cpp
|
|
77 |
${CMAKE_CURRENT_SOURCE_DIR}/xmpsdk/src/UnicodeConversions.cpp
|
|
78 |
${CMAKE_CURRENT_SOURCE_DIR}/xmpsdk/src/WXMPIterator.cpp
|
|
79 |
${CMAKE_CURRENT_SOURCE_DIR}/xmpsdk/src/WXMPMeta.cpp
|
|
80 |
${CMAKE_CURRENT_SOURCE_DIR}/xmpsdk/src/WXMPUtils.cpp
|
|
81 |
${CMAKE_CURRENT_SOURCE_DIR}/xmpsdk/src/XML_Node.cpp
|
|
82 |
${CMAKE_CURRENT_SOURCE_DIR}/xmpsdk/src/XMPCore_Impl.cpp
|
|
83 |
${CMAKE_CURRENT_SOURCE_DIR}/xmpsdk/src/XMPIterator.cpp
|
|
84 |
${CMAKE_CURRENT_SOURCE_DIR}/xmpsdk/src/XMPMeta-GetSet.cpp
|
|
85 |
${CMAKE_CURRENT_SOURCE_DIR}/xmpsdk/src/XMPMeta-Parse.cpp
|
|
86 |
${CMAKE_CURRENT_SOURCE_DIR}/xmpsdk/src/XMPMeta-Serialize.cpp
|
|
87 |
${CMAKE_CURRENT_SOURCE_DIR}/xmpsdk/src/XMPMeta.cpp
|
|
88 |
${CMAKE_CURRENT_SOURCE_DIR}/xmpsdk/src/XMPUtils-FileInfo.cpp
|
|
89 |
${CMAKE_CURRENT_SOURCE_DIR}/xmpsdk/src/XMPUtils.cpp )
|
|
90 | 90 | |
91 | 91 |
# the following lines need to be added to circumvent the error in xmpsdk\src\MD5.h |
92 | 92 |
if( ${EXV_HAVE_STDINT_H} ) |
... | ... | |
99 | 99 |
if( BUILD_samples ) |
100 | 100 |
add_subdirectory( samples ) |
101 | 101 |
endif( BUILD_samples ) |
102 | ||
103 |
if( EXIV2_ENABLE_XMP ) |
|
104 |
add_dependencies(exiv2 xmp) |
|
105 |
endif( EXIV2_ENABLE_XMP ) |
|
106 | ||
107 |
# Compatibility settings for interoperability with FindExiv2.cmake |
|
108 |
set(EXIV2_FOUND true PARENT_SCOPE) |
|
109 |
set(EXIV2_LIBRARY exiv2 PARENT_SCOPE) |
|
110 |
set(EXIV2_INCLUDE_DIR |
|
111 |
${CMAKE_CURRENT_BINARY_DIR} |
|
112 |
${CMAKE_CURRENT_SOURCE_DIR}/src PARENT_SCOPE) |
|
113 |
set(EXIV2_LIBRARIES exiv2 ${XMPLIB} PARENT_SCOPE) |