mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-28 11:21:12 +08:00
408a9027bf
- [X] Changes comply with the [maintainer guide](https://github.com/microsoft/vcpkg-docs/blob/main/vcpkg/contributing/maintainer-guide.md) - [X] SHA512s are updated for each updated download - [ ] ~The "supports" clause reflects platforms that may be fixed by this new version~ - [ ] ~Any fixed [CI baseline](https://github.com/microsoft/vcpkg/blob/master/scripts/ci.baseline.txt) entries are removed from that file.~ - [ ] ~Any patches that are no longer applied are deleted from the port's directory.~ - [X] The version database is fixed by rerunning `./vcpkg x-add-version --all` and committing the result. - [X] Only one version is added to each modified port's versions file.
32 lines
1.0 KiB
Diff
32 lines
1.0 KiB
Diff
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
index a52dc59..caacfa8 100644
|
|
--- a/CMakeLists.txt
|
|
+++ b/CMakeLists.txt
|
|
@@ -64,6 +64,16 @@ else()
|
|
endif()
|
|
|
|
# Configure and install pkgconfig file
|
|
+set(FAKE_CXX_LINKAGE "")
|
|
+foreach(lib IN LISTS CMAKE_CXX_IMPLICIT_LINK_LIBRARIES)
|
|
+ if(lib IN_LIST CMAKE_C_IMPLICIT_LINK_LIBRARIES)
|
|
+ continue()
|
|
+ elseif(EXISTS "${lib}")
|
|
+ string(APPEND FAKE_CXX_LINKAGE " ${CMAKE_LINK_LIBRARY_FILE_FLAG}${lib}")
|
|
+ else()
|
|
+ string(APPEND FAKE_CXX_LINKAGE " ${CMAKE_LINK_LIBRARY_FLAG}${lib}")
|
|
+ endif()
|
|
+endforeach()
|
|
configure_file(Lerc.pc.in ${CMAKE_CURRENT_BINARY_DIR}/Lerc.pc @ONLY)
|
|
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/Lerc.pc
|
|
DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
|
|
diff --git a/Lerc.pc.in b/Lerc.pc.in
|
|
index ab20d1a..4d2a967 100644
|
|
--- a/Lerc.pc.in
|
|
+++ b/Lerc.pc.in
|
|
@@ -9,4 +9,4 @@ URL: @PROJECT_HOMEPAGE_URL@
|
|
Version: @PROJECT_VERSION@
|
|
Cflags: -I${includedir}
|
|
Cflags.private: -DLERC_STATIC
|
|
-Libs: -L${libdir} -lLerc
|
|
+Libs: -L${libdir} -lLerc @FAKE_CXX_LINKAGE@
|