diff options
author | Heiko Becker <heirecka@exherbo.org> | 2017-02-03 17:45:11 +0100 |
---|---|---|
committer | Heiko Becker <heirecka@exherbo.org> | 2017-02-14 09:08:30 +0100 |
commit | 3115a836e42ba34481edeac8ca64891ab3bbc6dd (patch) | |
tree | 6aa78c14c684f0d74638200ede80c769c4c006f5 /tests | |
parent | 66199a99dca9a1be6fcd522613c8a4175951f11d (diff) | |
download | sink-3115a836e42ba34481edeac8ca64891ab3bbc6dd.tar.gz sink-3115a836e42ba34481edeac8ca64891ab3bbc6dd.zip |
Make libgit2 actually optional for tests
Test Plan: cmake configure passes without a hard error.
Reviewers: cmollekopf, #kde_pim
Reviewed By: cmollekopf, #kde_pim
Subscribers: dvratil, cmollekopf
Differential Revision: https://phabricator.kde.org/D4443
Diffstat (limited to 'tests')
-rw-r--r-- | tests/hawd/CMakeLists.txt | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/hawd/CMakeLists.txt b/tests/hawd/CMakeLists.txt index d754726..b3de83e 100644 --- a/tests/hawd/CMakeLists.txt +++ b/tests/hawd/CMakeLists.txt | |||
@@ -3,10 +3,11 @@ project(hawd) | |||
3 | find_package(Libgit2) | 3 | find_package(Libgit2) |
4 | 4 | ||
5 | if (LIBGIT2_FOUND) | 5 | if (LIBGIT2_FOUND) |
6 | add_definitions(-DHAVE_LIBGIT2) | 6 | add_definitions(-DHAVE_LIBGIT2) |
7 | include_directories(${LIBGIT2_INCLUDE_DIR}) | ||
7 | endif (LIBGIT2_FOUND) | 8 | endif (LIBGIT2_FOUND) |
8 | 9 | ||
9 | include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} ${LIBGIT2_INCLUDE_DIR}) | 10 | include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}) |
10 | 11 | ||
11 | set(lib_SRCS | 12 | set(lib_SRCS |
12 | dataset.cpp | 13 | dataset.cpp |
@@ -35,7 +36,7 @@ install(TARGETS lib${PROJECT_NAME} ${KDE_INSTALL_TARGETS_DEFAULT_ARGS}) | |||
35 | 36 | ||
36 | add_executable(${PROJECT_NAME} ${SRCS}) | 37 | add_executable(${PROJECT_NAME} ${SRCS}) |
37 | qt5_use_modules(${PROJECT_NAME} Core) | 38 | qt5_use_modules(${PROJECT_NAME} Core) |
38 | target_link_libraries(${PROJECT_NAME} lib${PROJECT_NAME} ${LIBGIT2_LIBRARIES}) | 39 | target_link_libraries(${PROJECT_NAME} lib${PROJECT_NAME}) |
39 | if (LIBGIT2_FOUND) | 40 | if (LIBGIT2_FOUND) |
40 | target_link_libraries(${PROJECT_NAME} ${LIBGIT2_LIBRARIES}) | 41 | target_link_libraries(${PROJECT_NAME} ${LIBGIT2_LIBRARIES}) |
41 | endif(LIBGIT2_FOUND) | 42 | endif(LIBGIT2_FOUND) |