1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61
|
macro(link_database_test test_target)
if(APPLE)
set_target_properties(${test_target} PROPERTIES LINK_FLAGS "-undefined dynamic_lookup")
endif()
add_dependencies( ${test_target} amarokconfig_h )
add_dependencies( ${test_target} amarokcore )
add_dependencies( ${test_target} amaroklib)
target_link_libraries(${test_target}
amarokcore
amaroklib
KF${KF_MAJOR_VERSION}::KIOCore
KF${KF_MAJOR_VERSION}::ThreadWeaver
Qt::Test
Qt::Core
${MYSQL_LIBRARIES}
${CMAKE_DL_LIBS}
# ${TAGLIB_LIBRARIES}
)
endmacro(link_database_test)
include_directories(
${AMAROK_TEST_TREE}
${AMAROK_SOURCE_TREE}
# ${AMAROK_SOURCE_TREE}/core-impl/logger
${AMAROK_UTILITY_TREE}
${CMAKE_BINARY_DIR}/src
${CMAKE_BINARY_DIR}/tests
${AMAROK_COLLECTION_SUPPORT_DIR}
)
include_directories(SYSTEM
${MYSQL_INCLUDE_DIR}
)
#------------------------------- DynamicModel Test -------------------------------
set( dynamicmodel_SRCS
TestDynamicModel.cpp
)
add_executable( testdynamicmodel ${dynamicmodel_SRCS} )
add_test(NAME testdynamicmodel COMMAND $<TARGET_FILE:testdynamicmodel>)
ecm_mark_as_test(testdynamicmodel)
link_database_test( testdynamicmodel )
#------------------------------- TrackSet Test -------------------------------
set( trackset_SRCS
TestTrackSet.cpp
)
add_executable( testtrackset ${trackset_SRCS} )
add_test(NAME testtrackset COMMAND $<TARGET_FILE:testtrackset>)
ecm_mark_as_test(testtrackset)
link_database_test( testtrackset )
|