diff options
-rw-r--r-- | src/CMakeLists.txt | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index c8389c2b8..b03b96af9 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -184,6 +184,7 @@ IF (USE_HTTPS) LIST(APPEND LIBGIT2_INCLUDES ${OPENSSL_INCLUDE_DIR}) LIST(APPEND LIBGIT2_LIBS ${OPENSSL_LIBRARIES}) LIST(APPEND LIBGIT2_PC_LIBS ${OPENSSL_LDFLAGS}) + LIST(APPEND LIBGIT2_PC_REQUIRES "openssl") ELSEIF (HTTPS_BACKEND STREQUAL "WinHTTP") # WinHTTP setup was handled in the WinHTTP-specific block above ELSE() @@ -210,7 +211,7 @@ IF(SHA1_BACKEND STREQUAL "OpenSSL") IF(CMAKE_SYSTEM_NAME MATCHES "FreeBSD") LIST(APPEND LIBGIT2_PC_LIBS "-lssl") ELSE() - SET(LIBGIT2_PC_REQUIRES "${LIBGIT2_PC_REQUIRES} openssl") + LIST(APPEND LIBGIT2_PC_REQUIRES "openssl") ENDIF() ELSEIF(SHA1_BACKEND STREQUAL "CollisionDetection") ADD_FEATURE_INFO(SHA ON "using CollisionDetection") @@ -265,7 +266,7 @@ IF(NOT USE_BUNDLED_ZLIB) LIST(APPEND LIBGIT2_LIBS "z") LIST(APPEND LIBGIT2_PC_LIBS "-lz") ELSE() - SET(LIBGIT2_PC_REQUIRES "${LIBGIT2_PC_REQUIRES} zlib") + LIST(APPEND LIBGIT2_PC_REQUIRES "zlib") ENDIF() ADD_FEATURE_INFO(zlib ON "using system zlib") ELSE() @@ -439,6 +440,9 @@ IF (SONAME) SET_TARGET_PROPERTIES(git2 PROPERTIES PREFIX "${LIBGIT2_PREFIX}") ENDIF() ENDIF() + +LIST(REMOVE_DUPLICATES LIBGIT2_PC_REQUIRES) +STRING(REPLACE ";" " " LIBGIT2_PC_REQUIRES "${LIBGIT2_PC_REQUIRES}") STRING(REPLACE ";" " " LIBGIT2_PC_LIBS "${LIBGIT2_PC_LIBS}") CONFIGURE_FILE(${libgit2_SOURCE_DIR}/libgit2.pc.in ${libgit2_BINARY_DIR}/libgit2.pc @ONLY) |