Fix #798
This commit is contained in:
parent
16df09cc75
commit
78676b2a02
@ -189,7 +189,7 @@ project(exifprint VERSION 0.0.1 LANGUAGES CXX)
|
||||
set(CMAKE_CXX_STANDARD 11)
|
||||
set(CMAKE_CXX_EXTENSIONS OFF)
|
||||
|
||||
find_package(exiv2 REQUIRED CONFIG NAMES exiv2) # search ${CMAKE_INSTALL_PREFIX}/lib/exiv2/cmake/
|
||||
find_package(exiv2 REQUIRED CONFIG NAMES exiv2) # search ${CMAKE_INSTALL_PREFIX}/lib/cmake/exiv2
|
||||
add_executable(exifprint ../samples/exifprint.cpp) # compile this
|
||||
target_link_libraries(exifprint exiv2lib) # link exiv2lib
|
||||
|
||||
|
||||
@ -7,7 +7,7 @@ Structure of the bundle:
|
||||
bin/exiv2.exe exiv2 and sample applications
|
||||
bin/cygexiv2-27.dll DLL
|
||||
lib/libexiv2.dll.a & libexiv2-xmp.a link libraries
|
||||
lib/exiv2/cmake/ CMake support/consume files
|
||||
lib/cmake/exiv2 CMake support/consume files
|
||||
lib/pkgconfig/exiv2.pc pkg-config file
|
||||
share/man/ man pages
|
||||
share/locale/ localisation files
|
||||
@ -42,10 +42,6 @@ $ cd <bundle>
|
||||
$ g++ -std=gnu++98 samples/exifprint.cpp -I/usr/local/include -L/usr/local/lib -lexiv2 -o exifprint
|
||||
$ export LD_LIBRARY_PATH="/usr/local/lib:$LD_LIBRARY_PATH"
|
||||
$ ./exifprint --version
|
||||
exiv2=0.27.1
|
||||
...
|
||||
xmlns=xmpidq:http://ns.adobe.com/xmp/Identifier/qual/1.0/
|
||||
$
|
||||
|
||||
Method 2: Use pkg-config to set include and linking options
|
||||
$ cd <bundle>
|
||||
@ -54,14 +50,3 @@ $ export LD_LIBRARY_PATH="/usr/local/lib:$LD_LIBRARY_PATH"
|
||||
$ g++ -std=gnu++98 samples/exifprint.cpp -o exifprint $(pkg-config exiv2 --libs --cflags)
|
||||
$ ./exifprint
|
||||
|
||||
|
||||
|
||||
To compile and link your own code using installed library and include files
|
||||
---------------------------------------------------------------------------
|
||||
$ g++ -std=gnu++98 samples/exifprint.cpp -I/usr/include -I/usr/local/include -L/usr/local/lib -lexiv2 -o exifprint
|
||||
$ export PATH="/usr/local/bin:$PATH"
|
||||
$ ./exifprint --version
|
||||
exiv2=0.27.1
|
||||
...
|
||||
xmlns=xmpidq:http://ns.adobe.com/xmp/Identifier/qual/1.0/
|
||||
$
|
||||
|
||||
@ -7,7 +7,7 @@ Structure of the bundle
|
||||
bin/exiv2 exiv2 and sample applications
|
||||
lib/libexiv2.0.27.1.0.dylib & libexiv2-xmp.a libraries
|
||||
lib/pkgconfig/exiv2.pc pkg-config file
|
||||
lib/exiv2/cmake/ CMake support/consume files
|
||||
lib/cmake/exiv2 CMake support/consume files
|
||||
include/exiv2/ include files
|
||||
share/man/ man pages
|
||||
share/locale/ localisation files
|
||||
@ -52,6 +52,4 @@ $ g++ -std=c++98 samples/exifprint.cpp -o exifprint $(pkg-config exiv2 --libs --
|
||||
$ ./exifprint
|
||||
|
||||
Method 3: Use the CMake support/consume files
|
||||
See file: README.md Section: 2.6 "Consuming Exiv2 with CMake"
|
||||
|
||||
|
||||
See file: README.md Section: 2.6 "Consuming Exiv2 with CMake"
|
||||
@ -7,7 +7,7 @@ Structure of the bundle:
|
||||
bin/exiv2 exiv2 and sample applications
|
||||
lib/libexiv2.so.0.27.1.0 & libexiv2-xmp.a libraries
|
||||
lib/pkgconfig/exiv2.pc pkg-config file
|
||||
lib/exiv2/cmake/ CMake support/consume files
|
||||
lib/cmake/exiv2 CMake support/consume files
|
||||
include/exiv2/ include files
|
||||
share/man/ man pages
|
||||
share/locale/ localisation files
|
||||
|
||||
@ -8,7 +8,7 @@ bin/exiv2.exe exiv2 and sample applications
|
||||
bin/msys-exiv2-27.dll exiv2 dll
|
||||
lib/libexiv2.dll.a & libexiv2-xmp.a link libraries
|
||||
lib/pkgconfig/exiv2.pc pkg-config file
|
||||
lib/exiv2/cmake/ CMake support/consume files
|
||||
lib/cmake/exiv2 CMake support/consume files
|
||||
include/exiv2/ include files
|
||||
share/man/ man pages
|
||||
share/locale/ localisation files
|
||||
|
||||
@ -8,7 +8,7 @@ Structure of the bundle:
|
||||
bin/exiv2.exe exiv2 and sample applications
|
||||
bin/exiv2.dll dll
|
||||
lib/exiv2.lib & exiv2-xmp.lib link libraries
|
||||
lib/exiv2/cmake/ CMake support/consume files
|
||||
lib/cmake/exiv2 CMake support/consume files
|
||||
include/exiv2/ include files
|
||||
samples/exifprint.cpp sample code
|
||||
logs/ build and test logs
|
||||
|
||||
@ -239,7 +239,7 @@ install(FILES
|
||||
${CMAKE_BINARY_DIR}/exiv2lib_export.h
|
||||
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/exiv2)
|
||||
|
||||
install(EXPORT exiv2Config DESTINATION "${CMAKE_INSTALL_LIBDIR}/exiv2/cmake")
|
||||
install(EXPORT exiv2Config DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/exiv2")
|
||||
|
||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/exiv2ConfigVersion.cmake DESTINATION "${CMAKE_INSTALL_LIBDIR}/exiv2/cmake")
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user