leptonica/leptonica_cmake.patch

58 lines
3.1 KiB
Diff
Raw Normal View History

2022-02-24 14:45:04 +00:00
diff -rupN leptonica-1.82.0/CMakeLists.txt leptonica-1.82.0-new/CMakeLists.txt
--- leptonica-1.82.0/CMakeLists.txt 2021-09-22 23:23:41.000000000 +0200
+++ leptonica-1.82.0-new/CMakeLists.txt 2022-02-22 23:06:47.081641319 +0100
@@ -57,7 +57,7 @@ if(UNIX)
option(SYM_LINK "Create symlink leptonica -> lept on UNIX" OFF)
endif()
-set(leptonica_INSTALL_CMAKE_DIR "lib/cmake/leptonica"
+set(leptonica_INSTALL_CMAKE_DIR "lib${LIB_SUFFIX}/cmake/leptonica"
CACHE STRING "Install destination for CMake package files")
if(NOT SW_BUILD)
@@ -275,7 +275,7 @@ configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/cmake/templates/LeptonicaConfig.cmake.in
${CMAKE_CURRENT_BINARY_DIR}/LeptonicaConfig.cmake @ONLY)
-install(FILES ${CMAKE_CURRENT_BINARY_DIR}/lept.pc DESTINATION lib/pkgconfig)
+install(FILES ${CMAKE_CURRENT_BINARY_DIR}/lept.pc DESTINATION lib${LIB_SUFFIX}/pkgconfig)
install(FILES
${CMAKE_CURRENT_BINARY_DIR}/LeptonicaConfig.cmake
${CMAKE_CURRENT_BINARY_DIR}/LeptonicaConfig-version.cmake
diff -rupN leptonica-1.82.0/src/CMakeLists.txt leptonica-1.82.0-new/src/CMakeLists.txt
--- leptonica-1.82.0/src/CMakeLists.txt 2021-09-22 23:23:41.000000000 +0200
+++ leptonica-1.82.0-new/src/CMakeLists.txt 2022-02-22 23:06:02.035449743 +0100
@@ -17,11 +17,11 @@ endif()
string(REPLACE "-O3" "-O2" CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE}")
add_library (leptonica ${src} ${hdr})
-set_target_properties (leptonica PROPERTIES VERSION ${VERSION_PLAIN})
+set_target_properties (leptonica PROPERTIES VERSION 5)
set_target_properties (leptonica PROPERTIES SOVERSION 5.4.0)
if (WIN32)
-set_target_properties (leptonica PROPERTIES OUTPUT_NAME leptonica-${VERSION_PLAIN})
-set_target_properties (leptonica PROPERTIES DEBUG_OUTPUT_NAME leptonica-${VERSION_PLAIN}d)
+set_target_properties (leptonica PROPERTIES SUFFIX "-5${CMAKE_SHARED_LIBRARY_SUFFIX}")
+set_target_properties (leptonica PROPERTIES SUFFIX "-5${CMAKE_SHARED_LIBRARY_SUFFIX}")
else()
set_target_properties (leptonica PROPERTIES OUTPUT_NAME leptonica)
set_target_properties (leptonica PROPERTIES DEBUG_OUTPUT_NAME leptonica)
@@ -70,7 +70,7 @@ if (UNIX)
${CMAKE_COMMAND} -E create_symlink "$<TARGET_FILE:leptonica>" ${old_target}
DEPENDS ${PROJECT_NAME}
COMMENT "Creating lept symlink")
- install(FILES ${CMAKE_BINARY_DIR}/src/${old_target} DESTINATION lib)
+ install(FILES ${CMAKE_BINARY_DIR}/src/${old_target} DESTINATION lib${LIB_SUFFIX})
endif(SYM_LINK)
endif()
@@ -89,7 +89,7 @@ else()
export(TARGETS leptonica APPEND FILE ${CMAKE_BINARY_DIR}/LeptonicaTargets.cmake)
endif()
-install(TARGETS leptonica EXPORT LeptonicaTargets RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib)
+install(TARGETS leptonica EXPORT LeptonicaTargets RUNTIME DESTINATION bin LIBRARY DESTINATION lib${LIB_SUFFIX} ARCHIVE DESTINATION lib${LIB_SUFFIX})
install(EXPORT LeptonicaTargets DESTINATION ${leptonica_INSTALL_CMAKE_DIR})
install(FILES
${hdr}