mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-12 17:14:52 -07:00
parent
b3df71ae41
commit
f97959febc
5 changed files with 20 additions and 70 deletions
|
|
@ -8,32 +8,8 @@ if(NOT GTEST_FOUND)
|
|||
add_dependencies(loading_from_clipboard_test gtest)
|
||||
endif()
|
||||
|
||||
target_link_libraries(loading_from_clipboard_test ${GTEST_BOTH_LIBRARIES})
|
||||
target_link_libraries(loading_from_clipboard_test cockatrice_common)
|
||||
find_package(Qt5 COMPONENTS Concurrent Network Widgets REQUIRED)
|
||||
set(TEST_QT_MODULES Qt5::Concurrent Qt5::Network Qt5::Widgets)
|
||||
|
||||
add_test(NAME loading_from_clipboard_test COMMAND loading_from_clipboard_test)
|
||||
|
||||
#### I feel like the rest of this file should not be necessary and
|
||||
#### is (effective) cargo culting of tests/carddatabase/CMakeLists.txt.
|
||||
#### Ideally we would only need to say "hey this test is against something from cockatrice_common",
|
||||
#### and cockatrice_common would declare all of it's dependencies. I need to learn more about CMake.
|
||||
|
||||
# qt5 stuff
|
||||
include_directories(${Qt5Widgets_INCLUDE_DIRS})
|
||||
list(APPEND COCKATRICE_LIBS 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(loading_from_clipboard_test ${COCKATRICE_LIBS})
|
||||
target_link_libraries(loading_from_clipboard_test cockatrice_common ${GTEST_BOTH_LIBRARIES} ${TEST_QT_MODULES})
|
||||
add_test(NAME loading_from_clipboard_test COMMAND loading_from_clipboard_test)
|
||||
Loading…
Add table
Add a link
Reference in a new issue