mirror of
https://invent.kde.org/network/krfb
synced 2024-06-28 22:14:41 +00:00
Reorganise krfb codebase to make it easier to work with.
svn path=/trunk/KDE/kdenetwork/krfb/; revision=1189252
This commit is contained in:
parent
4f78b51022
commit
ff019b99cd
118
CMakeLists.txt
118
CMakeLists.txt
|
@ -19,11 +19,16 @@ if(NOT INSIDE_KDENETWORK)
|
|||
include_directories(${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR} ${KDE4_INCLUDES})
|
||||
endif(NOT INSIDE_KDENETWORK)
|
||||
|
||||
check_symbol_exists(rfbInitServer "rfb/rfb.h" HAVE_LIBVNCSERVER)
|
||||
# FIXME: Can we merge this check back into FindLibVNCServer.cmake?
|
||||
check_symbol_exists(rfbInitServer "rfb/rfb.h" HAVE_LIBVNCSERVER)
|
||||
|
||||
macro_bool_to_01(X11_Xdamage_FOUND HAVE_XDAMAGE)
|
||||
macro_bool_to_01(X11_XShm_FOUND HAVE_XSHM)
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config-krfb.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-krfb.h )
|
||||
include_directories(${CMAKE_CURRENT_BINARY_DIR}) # for config-krfb.h
|
||||
|
||||
include_directories ("${CMAKE_CURRENT_BINARY_DIR}/krfb"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/krfb"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/krfb/ui"
|
||||
)
|
||||
|
||||
if(Q_WS_X11)
|
||||
if(NOT X11_XTest_FOUND)
|
||||
|
@ -31,107 +36,10 @@ if(Q_WS_X11)
|
|||
endif(NOT X11_XTest_FOUND)
|
||||
endif(Q_WS_X11)
|
||||
|
||||
#add_subdirectory(kinetd)
|
||||
#add_subdirectory(kcm_krfb)
|
||||
if (HAVE_LIBVNCSERVER)
|
||||
|
||||
#####################################
|
||||
# First target: libkrfb - a library
|
||||
# for linking plugins against.
|
||||
|
||||
set (krfbprivate_SRCS
|
||||
framebuffer.cpp
|
||||
framebufferplugin.cpp
|
||||
)
|
||||
|
||||
kde4_add_library (krfbprivate
|
||||
SHARED
|
||||
${krfbprivate_SRCS}
|
||||
)
|
||||
|
||||
target_link_libraries (krfbprivate
|
||||
${QT_QTCORE_LIBRARY}
|
||||
${QT_QTGUI_LIBRARY}
|
||||
${X11_X11_LIB}
|
||||
${LIBVNCSERVER_LIBRARIES}
|
||||
)
|
||||
|
||||
set_target_properties (krfbprivate PROPERTIES
|
||||
VERSION ${GENERIC_LIB_VERSION}
|
||||
SOVERSION ${GENERIC_LIB_VERSION}
|
||||
)
|
||||
|
||||
install (TARGETS krfbprivate
|
||||
${INSTALL_TARGETS_DEFAULT_ARGS}
|
||||
)
|
||||
|
||||
install (FILES
|
||||
krfb-framebuffer.desktop
|
||||
DESTINATION ${SERVICETYPES_INSTALL_DIR}
|
||||
)
|
||||
|
||||
#####################################
|
||||
# Build the plugins
|
||||
|
||||
include_directories (${CMAKE_CURRENT_SOURCE_DIR})
|
||||
add_subdirectory (framebuffers)
|
||||
|
||||
#####################################
|
||||
# Second target: krfb - the app
|
||||
# itself.
|
||||
|
||||
set(krfb_SRCS
|
||||
main.cpp
|
||||
trayicon.cpp
|
||||
manageinvitationsdialog.cpp
|
||||
invitationmanager.cpp
|
||||
invitedialog.cpp
|
||||
invitation.cpp
|
||||
connectiondialog.cpp
|
||||
personalinvitedialog.cpp
|
||||
events.cpp
|
||||
framebuffermanager.cpp
|
||||
servermanager.cpp
|
||||
sockethelpers.cpp
|
||||
abstractrfbserver.cpp
|
||||
abstractconnectioncontroller.cpp
|
||||
krfbserver.cpp
|
||||
krfbconnectioncontroller.cpp
|
||||
)
|
||||
|
||||
kde4_add_kcfg_files(krfb_SRCS krfbconfig.kcfgc)
|
||||
|
||||
kde4_add_ui_files(krfb_SRCS connectionwidget.ui
|
||||
manageinvitations.ui
|
||||
personalinvitewidget.ui
|
||||
invitewidget.ui
|
||||
configtcp.ui
|
||||
configsecurity.ui
|
||||
)
|
||||
|
||||
kde4_add_executable(krfb ${krfb_SRCS})
|
||||
|
||||
target_link_libraries(krfb
|
||||
krfbprivate
|
||||
${JPEG_LIBRARIES}
|
||||
${LIBVNCSERVER_LIBRARIES}
|
||||
${X11_Xext_LIB}
|
||||
${X11_X11_LIB}
|
||||
${X11_Xdamage_LIB}
|
||||
${QT_QTNETWORK_LIBRARY}
|
||||
${KDE4_KDNSSD_LIBS}
|
||||
${KDE4_KDEUI_LIBS}
|
||||
)
|
||||
|
||||
if(X11_XTest_FOUND)
|
||||
target_link_libraries(krfb ${X11_XTest_LIB})
|
||||
endif(X11_XTest_FOUND)
|
||||
|
||||
install(TARGETS krfb ${INSTALL_TARGETS_DEFAULT_ARGS})
|
||||
|
||||
########### install files ###############
|
||||
|
||||
install(PROGRAMS krfb.desktop DESTINATION ${XDG_APPS_INSTALL_DIR})
|
||||
install(FILES krfb.notifyrc DESTINATION ${DATA_INSTALL_DIR}/krfb)
|
||||
|
||||
#add_subdirectory(kinetd)
|
||||
#add_subdirectory(kcm_krfb)
|
||||
add_subdirectory(krfb)
|
||||
add_subdirectory (framebuffers)
|
||||
endif (HAVE_LIBVNCSERVER)
|
||||
|
||||
|
|
111
krfb/CMakeLists.txt
Normal file
111
krfb/CMakeLists.txt
Normal file
|
@ -0,0 +1,111 @@
|
|||
configure_file (${CMAKE_CURRENT_SOURCE_DIR}/config-krfb.h.cmake
|
||||
${CMAKE_CURRENT_BINARY_DIR}/config-krfb.h
|
||||
)
|
||||
|
||||
#####################################
|
||||
# First target: libkrfbprivate - a library
|
||||
# for linking plugins against.
|
||||
|
||||
set (krfbprivate_SRCS
|
||||
framebuffer.cpp
|
||||
framebufferplugin.cpp
|
||||
)
|
||||
|
||||
kde4_add_library (krfbprivate
|
||||
SHARED
|
||||
${krfbprivate_SRCS}
|
||||
)
|
||||
|
||||
target_link_libraries (krfbprivate
|
||||
${QT_QTCORE_LIBRARY}
|
||||
${QT_QTGUI_LIBRARY}
|
||||
${X11_X11_LIB}
|
||||
${LIBVNCSERVER_LIBRARIES}
|
||||
)
|
||||
|
||||
set_target_properties (krfbprivate PROPERTIES
|
||||
VERSION ${GENERIC_LIB_VERSION}
|
||||
SOVERSION ${GENERIC_LIB_VERSION}
|
||||
)
|
||||
|
||||
install (TARGETS krfbprivate
|
||||
${INSTALL_TARGETS_DEFAULT_ARGS}
|
||||
)
|
||||
|
||||
install (FILES
|
||||
krfb-framebuffer.desktop
|
||||
DESTINATION ${SERVICETYPES_INSTALL_DIR}
|
||||
)
|
||||
|
||||
#####################################
|
||||
# Second target: krfb - the app
|
||||
# itself.
|
||||
|
||||
set (krfb_SRCS
|
||||
abstractconnectioncontroller.cpp
|
||||
abstractrfbserver.cpp
|
||||
connectiondialog.cpp
|
||||
events.cpp
|
||||
framebuffermanager.cpp
|
||||
invitation.cpp
|
||||
invitedialog.cpp
|
||||
invitationmanager.cpp
|
||||
krfbconnectioncontroller.cpp
|
||||
krfbserver.cpp
|
||||
main.cpp
|
||||
manageinvitationsdialog.cpp
|
||||
personalinvitedialog.cpp
|
||||
servermanager.cpp
|
||||
sockethelpers.cpp
|
||||
trayicon.cpp
|
||||
)
|
||||
|
||||
kde4_add_kcfg_files (krfb_SRCS
|
||||
krfbconfig.kcfgc
|
||||
)
|
||||
|
||||
kde4_add_ui_files (krfb_SRCS
|
||||
ui/configtcp.ui
|
||||
ui/configsecurity.ui
|
||||
ui/connectionwidget.ui
|
||||
ui/invitewidget.ui
|
||||
ui/manageinvitations.ui
|
||||
ui/personalinvitewidget.ui
|
||||
)
|
||||
|
||||
kde4_add_executable (krfb
|
||||
${krfb_SRCS}
|
||||
)
|
||||
|
||||
target_link_libraries (krfb
|
||||
krfbprivate
|
||||
${JPEG_LIBRARIES}
|
||||
${LIBVNCSERVER_LIBRARIES}
|
||||
${X11_Xext_LIB}
|
||||
${X11_X11_LIB}
|
||||
${X11_Xdamage_LIB}
|
||||
${QT_QTNETWORK_LIBRARY}
|
||||
${KDE4_KDNSSD_LIBS}
|
||||
${KDE4_KDEUI_LIBS}
|
||||
)
|
||||
|
||||
if (X11_XTest_FOUND)
|
||||
target_link_libraries (krfb
|
||||
${X11_XTest_LIB}
|
||||
)
|
||||
endif (X11_XTest_FOUND)
|
||||
|
||||
install (TARGETS krfb
|
||||
${INSTALL_TARGETS_DEFAULT_ARGS}
|
||||
)
|
||||
|
||||
########### install files ###############
|
||||
|
||||
install (PROGRAMS krfb.desktop
|
||||
DESTINATION ${XDG_APPS_INSTALL_DIR}
|
||||
)
|
||||
|
||||
install (FILES krfb.notifyrc
|
||||
DESTINATION ${DATA_INSTALL_DIR}/krfb
|
||||
)
|
||||
|
|
@ -1,3 +1,3 @@
|
|||
#! /bin/sh
|
||||
$EXTRACTRC *.ui *.kcfg >> rc.cpp
|
||||
$EXTRACTRC ui/*.ui *.kcfg >> rc.cpp
|
||||
$XGETTEXT *.cpp -o $podir/krfb.pot
|
Loading…
Reference in New Issue
Block a user