-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
libgeotiff: add version 1.7.3 #24156
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
index c298a2e..bc0b6c1 100644 | ||
--- a/CMakeLists.txt | ||
+++ b/CMakeLists.txt | ||
@@ -5,6 +5,7 @@ | ||
|
@@ -46,31 +48,25 @@ | |
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${COMPILE_FLAGS} -std=c99") | ||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${COMPILE_FLAGS} -std=c++98") | ||
IF(GEOTIFF_BUILD_PEDANTIC) | ||
@@ -120,6 +121,7 @@ INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}) | ||
INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/libxtiff) | ||
@@ -171,7 +172,7 @@ IF(WITH_TIFF) | ||
FIND_PACKAGE(TIFF REQUIRED) | ||
endif () | ||
|
||
# TIFF support - required, default=ON | ||
+if(0) | ||
SET(WITH_TIFF TRUE CACHE BOOL "Choose if TIFF support should be built") | ||
|
||
FIND_PACKAGE(PROJ NO_MODULE QUIET) | ||
@@ -192,6 +194,7 @@ IF(WITH_TIFF) | ||
ADD_DEFINITIONS(-DHAVE_TIFF=1) | ||
ENDIF(TIFF_FOUND) | ||
ENDIF(WITH_TIFF) | ||
+endif() | ||
|
||
# Turn off TOWGS84 support | ||
SET(WITH_TOWGS84 TRUE CACHE BOOL "Build with TOWGS84 support") | ||
@@ -300,7 +303,6 @@ INSTALL(FILES ${GEOTIFF_LIB_HEADERS} DESTINATION include) | ||
- IF(TIFF_FOUND) | ||
+ IF(0) | ||
# Confirm required API is available | ||
INCLUDE(CheckFunctionExists) | ||
SET(CMAKE_REQUIRED_LIBRARIES ${TIFF_LIBRARIES}) | ||
@@ -300,7 +301,7 @@ INSTALL(FILES ${GEOTIFF_LIB_HEADERS} DESTINATION include) | ||
############################################################################### | ||
# Build libxtiff library | ||
|
||
-ADD_SUBDIRECTORY(libxtiff) | ||
+# ADD_SUBDIRECTORY(libxtiff) | ||
|
||
############################################################################### | ||
# Build libgeotiff library | ||
@@ -345,7 +347,7 @@ IF(UNIX) | ||
@@ -345,7 +346,7 @@ IF(UNIX) | ||
VERSION ${LINK_VERSION} | ||
SOVERSION ${LINK_SOVERSION} | ||
CLEAN_DIRECT_OUTPUT 1 ) | ||
|
@@ -79,24 +75,3 @@ | |
set_target_properties( | ||
${GEOTIFF_LIBRARY_TARGET} | ||
PROPERTIES | ||
@@ -361,11 +363,15 @@ ENDIF(UNIX) | ||
SET_TARGET_PROPERTIES(${GEOTIFF_LIBRARY_TARGET} PROPERTIES | ||
OUTPUT_NAME ${GEOTIFF_LIB_NAME}) | ||
|
||
-TARGET_LINK_LIBRARIES(${GEOTIFF_LIBRARY_TARGET} | ||
- ${TIFF_LIBRARIES} | ||
- ${PROJ_LIBRARIES} | ||
- ${ZLIB_LIBRARIES} | ||
- ${JPEG_LIBRARIES}) | ||
+find_package(TIFF REQUIRED) | ||
+target_link_libraries(${GEOTIFF_LIBRARY_TARGET} TIFF::TIFF) | ||
+find_package(proj4 QUIET CONFIG) | ||
+if(TARGET PROJ4::proj) | ||
+ target_link_libraries(${GEOTIFF_LIBRARY_TARGET} PROJ4::proj) | ||
+else() | ||
+ find_package(proj REQUIRED CONFIG) | ||
+ target_link_libraries(${GEOTIFF_LIBRARY_TARGET} PROJ::proj) | ||
+endif() | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You don't want to remove this. zlib & libjpeg are not direct dependencies of libgeotiff, it's old CMake style. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @SpaceIm |
||
|
||
# INSTALL(TARGETS ${GEOTIFF_ARCHIVE_TARGET} ${GEOTIFF_LIBRARY_TARGET} | ||
# RUNTIME DESTINATION ${GEOTIFF_BIN_DIR} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,12 @@ | ||
diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
index 43113fa..f8f85f8 100644 | ||
--- a/CMakeLists.txt | ||
+++ b/CMakeLists.txt | ||
@@ -5,6 +5,7 @@ | ||
# Author: Mateusz Loskot <mateusz@loskot.net> | ||
# | ||
############################################################################### | ||
+CMAKE_MINIMUM_REQUIRED(VERSION 3.1) | ||
+CMAKE_MINIMUM_REQUIRED(VERSION 3.0.0) | ||
PROJECT(GeoTIFF) | ||
|
||
SET(GEOTIFF_LIB_NAME geotiff) | ||
|
@@ -16,28 +18,7 @@ | |
|
||
SET(CMAKE_COLOR_MAKEFILE ON) | ||
|
||
@@ -54,7 +54,7 @@ IF(CMAKE_BUILD_TYPE MATCHES Debug) | ||
SET(GEOTIFF_BUILD_PEDANTIC TRUE) | ||
ENDIF() | ||
|
||
-if (CMAKE_MAJOR_VERSION GREATER 2) | ||
+if(0) # No ! we want CMP0042 NEW for relocatable shared lib on macOS | ||
cmake_policy(SET CMP0022 OLD) # interface link libraries | ||
cmake_policy(SET CMP0042 OLD) # osx rpath | ||
endif() | ||
@@ -80,8 +80,9 @@ SET(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/lib) | ||
|
||
IF(WIN32) | ||
IF(MSVC) | ||
- ADD_DEFINITIONS(-DBUILD_AS_DLL=1) | ||
- ADD_DEFINITIONS(/DW4) | ||
+ IF(BUILD_SHARED_LIBS) | ||
+ ADD_DEFINITIONS(-DBUILD_AS_DLL=1) | ||
+ ENDIF() | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please don't remove this, there is even a comment explaining why :/ There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @SpaceIm |
||
if (NOT (MSVC_VERSION VERSION_LESS 1400)) | ||
ADD_DEFINITIONS(-D_CRT_SECURE_NO_DEPRECATE) | ||
ADD_DEFINITIONS(-D_CRT_SECURE_NO_WARNINGS) | ||
@@ -92,7 +93,7 @@ IF(WIN32) | ||
@@ -92,7 +92,7 @@ IF(WIN32) | ||
ENDIF() | ||
|
||
IF(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX) | ||
|
@@ -46,31 +27,25 @@ | |
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${COMPILE_FLAGS} -std=c99") | ||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${COMPILE_FLAGS} -std=c++98") | ||
IF(GEOTIFF_BUILD_PEDANTIC) | ||
@@ -120,6 +121,7 @@ INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}) | ||
INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/libxtiff) | ||
|
||
# TIFF support - required, default=ON | ||
+if(0) | ||
SET(WITH_TIFF TRUE CACHE BOOL "Choose if TIFF support should be built") | ||
|
||
FIND_PACKAGE(PROJ NO_MODULE QUIET) | ||
@@ -192,6 +194,7 @@ IF(WITH_TIFF) | ||
ADD_DEFINITIONS(-DHAVE_TIFF=1) | ||
ENDIF(TIFF_FOUND) | ||
ENDIF(WITH_TIFF) | ||
+endif() | ||
|
||
# Turn off TOWGS84 support | ||
SET(WITH_TOWGS84 TRUE CACHE BOOL "Build with TOWGS84 support") | ||
@@ -301,7 +304,6 @@ INSTALL(FILES ${GEOTIFF_LIB_HEADERS} DESTINATION include) | ||
@@ -171,7 +171,7 @@ IF(WITH_TIFF) | ||
FIND_PACKAGE(TIFF REQUIRED) | ||
endif () | ||
|
||
- IF(TIFF_FOUND) | ||
+ IF(0) | ||
# Confirm required API is available | ||
INCLUDE(CheckFunctionExists) | ||
SET(CMAKE_REQUIRED_LIBRARIES ${TIFF_LIBRARIES}) | ||
@@ -301,7 +301,7 @@ INSTALL(FILES ${GEOTIFF_LIB_HEADERS} DESTINATION include) | ||
############################################################################### | ||
# Build libxtiff library | ||
|
||
-ADD_SUBDIRECTORY(libxtiff) | ||
+# ADD_SUBDIRECTORY(libxtiff) | ||
|
||
############################################################################### | ||
# Build libgeotiff library | ||
@@ -346,7 +348,7 @@ IF(UNIX) | ||
@@ -346,7 +346,7 @@ IF(UNIX) | ||
VERSION ${LINK_VERSION} | ||
SOVERSION ${LINK_SOVERSION} | ||
CLEAN_DIRECT_OUTPUT 1 ) | ||
|
@@ -79,24 +54,3 @@ | |
set_target_properties( | ||
${GEOTIFF_LIBRARY_TARGET} | ||
PROPERTIES | ||
@@ -362,11 +364,15 @@ ENDIF(UNIX) | ||
SET_TARGET_PROPERTIES(${GEOTIFF_LIBRARY_TARGET} PROPERTIES | ||
OUTPUT_NAME ${GEOTIFF_LIB_NAME}) | ||
|
||
-TARGET_LINK_LIBRARIES(${GEOTIFF_LIBRARY_TARGET} | ||
- ${TIFF_LIBRARIES} | ||
- ${PROJ_LIBRARIES} | ||
- ${ZLIB_LIBRARIES} | ||
- ${JPEG_LIBRARIES}) | ||
+find_package(TIFF REQUIRED) | ||
+target_link_libraries(${GEOTIFF_LIBRARY_TARGET} TIFF::TIFF) | ||
+find_package(proj4 QUIET CONFIG) | ||
+if(TARGET PROJ4::proj) | ||
+ target_link_libraries(${GEOTIFF_LIBRARY_TARGET} PROJ4::proj) | ||
+else() | ||
+ find_package(proj REQUIRED CONFIG) | ||
+ target_link_libraries(${GEOTIFF_LIBRARY_TARGET} PROJ::proj) | ||
+endif() | ||
|
||
# INSTALL(TARGETS ${GEOTIFF_ARCHIVE_TARGET} ${GEOTIFF_LIBRARY_TARGET} | ||
# RUNTIME DESTINATION ${GEOTIFF_BIN_DIR} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
index 4862f86..0fbc867 100644 | ||
--- a/CMakeLists.txt | ||
+++ b/CMakeLists.txt | ||
@@ -92,7 +92,7 @@ IF(WIN32) | ||
ENDIF() | ||
|
||
IF(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX) | ||
- SET(COMPILE_FLAGS "-fPIC -Wall -Wno-long-long") | ||
+ SET(COMPILE_FLAGS "-Wall -Wno-long-long") | ||
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${COMPILE_FLAGS} -std=c99") | ||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${COMPILE_FLAGS} -std=c++98") | ||
IF(GEOTIFF_BUILD_PEDANTIC) | ||
@@ -168,7 +168,7 @@ IF(WITH_TIFF) | ||
FIND_PACKAGE(TIFF REQUIRED) | ||
endif () | ||
|
||
- IF(TIFF_FOUND) | ||
+ IF(0) | ||
# Confirm required API is available | ||
INCLUDE(CheckFunctionExists) | ||
SET(CMAKE_REQUIRED_LIBRARIES ${TIFF_LIBRARIES}) | ||
@@ -258,7 +258,7 @@ INSTALL(FILES ${GEOTIFF_LIB_HEADERS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) | ||
############################################################################### | ||
# Build libxtiff library | ||
|
||
-ADD_SUBDIRECTORY(libxtiff) | ||
+# ADD_SUBDIRECTORY(libxtiff) | ||
|
||
############################################################################### | ||
# Build libgeotiff library | ||
@@ -302,7 +302,7 @@ if(UNIX) | ||
VERSION ${LINK_VERSION} | ||
SOVERSION ${LINK_SOVERSION} | ||
CLEAN_DIRECT_OUTPUT 1 ) | ||
- if (APPLE) | ||
+ if (0) # no custom install_name, we want @rpath | ||
set_target_properties( | ||
${GEOTIFF_LIBRARY_TARGET} | ||
PROPERTIES |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
versions: | ||
"1.7.3": | ||
folder: "all" | ||
"1.7.1": | ||
folder: "all" | ||
"1.7.0": | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If there is a pkgconfig file in this new version, you should add pkg_config_name property in package_info()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@SpaceIm
Thank you for your pointing.
I add
set_property("cmake_target_name", "geotiff_library")
.