2024-02-09 14:41:50 +08:00
|
|
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
2024-03-08 14:49:57 +08:00
|
|
|
index a52dc59..caacfa8 100644
|
2024-02-09 14:41:50 +08:00
|
|
|
--- a/CMakeLists.txt
|
|
|
|
+++ b/CMakeLists.txt
|
2024-03-08 14:49:57 +08:00
|
|
|
@@ -64,6 +64,16 @@ else()
|
|
|
|
endif()
|
2024-02-09 14:41:50 +08:00
|
|
|
|
|
|
|
# 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
|
2024-03-08 14:49:57 +08:00
|
|
|
index ab20d1a..4d2a967 100644
|
2024-02-09 14:41:50 +08:00
|
|
|
--- 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@
|