diff options
author | nulltoken <emeric.fermas@gmail.com> | 2013-06-12 21:15:58 +0200 |
---|---|---|
committer | nulltoken <emeric.fermas@gmail.com> | 2013-06-13 10:12:44 +0200 |
commit | c1cf1af46a541419160473decb0955dda6ac721e (patch) | |
tree | 919bbb040943933394277ed38fc0c494a9df1a76 /CMakeLists.txt | |
parent | 5a6e45cc841194a61ccad1006ad4a4b9aa2ecbc5 (diff) | |
download | libgit2-c1cf1af46a541419160473decb0955dda6ac721e.tar.gz |
cmake: Add option to specify the name of the binary
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index f06a84299..bdc46d0b3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -27,7 +27,8 @@ OPTION( BUILD_EXAMPLES "Build library usage example apps" OFF ) OPTION( TAGS "Generate tags" OFF ) OPTION( PROFILE "Generate profiling information" OFF ) OPTION( ENABLE_TRACE "Enables tracing support" OFF ) -OPTION( SONAME_APPEND "Append the given string to the library's filename" OFF ) +OPTION( LIBGIT2_FILENAME "Name of the produced binary" OFF ) + IF(MSVC) # This option is only availalbe when building with MSVC. By default, # libgit2 is build using the stdcall calling convention, as that's what @@ -326,8 +327,9 @@ MSVC_SPLIT_SOURCES(git2) IF (SONAME) SET_TARGET_PROPERTIES(git2 PROPERTIES VERSION ${LIBGIT2_VERSION_STRING}) SET_TARGET_PROPERTIES(git2 PROPERTIES SOVERSION ${LIBGIT2_VERSION_MAJOR}) - IF (SONAME_APPEND) - SET_TARGET_PROPERTIES(git2 PROPERTIES OUTPUT_NAME "git2-${SONAME_APPEND}") + IF (LIBGIT2_FILENAME) + ADD_DEFINITIONS(-DLIBGIT2_FILENAME=\"${LIBGIT2_FILENAME}\") + SET_TARGET_PROPERTIES(git2 PROPERTIES OUTPUT_NAME ${LIBGIT2_FILENAME}) ENDIF() ENDIF() CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/libgit2.pc.in ${CMAKE_CURRENT_BINARY_DIR}/libgit2.pc @ONLY) |