You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

CMakeLists.txt 1.4KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. include_directories(${FLTK_INCLUDE_DIR})
  2. include_directories(${GETTEXT_INCLUDE_DIR})
  3. include_directories(${CMAKE_SOURCE_DIR}/common)
  4. set(VNCVIEWER_SOURCES
  5. buildTime.cxx
  6. menukey.cxx
  7. CConn.cxx
  8. DesktopWindow.cxx
  9. UserDialog.cxx
  10. ServerDialog.cxx
  11. OptionsDialog.cxx
  12. Viewport.cxx
  13. parameters.cxx
  14. keysym2ucs.c
  15. vncviewer.cxx)
  16. if(WIN32)
  17. set(VNCVIEWER_SOURCES ${VNCVIEWER_SOURCES} win32.c)
  18. endif()
  19. if(APPLE)
  20. set(VNCVIEWER_SOURCES ${VNCVIEWER_SOURCES} cocoa.mm)
  21. endif()
  22. if(WIN32)
  23. set(VNCVIEWER_SOURCES ${VNCVIEWER_SOURCES} Win32PixelBuffer.cxx)
  24. elseif(APPLE)
  25. set(VNCVIEWER_SOURCES ${VNCVIEWER_SOURCES} OSXPixelBuffer.cxx)
  26. else()
  27. set(VNCVIEWER_SOURCES ${VNCVIEWER_SOURCES} X11PixelBuffer.cxx)
  28. endif()
  29. if(WIN32)
  30. add_executable(vncviewer WIN32 ${VNCVIEWER_SOURCES})
  31. else()
  32. add_executable(vncviewer ${VNCVIEWER_SOURCES})
  33. endif()
  34. if(USE_INCLUDED_FLTK)
  35. target_link_libraries(vncviewer fltk_static)
  36. endif()
  37. target_link_libraries(vncviewer rfb network rdr os Xregion ${FLTK_LIBRARIES} ${GETTEXT_LIBRARIES})
  38. # When building with GnuTLS, librdr depends on ws2_32, so in order to make
  39. # MinGW happy, we need to put ws2_32 in librdr's target_link_libraries string,
  40. # not here.
  41. if(NOT GNUTLS_FOUND AND WIN32)
  42. target_link_libraries(vncviewer ws2_32)
  43. endif()
  44. install(TARGETS vncviewer DESTINATION bin)
  45. if(UNIX)
  46. install(FILES vncviewer.man DESTINATION man/man1 RENAME vncviewer.1)
  47. endif()