leptonica/leptonica_cmake.patch

54 lines
2.9 KiB
Diff
Raw Normal View History

2022-12-21 14:25:46 +00:00
diff -rupN leptonica-1.83.0/CMakeLists.txt leptonica-1.83.0-new/CMakeLists.txt
--- leptonica-1.83.0/CMakeLists.txt 2022-12-20 22:54:49.000000000 +0100
+++ leptonica-1.83.0-new/CMakeLists.txt 2022-12-21 10:50:17.667061152 +0100
@@ -60,7 +60,7 @@ option(LIBWEBP_SUPPORT "Build with WebP
option(OPENJPEG_SUPPORT "Build with OpenJPEG support" ON)
2022-02-24 14:45:04 +00:00
2022-12-21 14:25:46 +00:00
set(leptonica_INSTALL_CMAKE_DIR
- "lib/cmake/leptonica"
+ "lib${LIB_SUFFIX}/cmake/leptonica"
2022-02-24 14:45:04 +00:00
CACHE STRING "Install destination for CMake package files")
if(NOT SW_BUILD)
2022-12-21 14:25:46 +00:00
@@ -307,7 +307,7 @@ configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/cmake/templates/LeptonicaConfig.cmake.in
${CMAKE_CURRENT_BINARY_DIR}/LeptonicaConfig.cmake @ONLY)
2022-02-24 14:45:04 +00:00
-install(FILES ${CMAKE_CURRENT_BINARY_DIR}/lept.pc DESTINATION lib/pkgconfig)
+install(FILES ${CMAKE_CURRENT_BINARY_DIR}/lept.pc DESTINATION lib${LIB_SUFFIX}/pkgconfig)
2022-12-21 14:25:46 +00:00
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/LeptonicaConfig.cmake
${CMAKE_CURRENT_BINARY_DIR}/LeptonicaConfig-version.cmake
DESTINATION ${leptonica_INSTALL_CMAKE_DIR})
diff -rupN leptonica-1.83.0/src/CMakeLists.txt leptonica-1.83.0-new/src/CMakeLists.txt
--- leptonica-1.83.0/src/CMakeLists.txt 2022-12-20 22:54:49.000000000 +0100
+++ leptonica-1.83.0-new/src/CMakeLists.txt 2022-12-21 12:21:04.107182989 +0100
@@ -20,8 +20,8 @@ add_library (leptoni
set_target_properties (leptonica PROPERTIES VERSION 6.0.0)
set_target_properties (leptonica PROPERTIES SOVERSION 6)
2022-02-24 14:45:04 +00:00
if (WIN32)
-set_target_properties (leptonica PROPERTIES OUTPUT_NAME leptonica-${VERSION_PLAIN})
-set_target_properties (leptonica PROPERTIES DEBUG_OUTPUT_NAME leptonica-${VERSION_PLAIN}d)
2022-12-21 14:25:46 +00:00
+set_target_properties (leptonica PROPERTIES SUFFIX "-6${CMAKE_SHARED_LIBRARY_SUFFIX}")
+set_target_properties (leptonica PROPERTIES SUFFIX "-6${CMAKE_SHARED_LIBRARY_SUFFIX}")
else()
2022-02-24 14:45:04 +00:00
set_target_properties (leptonica PROPERTIES OUTPUT_NAME leptonica)
set_target_properties (leptonica PROPERTIES DEBUG_OUTPUT_NAME leptonica)
2022-12-21 14:25:46 +00:00
@@ -70,7 +70,7 @@ if (UNIX)
2022-02-24 14:45:04 +00:00
${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()
2022-12-21 14:25:46 +00:00
@@ -89,7 +89,7 @@ else()
2022-02-24 14:45:04 +00:00
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}