Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 9a668ab

Browse files
mstrapEdward Thomson
authored and
Edward Thomson
committed
Option "LIBGIT2_PREFIX" to set the CMAKE's TARGET_PROPERTIES PREFIX
This is especially useful in combination with MinGW to yield the Windows-compliant DLL name "git2.dll" instead of "libgit2.dll"
1 parent f587f38 commit 9a668ab

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -608,6 +608,8 @@ IF (SONAME)
608608
IF (LIBGIT2_FILENAME)
609609
ADD_DEFINITIONS(-DLIBGIT2_FILENAME=\"${LIBGIT2_FILENAME}\")
610610
SET_TARGET_PROPERTIES(git2 PROPERTIES OUTPUT_NAME ${LIBGIT2_FILENAME})
611+
ELSEIF (DEFINED LIBGIT2_PREFIX)
612+
SET_TARGET_PROPERTIES(git2 PROPERTIES PREFIX "${LIBGIT2_PREFIX}")
611613
ENDIF()
612614
ENDIF()
613615
STRING(REPLACE ";" " " LIBGIT2_PC_LIBS "${LIBGIT2_PC_LIBS}")

0 commit comments

Comments
 (0)