diff options
author | Aaron Seigo <aseigo@kde.org> | 2014-12-18 18:14:18 +0100 |
---|---|---|
committer | Aaron Seigo <aseigo@kde.org> | 2014-12-18 18:14:35 +0100 |
commit | 2da30b5dcc6fd5ae4a94edd257dbbb51814e96f7 (patch) | |
tree | 1dfc12d1f5b7163e3bfe7a01c0664a51caf3b3aa | |
parent | ea1a4b3da76923357a2347b649f281efd8e5ea7b (diff) | |
download | sink-2da30b5dcc6fd5ae4a94edd257dbbb51814e96f7.tar.gz sink-2da30b5dcc6fd5ae4a94edd257dbbb51814e96f7.zip |
make libgit actually optionally
-rw-r--r-- | tests/hawd/CMakeLists.txt | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/tests/hawd/CMakeLists.txt b/tests/hawd/CMakeLists.txt index 271d14f..7dcaf01 100644 --- a/tests/hawd/CMakeLists.txt +++ b/tests/hawd/CMakeLists.txt | |||
@@ -22,14 +22,21 @@ set(SRCS | |||
22 | modules/print.cpp | 22 | modules/print.cpp |
23 | ) | 23 | ) |
24 | 24 | ||
25 | add_library(libhawd SHARED ${lib_SRCS}) | 25 | add_library(lib${PROJECT_NAME} SHARED ${lib_SRCS}) |
26 | generate_export_header(libhawd BASE_NAME HAWD EXPORT_FILE_NAME hawd_export.h) | 26 | generate_export_header(lib${PROJECT_NAME} BASE_NAME HAWD EXPORT_FILE_NAME hawd_export.h) |
27 | qt5_use_modules(libhawd Core) | 27 | qt5_use_modules(lib${PROJECT_NAME} Core) |
28 | target_link_libraries(libhawd akonadi2common ${LIBGIT2_LIBRARIES}) | 28 | target_link_libraries(lib${PROJECT_NAME} akonadi2common) |
29 | install(TARGETS libhawd DESTINATION lib) | 29 | if (LIBGIT2_FOUND) |
30 | target_link_libraries(lib${PROJECT_NAME} ${LIBGIT2_LIBRARIES}) | ||
31 | endif(LIBGIT2_FOUND) | ||
32 | |||
33 | install(TARGETS lib${PROJECT_NAME} DESTINATION lib) | ||
30 | 34 | ||
31 | add_executable(${PROJECT_NAME} ${SRCS}) | 35 | add_executable(${PROJECT_NAME} ${SRCS}) |
32 | qt5_use_modules(${PROJECT_NAME} Core) | 36 | qt5_use_modules(${PROJECT_NAME} Core) |
33 | target_link_libraries(${PROJECT_NAME} libhawd ${LIBGIT2_LIBRARIES}) | 37 | target_link_libraries(${PROJECT_NAME} lib${PROJECT_NAME} ${LIBGIT2_LIBRARIES}) |
38 | if (LIBGIT2_FOUND) | ||
39 | target_link_libraries(${PROJECT_NAME} ${LIBGIT2_LIBRARIES}) | ||
40 | endif(LIBGIT2_FOUND) | ||
34 | install(TARGETS ${PROJECT_NAME} DESTINATION bin) | 41 | install(TARGETS ${PROJECT_NAME} DESTINATION bin) |
35 | 42 | ||