Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

CMakeLists.txt 3.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  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. EmulateMB.cxx
  9. UserDialog.cxx
  10. ServerDialog.cxx
  11. Surface.cxx
  12. OptionsDialog.cxx
  13. PlatformPixelBuffer.cxx
  14. Viewport.cxx
  15. parameters.cxx
  16. keysym2ucs.c
  17. touch.cxx
  18. vncviewer.cxx)
  19. if(WIN32)
  20. # Since vncviewer.rc is generated, local includes will be looking
  21. # in the wrong directory. We need to help it out.
  22. include_directories(${CMAKE_CURRENT_SOURCE_DIR})
  23. configure_file(vncviewer.rc.in vncviewer.rc)
  24. set(VNCVIEWER_SOURCES
  25. ${VNCVIEWER_SOURCES}
  26. ${CMAKE_CURRENT_BINARY_DIR}/vncviewer.rc)
  27. endif()
  28. if(WIN32)
  29. set(VNCVIEWER_SOURCES ${VNCVIEWER_SOURCES} win32.c)
  30. elseif(APPLE)
  31. set(VNCVIEWER_SOURCES ${VNCVIEWER_SOURCES} cocoa.mm osx_to_qnum.c)
  32. else()
  33. set(VNCVIEWER_SOURCES ${VNCVIEWER_SOURCES} XInputTouchHandler.cxx xkb_to_qnum.c)
  34. endif()
  35. if(WIN32)
  36. set(VNCVIEWER_SOURCES ${VNCVIEWER_SOURCES} Surface_Win32.cxx)
  37. elseif(APPLE)
  38. set(VNCVIEWER_SOURCES ${VNCVIEWER_SOURCES} Surface_OSX.cxx)
  39. else()
  40. set(VNCVIEWER_SOURCES ${VNCVIEWER_SOURCES} Surface_X11.cxx)
  41. endif()
  42. if(WIN32 AND NOT CMAKE_BUILD_TYPE STREQUAL "Debug")
  43. add_executable(vncviewer WIN32 ${VNCVIEWER_SOURCES})
  44. else()
  45. add_executable(vncviewer ${VNCVIEWER_SOURCES})
  46. endif()
  47. target_link_libraries(vncviewer rfb network rdr os ${FLTK_LIBRARIES} ${GETTEXT_LIBRARIES})
  48. if(WIN32)
  49. target_link_libraries(vncviewer msimg32)
  50. elseif(APPLE)
  51. target_link_libraries(vncviewer "-framework Cocoa")
  52. target_link_libraries(vncviewer "-framework Carbon")
  53. target_link_libraries(vncviewer "-framework IOKit")
  54. else()
  55. target_link_libraries(vncviewer ${X11_Xi_LIB})
  56. endif()
  57. install(TARGETS vncviewer DESTINATION ${CMAKE_INSTALL_FULL_BINDIR})
  58. if(UNIX)
  59. install(FILES vncviewer.man DESTINATION ${CMAKE_INSTALL_FULL_MANDIR}/man1 RENAME vncviewer.1)
  60. configure_file(vncviewer.desktop.in.in vncviewer.desktop.in)
  61. find_program(INTLTOOL_MERGE_EXECUTABLE intltool-merge)
  62. if("${GETTEXT_VERSION_STRING}" VERSION_GREATER 0.18.99)
  63. add_custom_command(OUTPUT vncviewer.desktop
  64. COMMAND ${GETTEXT_MSGFMT_EXECUTABLE}
  65. --desktop --template vncviewer.desktop.in
  66. -d ${CMAKE_SOURCE_DIR}/po -o vncviewer.desktop
  67. DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/vncviewer.desktop.in
  68. )
  69. elseif(INTLTOOL_MERGE_EXECUTABLE)
  70. add_custom_command(OUTPUT vncviewer.desktop
  71. COMMAND sed -e 's/^Name/_Name/'
  72. -e 's/^GenericName/_GenericName/'
  73. -e 's/^Comment/_Comment/'
  74. vncviewer.desktop.in > vncviewer.desktop.intl
  75. COMMAND ${INTLTOOL_MERGE_EXECUTABLE}
  76. -d ${CMAKE_SOURCE_DIR}/po
  77. vncviewer.desktop.intl vncviewer.desktop
  78. DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/vncviewer.desktop.in
  79. )
  80. else()
  81. add_custom_command(OUTPUT vncviewer.desktop
  82. COMMAND cp vncviewer.desktop.in vncviewer.desktop
  83. DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/vncviewer.desktop.in
  84. )
  85. endif()
  86. add_custom_target(desktop ALL DEPENDS vncviewer.desktop)
  87. install(FILES ${CMAKE_CURRENT_BINARY_DIR}/vncviewer.desktop DESTINATION ${CMAKE_INSTALL_FULL_DATADIR}/applications)
  88. foreach(res 16 22 24 32 48)
  89. install(FILES ../media/icons/tigervnc_${res}.png DESTINATION ${CMAKE_INSTALL_FULL_DATADIR}/icons/hicolor/${res}x${res}/apps RENAME tigervnc.png)
  90. endforeach()
  91. install(FILES ../media/icons/tigervnc.svg DESTINATION ${CMAKE_INSTALL_FULL_DATADIR}/icons/hicolor/scalable/apps)
  92. endif()