summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorChristian Beier <dontmind@freeshell.org>2017-02-20 20:10:14 +0100
committerChristian Beier <dontmind@freeshell.org>2017-02-20 20:10:14 +0100
commitd3e70a91bf54d6334bf1eae0117bce45a8193c1c (patch)
tree7fdfad6f200d05f6b0413f4ea481333061e318fb /CMakeLists.txt
parent2041bfd5cd6c6a8bcec260a3fa86d340050892c8 (diff)
downloadlibtdevnc-d3e70a91bf54d6334bf1eae0117bce45a8193c1c.tar.gz
libtdevnc-d3e70a91bf54d6334bf1eae0117bce45a8193c1c.zip
CMake: set examples's output dirs in a cross-platform way
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt6
1 files changed, 4 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 616e518..8f0906d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -453,14 +453,16 @@ 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})
+ set_target_properties(examples_${test} PROPERTIES OUTPUT_NAME ${test})
+ set_target_properties(examples_${test} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/examples)
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})
+ set_target_properties(client_examples_${test} PROPERTIES OUTPUT_NAME ${test})
+ set_target_properties(client_examples_${test} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/client_examples)
target_link_libraries(client_examples_${test} vncclient ${CMAKE_THREAD_LIBS_INIT} ${SDL_LIBRARY} ${FFMPEG_LIBRARIES})
endforeach(test ${LIBVNCCLIENT_TESTS})