This commit is contained in:
ctrlaltca 2018-05-24 15:46:02 +02:00 committed by GitHub
parent b3df71ae41
commit f97959febc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 20 additions and 70 deletions

View file

@ -8,25 +8,9 @@ add_executable(carddatabase_test
if(NOT GTEST_FOUND)
add_dependencies(carddatabase_test gtest)
endif()
target_link_libraries(carddatabase_test ${GTEST_BOTH_LIBRARIES})
add_test(NAME carddatabase_test COMMAND carddatabase_test)
# qt5 stuff
include_directories(${Qt5Widgets_INCLUDE_DIRS})
list(APPEND COCKATRICE_LIBS Widgets)
find_package(Qt5 COMPONENTS Concurrent Network Widgets REQUIRED)
set(TEST_QT_MODULES Qt5::Concurrent Qt5::Network Qt5::Widgets)
# QtConcurrent
find_package(Qt5Concurrent)
if(Qt5Concurrent_FOUND)
include_directories(${Qt5Concurrent_INCLUDE_DIRS})
list(APPEND ORACLE_LIBS Concurrent)
endif()
# QtNetwork
find_package(Qt5Network)
if(Qt5Network_FOUND)
include_directories(${Qt5Network_INCLUDE_DIRS})
list(APPEND COCKATRICE_LIBS Network)
endif()
qt5_use_modules(carddatabase_test ${COCKATRICE_LIBS})
target_link_libraries(carddatabase_test ${GTEST_BOTH_LIBRARIES} ${TEST_QT_MODULES})
add_test(NAME carddatabase_test COMMAND carddatabase_test)