diff options
author | Marc Strapetz <marc.strapetz@gmail.com> | 2016-03-15 18:32:37 +0100 |
---|---|---|
committer | Marc Strapetz <marc.strapetz@gmail.com> | 2016-03-15 18:32:37 +0100 |
commit | 059f33bf759b47a5e664bee24d2c7774cfaecbaf (patch) | |
tree | 53011395d03436614c573ff9d34be6e657b44da6 | |
parent | b7809b84692b4df7f11d603cc5da0860609e0555 (diff) | |
download | libgit2-059f33bf759b47a5e664bee24d2c7774cfaecbaf.tar.gz |
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"
-rw-r--r-- | CMakeLists.txt | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 1801c938d..7d950a05f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -608,6 +608,8 @@ IF (SONAME) IF (LIBGIT2_FILENAME) ADD_DEFINITIONS(-DLIBGIT2_FILENAME=\"${LIBGIT2_FILENAME}\") SET_TARGET_PROPERTIES(git2 PROPERTIES OUTPUT_NAME ${LIBGIT2_FILENAME}) + ELSEIF (DEFINED LIBGIT2_PREFIX) + SET_TARGET_PROPERTIES(git2 PROPERTIES PREFIX "${LIBGIT2_PREFIX}") ENDIF() ENDIF() STRING(REPLACE ";" " " LIBGIT2_PC_LIBS "${LIBGIT2_PC_LIBS}") |