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.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  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. # Since vncviewer.rc is generated, local includes will be looking
  18. # in the wrong directory. We need to help it out.
  19. include_directories(${CMAKE_CURRENT_SOURCE_DIR})
  20. configure_file(vncviewer.rc.in vncviewer.rc)
  21. set(VNCVIEWER_SOURCES
  22. ${VNCVIEWER_SOURCES}
  23. ${CMAKE_CURRENT_BINARY_DIR}/vncviewer.rc)
  24. endif()
  25. if(WIN32)
  26. set(VNCVIEWER_SOURCES ${VNCVIEWER_SOURCES} win32.c)
  27. elseif(APPLE)
  28. set(VNCVIEWER_SOURCES ${VNCVIEWER_SOURCES} cocoa.mm)
  29. endif()
  30. if(WIN32)
  31. set(VNCVIEWER_SOURCES ${VNCVIEWER_SOURCES} Win32PixelBuffer.cxx)
  32. elseif(APPLE)
  33. set(VNCVIEWER_SOURCES ${VNCVIEWER_SOURCES} OSXPixelBuffer.cxx)
  34. else()
  35. set(VNCVIEWER_SOURCES ${VNCVIEWER_SOURCES} X11PixelBuffer.cxx)
  36. endif()
  37. if(WIN32)
  38. add_executable(vncviewer WIN32 ${VNCVIEWER_SOURCES})
  39. else()
  40. add_executable(vncviewer ${VNCVIEWER_SOURCES})
  41. endif()
  42. target_link_libraries(vncviewer rfb network rdr os Xregion ${FLTK_LIBRARIES} ${GETTEXT_LIBRARIES})
  43. # When building with GnuTLS, librdr depends on ws2_32, so in order to make
  44. # MinGW happy, we need to put ws2_32 in librdr's target_link_libraries string,
  45. # not here.
  46. if(NOT GNUTLS_FOUND AND WIN32)
  47. target_link_libraries(vncviewer ws2_32)
  48. endif()
  49. install(TARGETS vncviewer DESTINATION ${BIN_DIR})
  50. if(UNIX)
  51. install(FILES vncviewer.man DESTINATION ${MAN_DIR}/man1 RENAME vncviewer.1)
  52. endif()