From 7e1d8724c5e9800ade5590ff96d8290196755036 Mon Sep 17 00:00:00 2001 From: Tomaz Canabrava Date: Mon, 14 Apr 2014 16:48:12 -0300 Subject: [PATCH] Add the option to specify the LIBDCDEVEL path. Use cmake .. -DLIBDCDEVEL="../your/library" to specify where the libdc is, or leave it blank if you have it installed on the system. you can change the location later by running ccmake. Signed-off-by: Tomaz Canabrava Signed-off-by: Dirk Hohndel --- CMakeLists.txt | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 94de131bd..69d9949b0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -28,6 +28,13 @@ pkg_config_library(LIBSQLITE3 sqlite3) pkg_config_library(LIBGIT2 libgit2) pkg_config_library(LIBXSLT libxslt) +SET(LIBDCDEVEL "" CACHE STRING "libraries") +IF(NOT (LIBDCDEVEL STREQUAL "")) + cmake_policy(SET CMP0015 OLD) + include_directories(${LIBDCDEVEL}/include ) + link_directories(${LIBDCDEVEL}/src/.libs) +ENDIF() + STRING(COMPARE EQUAL "${${PROJECT_NAME}_SOURCE_DIR}" "${${PROJECT_NAME}_BINARY_DIR}" insource) GET_FILENAME_COMPONENT(PARENTDIR ${${PROJECT_NAME}_SOURCE_DIR} PATH) STRING(COMPARE EQUAL "${${PROJECT_NAME}_SOURCE_DIR}" "${PARENTDIR}" insourcesubdir) @@ -185,4 +192,4 @@ ADD_DEPENDENCIES(subsurface_corelib version) ENABLE_TESTING() ADD_EXECUTABLE( TestUnitConversion tests/testunitconversion.cpp ) TARGET_LINK_LIBRARIES( TestUnitConversion ${QT_LIBRARIES}) -ADD_TEST( NAME TestUnitConversion COMMAND TestUnitConversion) \ No newline at end of file +ADD_TEST( NAME TestUnitConversion COMMAND TestUnitConversion)