CMake: output examples to respective directories.

pull/3/head
Christian Beier 6 years ago
parent 62f0fe6b1b
commit a9cf593fab
No known key found for this signature in database
GPG Key ID: 421BB3B45C6067F8
  1. 2
      CMakeLists.txt

@ -382,12 +382,14 @@ endif(HAVE_FFMPEG)
file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/examples)
foreach(test ${LIBVNCSERVER_TESTS})
add_executable(examples_${test} ${LIBVNCSRVTEST_DIR}/${test}.c)
set_target_properties(examples_${test} PROPERTIES OUTPUT_NAME examples/${test})
target_link_libraries(examples_${test} vncserver ${CMAKE_THREAD_LIBS_INIT})
endforeach(test ${LIBVNCSERVER_TESTS})
file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/client_examples)
foreach(test ${LIBVNCCLIENT_TESTS})
add_executable(client_examples_${test} ${LIBVNCCLITEST_DIR}/${test}.c ${LIBVNCCLITEST_DIR}/${${test}_EXTRA_SOURCES} )
set_target_properties(client_examples_${test} PROPERTIES OUTPUT_NAME client_examples/${test})
target_link_libraries(client_examples_${test} vncclient ${CMAKE_THREAD_LIBS_INIT} ${X11_LIBRARIES} ${SDL_LIBRARY} ${FFMPEG_LIBRARIES})
endforeach(test ${LIBVNCCLIENT_TESTS})

Loading…
Cancel
Save