-
Notifications
You must be signed in to change notification settings - Fork 7.6k
[libgeotiff] Fix usage #25636
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
Closed
JackBoosY
wants to merge
13
commits into
microsoft:master
from
JackBoosY:dev/jack/fix-liblas-libgeotiff-usage
Closed
[libgeotiff] Fix usage #25636
Changes from 7 commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
a8f7294
[libgeotiff] Fix usage
a931966
[liblas] Fix usage
c3b5253
version
010c70f
typo
d2a744d
version
b505ea6
Add license
64ba0d6
version
fbe44df
apply suggestions
7bc887e
version
022e74b
typo
75f6d32
version
e026ea7
Revert liblas changes
2f82119
version
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| diff --git a/libgeotiff/cmake/project-config.cmake.in b/libgeotiff/cmake/project-config.cmake.in | ||
| index 3690489..f0351e1 100644 | ||
| --- a/libgeotiff/cmake/project-config.cmake.in | ||
| +++ b/libgeotiff/cmake/project-config.cmake.in | ||
| @@ -13,6 +13,9 @@ | ||
| # @PROJECT_NAME_UPPER@_LIBRARY | ||
| # @PROJECT_NAME_UPPER@_LIBRARIES | ||
|
|
||
| +cmake_policy(PUSH) | ||
| +cmake_policy(SET CMP0012 NEW) | ||
| + | ||
| # Tell the user project where to find our headers and libraries | ||
| get_filename_component (_DIR ${CMAKE_CURRENT_LIST_FILE} PATH) | ||
| get_filename_component (_ROOT "${_DIR}/@PROJECT_ROOT_DIR@" ABSOLUTE) | ||
| @@ -22,13 +25,14 @@ set (@PROJECT_NAME@_BINARY_DIRS "${_ROOT}/bin") | ||
| unset (_ROOT) | ||
| unset (_DIR) | ||
|
|
||
| +include(CMakeFindDependencyMacro) | ||
| +@CONFIG_DEPENDENCIES@ | ||
| + | ||
| set (@PROJECT_NAME@_LIBRARIES @GEOTIFF_LIBRARY_TARGET@) | ||
| if("@BUILD_SHARED_LIBS@") | ||
| set (@PROJECT_NAME@_SHARED_LIBRARIES ${@PROJECT_NAME@_LIBRARIES}) | ||
| else() | ||
| set (@PROJECT_NAME@_STATIC_LIBRARIES ${@PROJECT_NAME@_LIBRARIES}) | ||
| - include(CMakeFindDependencyMacro) | ||
| -@CONFIG_DEPENDENCIES@ | ||
| endif() | ||
|
|
||
| if(NOT @PROJECT_NAME@_FIND_QUIETLY) | ||
| @@ -52,3 +56,5 @@ set (@PROJECT_NAME_UPPER@_FOUND 1) | ||
| set (@PROJECT_NAME_UPPER@_LIBRARIES ${@PROJECT_NAME@_LIBRARIES}) | ||
| set (@PROJECT_NAME_UPPER@_INCLUDE_DIR ${@PROJECT_NAME@_INCLUDE_DIRS}) | ||
| set (@PROJECT_NAME_UPPER@_LIBRARY ${@PROJECT_NAME@_LIBRARIES}) | ||
| + | ||
| +cmake_policy(POP) | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
| index d246a88..b0417ee 100644 | ||
| --- a/CMakeLists.txt | ||
| +++ b/CMakeLists.txt | ||
| @@ -107,7 +107,7 @@ set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${LIBLAS_BUILD_OUTPUT_DIRECTORY}) | ||
| set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${LIBLAS_BUILD_OUTPUT_DIRECTORY}) | ||
|
|
||
| file(READ "doc/index.txt" README ) | ||
| -file(WRITE "README.txt" "${README}") | ||
| +file(WRITE "${CMAKE_BINARY_DIR}/README.txt" "${README}") | ||
|
|
||
| ############################################################################### | ||
| # Platform and compiler specific settings | ||
| @@ -337,7 +337,7 @@ set(LIBLAS_DATA_DIR ${LIBLAS_DATA_SUBDIR}) | ||
| ############################################################################### | ||
| # Installation commands | ||
|
|
||
| -install(FILES AUTHORS COPYING INSTALL LICENSE.txt README.txt | ||
| +install(FILES AUTHORS COPYING INSTALL LICENSE.txt ${CMAKE_BINARY_DIR}/README.txt | ||
| DESTINATION ${LIBLAS_DATA_DIR}/doc) | ||
|
|
||
| ############################################################################### |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| diff --git a/cmake/liblas-config.cmake.in b/cmake/liblas-config.cmake.in | ||
| index 175e997..4f3b1ba 100644 | ||
| --- a/cmake/liblas-config.cmake.in | ||
| +++ b/cmake/liblas-config.cmake.in | ||
| @@ -12,6 +12,12 @@ message (STATUS "Reading ${CMAKE_CURRENT_LIST_FILE}") | ||
| # libLAS_VERSION is set by version file | ||
| message (STATUS "libLAS configuration, version " ${libLAS_VERSION}) | ||
|
|
||
| +include(CMakeFindDependencyMacro) | ||
| + | ||
| +if (@WITH_GEOTIFF@) | ||
| + find_dependency(GeoTIFF CONFIG) | ||
| +endif() | ||
| + | ||
| # Tell the user project where to find our headers and libraries | ||
| get_filename_component (_DIR ${CMAKE_CURRENT_LIST_FILE} PATH) | ||
| get_filename_component (PROJECT_ROOT_DIR "${_DIR}/@PROJECT_ROOT_DIR@" ABSOLUTE) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| liblas provides CMake targets: | ||
|
|
||
| # this is heuristically generated, and may not be correct | ||
|
JackBoosY marked this conversation as resolved.
Outdated
|
||
| find_package(libLAS CONFIG REQUIRED) | ||
| target_link_libraries(main PRIVATE liblas liblas_c) | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.