Skip to content

Commit

Permalink
use git am instead of apply, fix trailing whitespace in patches/0001-…
Browse files Browse the repository at this point in the history
…Bzip2-cmake-package.patch
  • Loading branch information
JonathSpirit committed Jan 6, 2024
1 parent 2d15b14 commit 0d49fe5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion deps/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ function(AddPatchedDependency NAME URL TAG SHARED ARGS SOURCE_SUBDIR PATCH)
PREFIX project/${NAME}
PATCH_COMMAND ${GIT_EXECUTABLE} clean --force -d -x &&
PATCH_COMMAND ${GIT_EXECUTABLE} reset --hard &&
PATCH_COMMAND ${GIT_EXECUTABLE} apply "${PATCH}"
PATCH_COMMAND ${GIT_EXECUTABLE} am "${PATCH}"
TEST_COMMAND ""
SOURCE_SUBDIR ${SOURCE_SUBDIR}
EXCLUDE_FROM_ALL)
Expand Down
10 changes: 5 additions & 5 deletions deps/patches/0001-Bzip2-cmake-package.patch
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ index c4b0b6e..cabb4df 100644
VERSION ${LT_VERSION} SOVERSION ${LT_SOVERSION})
- install(TARGETS bz2 DESTINATION ${CMAKE_INSTALL_LIBDIR})
- install(FILES bzlib.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
+ install(TARGETS bz2 DESTINATION ${CMAKE_INSTALL_LIBDIR} EXPORT bzip2Targets
+ install(TARGETS bz2 DESTINATION ${CMAKE_INSTALL_LIBDIR} EXPORT bzip2Targets
+ FILE_SET HEADERS DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} COMPONENT Development)
+
+
+ export(TARGETS bz2 NAMESPACE BZip2:: FILE bzip2Targets.cmake)

if(USE_OLD_SONAME)
Expand All @@ -66,13 +66,13 @@ index c4b0b6e..cabb4df 100644
target_compile_definitions(bz2_static PUBLIC BZ2_STATICLIB)
- install(TARGETS bz2_static DESTINATION ${CMAKE_INSTALL_LIBDIR})
- install(FILES bzlib.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
+ install(TARGETS bz2_static DESTINATION ${CMAKE_INSTALL_LIBDIR} EXPORT bzip2Targets
+ install(TARGETS bz2_static DESTINATION ${CMAKE_INSTALL_LIBDIR} EXPORT bzip2Targets
+ FILE_SET HEADERS DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} COMPONENT Development)
+
+
+ export(TARGETS bz2_static NAMESPACE BZip2:: FILE bzip2Targets.cmake)
endif()

+configure_package_config_file(bzip2Config.cmake.in
+configure_package_config_file(bzip2Config.cmake.in
+ ${CMAKE_CURRENT_BINARY_DIR}/bzip2Config.cmake
+ INSTALL_DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake)
+write_basic_package_version_file(bzip2ConfigVersion.cmake VERSION ${LT_VERSION} COMPATIBILITY SameMajorVersion)
Expand Down

0 comments on commit 0d49fe5

Please sign in to comment.