diff options
author | Tomaz Canabrava <tomaz.canabrava@intel.com> | 2015-04-07 17:29:35 -0300 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-04-07 16:08:55 -0700 |
commit | 5a9931f438ba0a05b2dc084f400bb4743c7e60f4 (patch) | |
tree | c051879691a18b5ec1220d4e7c5733839a8ff498 /CMakeLists.txt | |
parent | 2e05dbb791740d308c2479562ce13de4087e62d1 (diff) | |
download | subsurface-5a9931f438ba0a05b2dc084f400bb4743c7e60f4.tar.gz |
Add build options
- add an option to toogle between libgit2 from package vs built from source
- add two options that will be used in the future: use static/dynamic lib
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 4b434f570..f22091fcb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7,6 +7,10 @@ cmake_minimum_required(VERSION 2.8.11) SET(CMAKE_AUTOMOC ON) SET(CMAKE_AUTOUIC ON) +OPTION(PREFER_GIT_FROMSOURCE "Turn off if you wanna use system's libgit 0.21.5" ON) +OPTION(PREFER_GIT_STATIC "Turn off if you wanna use a shared library" ON) +OPTION(PREFER_LIBDC_STATIC "Turn off if you wanna use a shared library" ON) + SET(CMAKE_MODULE_PATH ${${PROJECT_NAME}_SOURCE_DIR}/cmake/Modules) INCLUDE_DIRECTORIES( . ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_BINARY_DIR} qt-ui qt-ui/profile) @@ -27,7 +31,7 @@ pkg_config_library(LIBZIP libzip) # more libraries with special handling in case we build them ourselves -if(NOT DEFINED LIBGIT2DEVEL) +if(NOT ${PREFER_GIT_FROMSOURCE}) pkg_config_library(LIBGIT2 libgit2) ELSE() include_directories(${LIBGIT2DEVEL}/include) |