2021-12-10 10:18:18 +08:00
|
|
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
|
|
index 89763d7..f648296 100644
|
|
|
|
--- a/CMakeLists.txt
|
|
|
|
+++ b/CMakeLists.txt
|
|
|
|
@@ -342,7 +342,7 @@ install(FILES ${docfiles}
|
|
|
|
################################################################################
|
|
|
|
# pkg-config support
|
|
|
|
################################################################################
|
|
|
|
-if(UNIX OR MINGW)
|
|
|
|
+if(1)
|
|
|
|
configure_proj_pc()
|
|
|
|
|
|
|
|
install(FILES
|
|
|
|
diff --git a/cmake/ProjUtilities.cmake b/cmake/ProjUtilities.cmake
|
|
|
|
index 2e0db05..46e5de1 100644
|
|
|
|
--- a/cmake/ProjUtilities.cmake
|
|
|
|
+++ b/cmake/ProjUtilities.cmake
|
2022-01-04 05:56:02 +08:00
|
|
|
@@ -78,15 +78,21 @@ function(configure_proj_pc)
|
2021-12-10 10:18:18 +08:00
|
|
|
set(VERSION ${PROJ_VERSION})
|
2022-01-04 05:56:02 +08:00
|
|
|
# Build list for Libs.private
|
|
|
|
set(EXTRA_LIBS
|
|
|
|
- -lstdc++
|
|
|
|
- -lsqlite3
|
|
|
|
${CMAKE_THREAD_LIBS_INIT}
|
|
|
|
)
|
2021-12-10 10:18:18 +08:00
|
|
|
+ set(REQUIRES_PRIVATE "sqlite3")
|
|
|
|
if(TIFF_ENABLED)
|
2022-01-04 05:56:02 +08:00
|
|
|
- list(APPEND EXTRA_LIBS -ltiff)
|
2021-12-10 10:18:18 +08:00
|
|
|
+ string(APPEND REQUIRES_PRIVATE " libtiff-4")
|
|
|
|
endif()
|
|
|
|
if(CURL_ENABLED)
|
2022-01-04 05:56:02 +08:00
|
|
|
- list(APPEND EXTRA_LIBS -lcurl)
|
2021-12-10 10:18:18 +08:00
|
|
|
+ string(APPEND REQUIRES_PRIVATE " libcurl")
|
2022-01-04 05:56:02 +08:00
|
|
|
+ endif()
|
|
|
|
+ if(WIN32 AND NOT MINGW)
|
|
|
|
+ string(APPEND EXTRA_LIBS " -lole32 -lshell32")
|
|
|
|
+ elseif(NOT APPLE OR CMAKE_ANDROID_STL_TYPE MATCHES "^gnu")
|
|
|
|
+ string(APPEND EXTRA_LIBS " -lstdc++")
|
|
|
|
+ else()
|
|
|
|
+ string(APPEND EXTRA_LIBS " -lc++")
|
2021-12-10 10:18:18 +08:00
|
|
|
endif()
|
2022-01-04 05:56:02 +08:00
|
|
|
if(HAVE_LIBM)
|
|
|
|
list(APPEND EXTRA_LIBS -lm)
|
2021-12-10 10:18:18 +08:00
|
|
|
diff --git a/proj.pc.in b/proj.pc.in
|
|
|
|
index 846310d..3feac38 100644
|
|
|
|
--- a/proj.pc.in
|
|
|
|
+++ b/proj.pc.in
|
2022-01-04 05:56:02 +08:00
|
|
|
@@ -11,4 +11,5 @@ Requires:
|
2021-12-10 10:18:18 +08:00
|
|
|
Version: @VERSION@
|
|
|
|
Libs: -L${libdir} -lproj
|
2022-01-04 05:56:02 +08:00
|
|
|
Libs.private: @EXTRA_LIBS@
|
2021-12-10 10:18:18 +08:00
|
|
|
+Requires.private: @REQUIRES_PRIVATE@
|
|
|
|
Cflags: -I${includedir}
|