websockets: only build tests for a websockets-enabled build

pull/3/head
Christian Beier 8 years ago
parent f48921becf
commit 0e76b289c8
No known key found for this signature in database
GPG Key ID: 421BB3B45C6067F8

@ -557,19 +557,23 @@ if(WITH_JPEG AND FOUND_LIBJPEG_TURBO)
endif(WITH_JPEG AND FOUND_LIBJPEG_TURBO) endif(WITH_JPEG AND FOUND_LIBJPEG_TURBO)
add_executable(test_wstest if(LIBVNCSERVER_WITH_WEBSOCKETS)
${TESTS_DIR}/wstest.c add_executable(test_wstest
${TESTS_DIR}/wstestdata.inc ${TESTS_DIR}/wstest.c
) ${TESTS_DIR}/wstestdata.inc
set_target_properties(test_wstest PROPERTIES OUTPUT_NAME wstest) )
set_target_properties(test_wstest PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/test) set_target_properties(test_wstest PROPERTIES OUTPUT_NAME wstest)
target_link_libraries(test_wstest vncserver vncclient ${ADDITIONAL_TEST_LIBS}) set_target_properties(test_wstest PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/test)
target_link_libraries(test_wstest vncserver vncclient ${ADDITIONAL_TEST_LIBS})
endif(LIBVNCSERVER_WITH_WEBSOCKETS)
add_test(NAME cargs COMMAND test_cargstest) add_test(NAME cargs COMMAND test_cargstest)
if(FOUND_LIBJPEG_TURBO) if(FOUND_LIBJPEG_TURBO)
add_test(NAME turbojpeg COMMAND test_tjunittest) add_test(NAME turbojpeg COMMAND test_tjunittest)
endif(FOUND_LIBJPEG_TURBO) endif(FOUND_LIBJPEG_TURBO)
add_test(NAME wstest COMMAND test_wstest) if(LIBVNCSERVER_WITH_WEBSOCKETS)
add_test(NAME wstest COMMAND test_wstest)
endif(LIBVNCSERVER_WITH_WEBSOCKETS)
# #
# this gets the libraries needed by TARGET in "-libx -liby ..." form # this gets the libraries needed by TARGET in "-libx -liby ..." form

Loading…
Cancel
Save