summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorChristian Beier <dontmind@freeshell.org>2017-02-21 13:52:01 +0100
committerChristian Beier <dontmind@freeshell.org>2017-02-21 13:52:01 +0100
commitebbbc8bd1b6cc5c831a5621c1cd0859e5dab0829 (patch)
tree01cc6d43f2f29075f0ac536d330a9651983927cb /CMakeLists.txt
parent425e24196b7de15875d08c94c5ff59a6a3642654 (diff)
downloadlibtdevnc-ebbbc8bd1b6cc5c831a5621c1cd0859e5dab0829.tar.gz
libtdevnc-ebbbc8bd1b6cc5c831a5621c1cd0859e5dab0829.zip
CMake: properly name examples as examples, not tests
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt54
1 files changed, 27 insertions, 27 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 787e056..6620b39 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -21,8 +21,8 @@ set(PROJECT_BUGREPORT_PATH "https://github.com/LibVNC/libvncserver/issues")
set(LIBVNCSERVER_DIR ${CMAKE_CURRENT_SOURCE_DIR}/libvncserver)
set(COMMON_DIR ${CMAKE_CURRENT_SOURCE_DIR}/common)
set(LIBVNCCLIENT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/libvncclient)
-set(LIBVNCSRVTEST_DIR ${CMAKE_CURRENT_SOURCE_DIR}/examples)
-set(LIBVNCCLITEST_DIR ${CMAKE_CURRENT_SOURCE_DIR}/client_examples)
+set(LIBVNCSRVEXAMPLE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/examples)
+set(LIBVNCCLIEXAMPLE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/client_examples)
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
@@ -391,8 +391,8 @@ SET_TARGET_PROPERTIES(vncclient vncserver
PROPERTIES SOVERSION "${VERSION_SO}" VERSION "${PACKAGE_VERSION}"
)
-# tests
-set(LIBVNCSERVER_TESTS
+# EXAMPLES
+set(LIBVNCSERVER_EXAMPLES
backchannel
camera
colourmaptest
@@ -409,63 +409,63 @@ set(LIBVNCSERVER_TESTS
)
if(CMAKE_USE_PTHREADS_INIT)
- set(LIBVNCSERVER_TESTS
- ${LIBVNCSERVER_TESTS}
+ set(LIBVNCSERVER_EXAMPLES
+ ${LIBVNCSERVER_EXAMPLES}
blooptest
)
endif(CMAKE_USE_PTHREADS_INIT)
if(WITH_TIGHTVNC_FILETRANSFER AND CMAKE_USE_PTHREADS_INIT)
- set(LIBVNCSERVER_TESTS
- ${LIBVNCSERVER_TESTS}
+ set(LIBVNCSERVER_EXAMPLES
+ ${LIBVNCSERVER_EXAMPLES}
filetransfer
)
endif(WITH_TIGHTVNC_FILETRANSFER AND CMAKE_USE_PTHREADS_INIT)
if(MACOS)
- set(LIBVNCSERVER_TESTS
- ${LIBVNCSERVER_TESTS}
+ set(LIBVNCSERVER_EXAMPLES
+ ${LIBVNCSERVER_EXAMPLES}
mac
)
endif(MACOS)
-set(LIBVNCCLIENT_TESTS
+set(LIBVNCCLIENT_EXAMPLES
backchannel
ppmtest
)
if(SDL_FOUND)
include_directories(${SDL_INCLUDE_DIR})
- set(LIBVNCCLIENT_TESTS
- ${LIBVNCCLIENT_TESTS}
+ set(LIBVNCCLIENT_EXAMPLES
+ ${LIBVNCCLIENT_EXAMPLES}
SDLvncviewer
)
set(SDLvncviewer_EXTRA_SOURCES scrap.c)
endif(SDL_FOUND)
if(HAVE_FFMPEG)
- set(LIBVNCCLIENT_TESTS
- ${LIBVNCCLIENT_TESTS}
+ set(LIBVNCCLIENT_EXAMPLES
+ ${LIBVNCCLIENT_EXAMPLES}
vnc2mpg
)
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 ${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})
+foreach(e ${LIBVNCSERVER_EXAMPLES})
+ add_executable(examples_${e} ${LIBVNCSRVEXAMPLE_DIR}/${e}.c)
+ set_target_properties(examples_${e} PROPERTIES OUTPUT_NAME ${e})
+ set_target_properties(examples_${e} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/examples)
+ target_link_libraries(examples_${e} vncserver ${CMAKE_THREAD_LIBS_INIT})
+endforeach(e ${LIBVNCSERVER_EXAMPLES})
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 ${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})
+foreach(e ${LIBVNCCLIENT_EXAMPLES})
+ add_executable(client_examples_${e} ${LIBVNCCLIEXAMPLE_DIR}/${e}.c ${LIBVNCCLIEXAMPLE_DIR}/${${e}_EXTRA_SOURCES} )
+ set_target_properties(client_examples_${e} PROPERTIES OUTPUT_NAME ${e})
+ set_target_properties(client_examples_${e} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/client_examples)
+ target_link_libraries(client_examples_${e} vncclient ${CMAKE_THREAD_LIBS_INIT} ${SDL_LIBRARY} ${FFMPEG_LIBRARIES})
+endforeach(e ${LIBVNCCLIENT_EXAMPLES})
# this gets the libraries needed by TARGET in "-libx -liby ..." form
function(get_link_libraries OUT TARGET)