-
Notifications
You must be signed in to change notification settings - Fork 7.4k
[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
[libgeotiff] Fix usage #25636
Changes from all commits
a8f7294
a931966
c3b5253
010c70f
d2a744d
b505ea6
64ba0d6
fbe44df
7bc887e
022e74b
75f6d32
e026ea7
2f82119
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,8 +1,8 @@ | ||
| diff --git a/libgeotiff/CMakeLists.txt b/libgeotiff/CMakeLists.txt | ||
| index 1840258..fcf2dd0 100644 | ||
| index bd59682..5c80b9d 100644 | ||
| --- a/libgeotiff/CMakeLists.txt | ||
| +++ b/libgeotiff/CMakeLists.txt | ||
| @@ -311,17 +311,18 @@ endif() | ||
| @@ -332,17 +332,18 @@ endif() | ||
| SET_TARGET_PROPERTIES(${GEOTIFF_LIBRARY_TARGET} PROPERTIES | ||
| OUTPUT_NAME ${GEOTIFF_LIB_NAME}) | ||
|
|
||
|
|
@@ -20,15 +20,25 @@ index 1840258..fcf2dd0 100644 | |
| if(TARGET PROJ::proj) | ||
| set(PROJ_LIBRARIES PROJ::proj) | ||
| - string(APPEND CONFIG_DEPENDENCIES " find_dependency(PROJ CONFIG)\n") | ||
| + string(APPEND CONFIG_PRIVATE_DEPENDENCIES " find_dependency(PROJ CONFIG)\n") | ||
| + string(APPEND CONFIG_PUBLIC_DEPENDENCIES " find_dependency(PROJ CONFIG)\n") | ||
|
Contributor
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. I still think this change is wrong/not needed. It is a private dependency. It is not part of
Contributor
Author
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. Anyway, this port requires to link with proj: #25636 (comment)
Contributor
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. This port does link with proj. That's how
Contributor
Author
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. No ideas with this. Maybe we also should fix them.
Contributor
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 have to show what is actually broken. If it ain't broken, don't fix it.
Contributor
Author
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. In geotiff-depends-debug.cmake: set_target_properties(geotiff_library PROPERTIES
IMPORTED_IMPLIB_DEBUG "${_IMPORT_PREFIX}/debug/lib/geotiff_d_i.lib"
IMPORTED_LINK_DEPENDENT_LIBRARIES_DEBUG "PROJ::proj"
IMPORTED_LINK_INTERFACE_LIBRARIES_DEBUG "TIFF::TIFF"
IMPORTED_LOCATION_DEBUG "${_IMPORT_PREFIX}/debug/bin/geotiff_d.dll"
)Doc: https://cmake.org/cmake/help/latest/prop_tgt/IMPORTED_LINK_DEPENDENT_LIBRARIES.html
Contributor
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. Yes. That's what I'm saying: |
||
| endif() | ||
| target_link_libraries(${GEOTIFF_LIBRARY_TARGET} PRIVATE | ||
| ${PROJ_LIBRARIES}) | ||
| diff --git a/libgeotiff/cmake/project-config.cmake.in b/libgeotiff/cmake/project-config.cmake.in | ||
| index 3690489..87de991 100644 | ||
| index 3690489..774de2d 100644 | ||
| --- a/libgeotiff/cmake/project-config.cmake.in | ||
| +++ b/libgeotiff/cmake/project-config.cmake.in | ||
| @@ -22,13 +22,14 @@ set (@PROJECT_NAME@_BINARY_DIRS "${_ROOT}/bin") | ||
| @@ -13,6 +13,9 @@ | ||
| # @PROJECT_NAME_UPPER@_LIBRARY | ||
| # @PROJECT_NAME_UPPER@_LIBRARIES | ||
|
|
||
| +cmake_policy(PUSH) | ||
| +cmake_policy(SET CMP0012 NEW) | ||
|
Contributor
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. I often add the policy in wrappers, but I'm not sure if this should be extended to CMake config. Ports which use CMake config hardly run with such low
Contributor
Author
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. I think this is a upstream bug, so it's not appropriate to place it in a wrapper.
Contributor
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. I didn't mean that it is to be placed in a wrapper for libgeotiff. |
||
| + | ||
| # 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) | ||
|
|
||
|
|
@@ -45,3 +55,9 @@ index 3690489..87de991 100644 | |
| 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) | ||
Uh oh!
There was an error while loading. Please reload this page.