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.7KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. include_directories(${FLTK_INCLUDE_DIR})
  2. include_directories(${GETTEXT_INCLUDE_DIR})
  3. include_directories(${CMAKE_SOURCE_DIR}/common)
  4. set(VNCVIEWER_SOURCES
  5. menukey.cxx
  6. CConn.cxx
  7. DesktopWindow.cxx
  8. FLTKPixelBuffer.cxx
  9. UserDialog.cxx
  10. ServerDialog.cxx
  11. OptionsDialog.cxx
  12. PlatformPixelBuffer.cxx
  13. Viewport.cxx
  14. parameters.cxx
  15. keysym2ucs.c
  16. vncviewer.cxx)
  17. if(WIN32)
  18. # Since vncviewer.rc is generated, local includes will be looking
  19. # in the wrong directory. We need to help it out.
  20. include_directories(${CMAKE_CURRENT_SOURCE_DIR})
  21. configure_file(vncviewer.rc.in vncviewer.rc)
  22. set(VNCVIEWER_SOURCES
  23. ${VNCVIEWER_SOURCES}
  24. ${CMAKE_CURRENT_BINARY_DIR}/vncviewer.rc)
  25. endif()
  26. if(WIN32)
  27. set(VNCVIEWER_SOURCES ${VNCVIEWER_SOURCES} win32.c)
  28. elseif(APPLE)
  29. set(VNCVIEWER_SOURCES ${VNCVIEWER_SOURCES} cocoa.mm)
  30. endif()
  31. if(WIN32)
  32. set(VNCVIEWER_SOURCES ${VNCVIEWER_SOURCES} Win32PixelBuffer.cxx)
  33. elseif(APPLE)
  34. set(VNCVIEWER_SOURCES ${VNCVIEWER_SOURCES} OSXPixelBuffer.cxx)
  35. else()
  36. set(VNCVIEWER_SOURCES ${VNCVIEWER_SOURCES} X11PixelBuffer.cxx)
  37. endif()
  38. if(WIN32 AND NOT CMAKE_BUILD_TYPE STREQUAL "Debug")
  39. add_executable(vncviewer WIN32 ${VNCVIEWER_SOURCES})
  40. else()
  41. add_executable(vncviewer ${VNCVIEWER_SOURCES})
  42. endif()
  43. target_link_libraries(vncviewer rfb network rdr os Xregion ${FLTK_LIBRARIES} ${GETTEXT_LIBRARIES})
  44. # When building with GnuTLS, librdr depends on ws2_32, so in order to make
  45. # MinGW happy, we need to put ws2_32 in librdr's target_link_libraries string,
  46. # not here.
  47. if(NOT GNUTLS_FOUND AND WIN32)
  48. target_link_libraries(vncviewer ws2_32)
  49. endif()
  50. install(TARGETS vncviewer DESTINATION ${BIN_DIR})
  51. if(UNIX)
  52. install(FILES vncviewer.man DESTINATION ${MAN_DIR}/man1 RENAME vncviewer.1)
  53. endif()