Commit 0be85a1f authored by Rashad Kanavath's avatar Rashad Kanavath
Browse files

SuperBuild: GEOTIFF: patch to remove INSTALL_NAME_DIR

Superbuild/CMake/patch.cmake is a helper script to apply
.diff files using patch program. This helps us from making
copies of entire source file and copying them individually.
This was done for other patches (ossim, gdal etc..)
TODO: use this mechanism in other places
parent 78107516
......@@ -47,6 +47,8 @@ else()
CMAKE_COMMAND ${SB_CMAKE_COMMAND}
)
SUPERBUILD_PATCH_SOURCE(${proj} "remove-install-name-dir")
set(_SB_${proj}_INCLUDE_DIR ${SB_INSTALL_PREFIX}/include)
if(WIN32)
set(_SB_${proj}_LIBRARY ${SB_INSTALL_PREFIX}/lib/geotiff_i.lib)
......
file(GLOB all_dot_diff_files "${PATCH_DIR}/*diff")
find_program(PATCH_PROGRAM NAMES patch)
if(NOT PATCH_PROGRAM)
message(FATAL_ERROR "patch program not found. PATCH_PROGRAM. search names :' patch'")
endif()
foreach(dot_diff_file ${all_dot_diff_files})
# message("dot_diff_file=${dot_diff_file}")
# message(FATAL_ERROR "${PATCH_PROGRAM} ${SOURCE_DIR} -p1 < ${dot_diff_file}")
execute_process(
COMMAND
${CMAKE_COMMAND} -E chdir ${SOURCE_DIR} ${PATCH_PROGRAM} "-p1" INPUT_FILE "${dot_diff_file}"
RESULT_VARIABLE patch_rv
OUTPUT_VARIABLE patch_ov
OUTPUT_STRIP_TRAILING_WHITESPACE ERROR_STRIP_TRAILING_WHITESPACE)
if(NOT "${patch_rv}" STREQUAL "0")
message(FATAL_ERROR "${PATCH_PROGRAM} returned non-zero exit status '${patch_rv}'")
else()
message(STATUS "${patch_ov}")
endif()
endforeach()
\ No newline at end of file
diff -burN libgeotiff-1.4.1.orig/CMakeLists.txt libgeotiff-1.4.1/CMakeLists.txt
--- libgeotiff-1.4.1.orig/CMakeLists.txt 2016-04-12 11:36:35.000000000 +0200
+++ libgeotiff-1.4.1/CMakeLists.txt 2016-04-12 11:37:04.000000000 +0200
@@ -441,13 +441,6 @@
VERSION ${LINK_VERSION}
SOVERSION ${LINK_SOVERSION}
CLEAN_DIRECT_OUTPUT 1 )
- if (APPLE)
- set_target_properties(
- ${GEOTIFF_LIBRARY_TARGET}
- PROPERTIES
- INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/lib")
- endif()
-
ELSE(UNIX)
# Default:
SET_TARGET_PROPERTIES(${GEOTIFF_LIBRARY_TARGET} PROPERTIES
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment