mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-27 17:37:36 +03:00
46b870e260
This reverts commit ff2d59d32f
.
19 lines
875 B
CMake
19 lines
875 B
CMake
macro(owncloud_add_test test_class)
|
|
include_directories(${QT_INCLUDES} "${PROJECT_SOURCE_DIR}/src" ${CMAKE_CURRENT_BINARY_DIR})
|
|
|
|
set(OWNCLOUD_TEST_CLASS ${test_class})
|
|
string(TOLOWER "${OWNCLOUD_TEST_CLASS}" OWNCLOUD_TEST_CLASS_LOWERCASE)
|
|
configure_file(main.cpp.in test${OWNCLOUD_TEST_CLASS_LOWERCASE}.cpp)
|
|
configure_file(test${OWNCLOUD_TEST_CLASS_LOWERCASE}.h test${OWNCLOUD_TEST_CLASS_LOWERCASE}.h)
|
|
qt4_wrap_cpp(${OWNCLOUD_TEST_CLASS}_MOCS test${OWNCLOUD_TEST_CLASS_LOWERCASE}.h)
|
|
|
|
add_executable(${OWNCLOUD_TEST_CLASS}Test test${OWNCLOUD_TEST_CLASS_LOWERCASE}.cpp ${${OWNCLOUD_TEST_CLASS}_MOCS})
|
|
|
|
target_link_libraries(${OWNCLOUD_TEST_CLASS}Test
|
|
${APPLICATION_SHORTNAME}sync
|
|
${QT_QTTEST_LIBRARY}
|
|
${QT_QTCORE_LIBRARY}
|
|
)
|
|
|
|
add_test(NAME ${OWNCLOUD_TEST_CLASS}Test COMMAND ${OWNCLOUD_TEST_CLASS}Test)
|
|
endmacro()
|