Skip to content

[WIP] cmake: fix libcurl export alias - #11646

Closed
vszakats wants to merge 1 commit into
curl:masterfrom
vszakats:cmake-fix-export-alias
Closed

vszakats wants to merge 1 commit into
curl:masterfrom
vszakats:cmake-fix-export-alias

Conversation

@vszakats

@vszakats vszakats commented Aug 9, 2023 •

Copy link
Copy Markdown
Member

Fixes:

[25/26] -- Found CURL: ***/build/parts/curl/install/lib64/cmake/CURL/CURLConfig.cmake (found version "8.3.0-DEV")
[25/26] CMake Error at ***/build/parts/curl/install/lib64/cmake/CURL/CURLConfig.cmake:62 (add_library):
[25/26]   add_library cannot create ALIAS target "CURL::libcurl" because target
[25/26]   "CURL::libcurl_static" is imported but not globally visible.

Follow-up to 1199308 #11505

Reported-by: balikalina on Github
Suggested-by: balikalina on Github
Ref: #11629 (comment)
Closes #11646

@vszakats vszakats added the cmake label Aug 9, 2023
@vszakats

vszakats commented Aug 9, 2023

Copy link
Copy Markdown
Member Author

/cc @balikalina

vszakats added a commit to vszakats/libssh2 that referenced this pull request Aug 9, 2023
Fixes:
```
[build] Make Error at /usr/local/lib/cmake/libssh2/libssh2-config.cmake:7 (add library):
[build]   add library cannot create ALIAS target "libssh2::libssh2" because target
[build]   "libssh2: :libssh2 static" is imported but not globally visible.
```

Reported-by: bilal614 on Github
Suggested-by: balikalina on Github
Ref: curl/curl#11629 (comment)
Ref: curl/curl#11646
Fixes: libssh2#1150
Closes #xxxx
@vszakats vszakats changed the title cmake: fix libcurl export alias [WIP] cmake: fix libcurl export alias Aug 10, 2023
@vszakats vszakats changed the title [WIP] cmake: fix libcurl export alias cmake: fix libcurl export alias Aug 11, 2023
Fixes:
```
[25/26] -- Found CURL: ***/build/parts/curl/install/lib64/cmake/CURL/CURLConfig.cmake (found version "8.3.0-DEV")
[25/26] CMake Error at ***/build/parts/curl/install/lib64/cmake/CURL/CURLConfig.cmake:62 (add_library):
[25/26]   add_library cannot create ALIAS target "CURL::libcurl" because target
[25/26]   "CURL::libcurl_static" is imported but not globally visible.
```

Follow-up to 1199308 curl#11505

Reported-by: balikalina on Github
Suggested-by: balikalina on Github
Ref: curl#11629 (comment)
Closes #xxxxx
@vszakats
vszakats force-pushed the cmake-fix-export-alias branch from 639e9cc to 2cd7f53 Compare August 11, 2023 21:30
@vszakats vszakats changed the title cmake: fix libcurl export alias [WIP] cmake: fix libcurl export alias Aug 12, 2023
@vszakats

Copy link
Copy Markdown
Member Author

I couldn't reproduce this locally (might requires an older CMake, such as 3.16.3?), or come up with something conclusive. Read more here, with a minimal test project: libssh2/libssh2#1154 (comment)

Closing this, feel free to discuss below.

@vszakats vszakats closed this Aug 13, 2023
@vszakats
vszakats deleted the cmake-fix-export-alias branch August 13, 2023 13:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

1 participant