Commit b85548ed by Carlos Martín Nieto

cmake: treat LIBGIT2_PC_REQUIRES as a list

It is indeed a list of dependencies for those which include the static archive.
This is in preparation for adding two possible places where we might add openssl
as a dependency.
parent ddd36510
......@@ -210,7 +210,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 +265,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 +439,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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment