Skip to content

Commit

Permalink
Revert PR#2703
Browse files Browse the repository at this point in the history
Signed-off-by: Ryan Friedman <ryanfriedman5410+github@gmail.com>
  • Loading branch information
Ryanf55 committed Jul 29, 2023
1 parent 368eab0 commit f2e36ca
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 18 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ set(CMAKE_CXX_EXTENSIONS OFF)
find_package(exiv2 REQUIRED CONFIG NAMES exiv2) # search ${CMAKE_INSTALL_PREFIX}/lib/cmake/exiv2/
add_executable(exifprint ../samples/exifprint.cpp) # Create exifprint target
target_link_libraries(exifprint PRIVATE Exiv2::exiv2lib) # link exiv2lib
target_link_libraries(exifprint PRIVATE exiv2lib) # link exiv2lib
EOF
$ cmake . # generate the makefile
$ cmake --build . # build the code
Expand Down
23 changes: 6 additions & 17 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,6 @@ add_library( exiv2lib
${PUBLIC_HEADERS}
$<TARGET_OBJECTS:exiv2lib_int>
)
add_library(Exiv2::exiv2lib ALIAS exiv2lib)

generate_export_header(exiv2lib
EXPORT_MACRO_NAME EXIV2API
Expand Down Expand Up @@ -284,13 +283,10 @@ set(requires_private_for_pc_file "${requires_private_string}" PARENT_SCOPE)

write_basic_package_version_file(exiv2ConfigVersion.cmake COMPATIBILITY ExactVersion)

install(TARGETS exiv2lib EXPORT exiv2Export)

include(CMakePackageConfigHelpers)
configure_package_config_file(
../cmake/exiv2Config.cmake.in
${CMAKE_CURRENT_BINARY_DIR}/exiv2Config.cmake
INSTALL_DESTINATION "${CMAKE_INSTALL_DATADIR}/cmake/exiv2"
install(TARGETS exiv2lib EXPORT exiv2Config
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
)

install(FILES
Expand All @@ -299,14 +295,7 @@ install(FILES
${CMAKE_BINARY_DIR}/exiv2lib_export.h
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/exiv2)

install(EXPORT exiv2Export
DESTINATION "${CMAKE_INSTALL_DATADIR}/cmake/exiv2"
NAMESPACE Exiv2::
)
install(EXPORT exiv2Config DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/exiv2")

install(
FILES
${CMAKE_CURRENT_BINARY_DIR}/exiv2ConfigVersion.cmake
${CMAKE_CURRENT_BINARY_DIR}/exiv2Config.cmake
DESTINATION "${CMAKE_INSTALL_DATADIR}/cmake/exiv2")
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/exiv2ConfigVersion.cmake DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/exiv2")

0 comments on commit f2e36ca

Please sign in to comment.