Skip to content

cmake: re-add Libssh2:libssh2 for compatibiliy + lowercase namespace - #1104

Closed
vszakats wants to merge 6 commits into
libssh2:masterfrom
vszakats:cmake-export-fixup
Closed

vszakats wants to merge 6 commits into
libssh2:masterfrom
vszakats:cmake-export-fixup

Conversation

@vszakats

@vszakats vszakats commented Jun 23, 2023 •

Copy link
Copy Markdown
Member
  • add libssh2:libssh2 target that selects the shared lib if built,
    otherwise the static one.

  • re-add Libssh2:libssh2 target for compatibility with v1.10.0 and
    earlier. This is an alias for libssh2:libssh2.

  • keep libssh2:libssh2_shared and libssh2_libssh2_static targets.

  • allow using find_package(libssh2) in dependents as an alternative
    to find_package(Libssh2).

Co-authored-by: Radek Brich
Suggested-by: Haowei Hsu

Fixes #1103
Fixes #731
Closes #1104

vszakats added 2 commits June 23, 2023 16:42
…namespace

Co-authored-by: Radek Brich
Suggested-by: Haowei Hsu

Fixes libssh2#1103
Fixes libssh2#731
Closes libssh2#1104
@vszakats vszakats added the build label Jun 23, 2023
@vszakats

Copy link
Copy Markdown
Member Author

Broken as it is, due to this:

CMake Error at src/CMakeLists.txt:180 (export):
  export given ALIAS target "libssh2::libssh2" which may not be exported.

Comment thread src/CMakeLists.txt Resolved
@vszakats
vszakats requested a review from rbrich June 25, 2023 13:34
@vszakats vszakats changed the title cmake: re-add Libssh2:libssh2 for compatibiliy + switch to lowercase namespace cmake: re-add Libssh2:libssh2 for compatibiliy + lowercase namespace Jun 25, 2023
@vszakats vszakats changed the title cmake: re-add Libssh2:libssh2 for compatibiliy + lowercase namespace cmake: re-add Libssh2:libssh2 for compatibiliy + lowercase namespace Jun 25, 2023
@vszakats vszakats closed this in 2da13c1 Jun 25, 2023
@vszakats

Copy link
Copy Markdown
Member Author

Thank you @rbrich, merged now.

@vszakats
vszakats deleted the cmake-export-fixup branch June 25, 2023 19:15
lampmanyao pushed a commit to lampmanyao/libssh2 that referenced this pull request Jul 16, 2023
- add `libssh2:libssh2` target that selects the shared lib if built,
  otherwise the static one.

- re-add `Libssh2:libssh2` target for compatibility with v1.10.0 and
  earlier. This is an alias for `libssh2:libssh2`.

- keep `libssh2:libssh2_shared` and `libssh2_libssh2_static` targets.

- allow using `find_package(libssh2)` in dependents as an alternative
  to `find_package(Libssh2)`.

Co-authored-by: Radek Brich
Suggested-by: Haowei Hsu

Fixes libssh2#1103
Fixes libssh2#731
Closes libssh2#1104
agreppin pushed a commit to agreppin/libssh2 that referenced this pull request Jul 14, 2024
- add `libssh2:libssh2` target that selects the shared lib if built,
  otherwise the static one.

- re-add `Libssh2:libssh2` target for compatibility with v1.10.0 and
  earlier. This is an alias for `libssh2:libssh2`.

- keep `libssh2:libssh2_shared` and `libssh2_libssh2_static` targets.

- allow using `find_package(libssh2)` in dependents as an alternative
  to `find_package(Libssh2)`.

Co-authored-by: Radek Brich
Suggested-by: Haowei Hsu

Fixes libssh2#1103
Fixes libssh2#731
Closes libssh2#1104
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

cmake: imported target Libssh2::libssh2 disappeared [suggest] Change the IMPORTED target name to libssh2::libssh2 or Libssh2::Libssh2.

2 participants