build(lib/platform): Explicit Sources
This commit is contained in:
parent
e8010eea60
commit
9e2880f714
1 changed files with 134 additions and 36 deletions
|
|
@ -1,4 +1,5 @@
|
||||||
# Deskflow -- mouse and keyboard sharing utility
|
# Deskflow -- mouse and keyboard sharing utility
|
||||||
|
# Copyright (C) 2024 Chris Rizzitello <sithlord48@gmail.com>
|
||||||
# Copyright (C) 2012-2024 Symless Ltd.
|
# Copyright (C) 2012-2024 Symless Ltd.
|
||||||
# Copyright (C) 2009-2012 Nick Bolton
|
# Copyright (C) 2009-2012 Nick Bolton
|
||||||
#
|
#
|
||||||
|
|
@ -13,6 +14,7 @@
|
||||||
#
|
#
|
||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
if(UNIX AND NOT APPLE)
|
if(UNIX AND NOT APPLE)
|
||||||
pkg_check_modules(LIBEI REQUIRED QUIET "libei-1.0 >= 1.3")
|
pkg_check_modules(LIBEI REQUIRED QUIET "libei-1.0 >= 1.3")
|
||||||
message(STATUS "libei version: ${LIBEI_VERSION}")
|
message(STATUS "libei version: ${LIBEI_VERSION}")
|
||||||
|
|
@ -22,56 +24,152 @@ if(UNIX AND NOT APPLE)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
file(GLOB headers "MSWindows*.h")
|
set(PLATFORM_SOURCES
|
||||||
file(GLOB sources "MSWindows*.cpp")
|
dfwhook.h
|
||||||
|
IMSWindowsClipboardFacade.h
|
||||||
|
MSWindowsClipboard.cpp
|
||||||
|
MSWindowsClipboard.h
|
||||||
|
MSWindowsClipboardAnyTextConverter.cpp
|
||||||
|
MSWindowsClipboardAnyTextConverter.h
|
||||||
|
MSWindowsClipboardBitmapConverter.cpp
|
||||||
|
MSWindowsClipboardBitmapConverter.h
|
||||||
|
MSWindowsClipboardFacade.cpp
|
||||||
|
MSWindowsClipboardFacade.h
|
||||||
|
MSWindowsClipboardHTMLConverter.cpp
|
||||||
|
MSWindowsClipboardHTMLConverter.h
|
||||||
|
MSWindowsClipboardTextConverter.cpp
|
||||||
|
MSWindowsClipboardTextConverter.h
|
||||||
|
MSWindowsClipboardUTF16Converter.cpp
|
||||||
|
MSWindowsClipboardUTF16Converter.h
|
||||||
|
MSWindowsDebugOutputter.cpp
|
||||||
|
MSWindowsDebugOutputter.h
|
||||||
|
MSWindowsDesks.cpp
|
||||||
|
MSWindowsDesks.h
|
||||||
|
MSWindowsDropTarget.cpp
|
||||||
|
MSWindowsDropTarget.h
|
||||||
|
MSWindowsEventQueueBuffer.cpp
|
||||||
|
MSWindowsEventQueueBuffer.h
|
||||||
|
MSWindowsHook.cpp
|
||||||
|
MSWindowsHook.h
|
||||||
|
MSWindowsKeyState.cpp
|
||||||
|
MSWindowsKeyState.h
|
||||||
|
MSWindowsPowerManager.cpp
|
||||||
|
MSWindowsPowerManager.h
|
||||||
|
MSWindowsScreen.cpp
|
||||||
|
MSWindowsScreen.h
|
||||||
|
MSWindowsScreenSaver.cpp
|
||||||
|
MSWindowsScreenSaver.h
|
||||||
|
MSWindowsSession.cpp
|
||||||
|
MSWindowsSession.h
|
||||||
|
MSWindowsUtil.cpp
|
||||||
|
MSWindowsUtil.h
|
||||||
|
MSWindowsWatchdog.cpp
|
||||||
|
MSWindowsWatchdog.h
|
||||||
|
)
|
||||||
elseif(APPLE)
|
elseif(APPLE)
|
||||||
file(GLOB headers "OSX*.h" "IOSX*.h")
|
set(PLATFORM_SOURCES
|
||||||
file(
|
IOSXKeyResource.cpp
|
||||||
GLOB
|
IOSXKeyResource.h
|
||||||
sources
|
OSXAutoTypes.h
|
||||||
"OSX*.cpp"
|
OSXClipboard.cpp
|
||||||
"IOSX*.cpp"
|
OSXClipboard.h
|
||||||
"OSX*.m"
|
OSXClipboardAnyBitmapConverter.cpp
|
||||||
"OSX*.mm")
|
OSXClipboardAnyBitmapConverter.h
|
||||||
|
OSXClipboardAnyTextConverter.cpp
|
||||||
|
OSXClipboardAnyTextConverter.h
|
||||||
|
OSXClipboardBMPConverter.cpp
|
||||||
|
OSXClipboardBMPConverter.h
|
||||||
|
OSXClipboardHTMLConverter.cpp
|
||||||
|
OSXClipboardHTMLConverter.h
|
||||||
|
OSXClipboardTextConverter.cpp
|
||||||
|
OSXClipboardTextConverter.h
|
||||||
|
OSXClipboardUTF8Converter.cpp
|
||||||
|
OSXClipboardUTF8Converter.h
|
||||||
|
OSXClipboardUTF16Converter.cpp
|
||||||
|
OSXClipboardUTF16Converter.h
|
||||||
|
OSXDragSimulator.h
|
||||||
|
OSXDragSimulator.m
|
||||||
|
OSXDragView.h
|
||||||
|
OSXDragView.m
|
||||||
|
OSXEventQueueBuffer.cpp
|
||||||
|
OSXEventQueueBuffer.h
|
||||||
|
OSXKeyState.cpp
|
||||||
|
OSXKeyState.h
|
||||||
|
OSXMediaKeySupport.h
|
||||||
|
OSXMediaKeySupport.m
|
||||||
|
OSXPasteboardPeeker.h
|
||||||
|
OSXPasteboardPeeker.m
|
||||||
|
OSXPowerManager.cpp
|
||||||
|
OSXPowerManager.h
|
||||||
|
OSXScreen.h
|
||||||
|
OSXScreen.mm
|
||||||
|
OSXScreenSaver.cpp
|
||||||
|
OSXScreenSaver.h
|
||||||
|
OSXScreenSaverControl.h
|
||||||
|
OSXScreenSaverUtil.h
|
||||||
|
OSXScreenSaverUtil.m
|
||||||
|
OSXUchrKeyResource.cpp
|
||||||
|
OSXUchrKeyResource.h
|
||||||
|
)
|
||||||
elseif(UNIX)
|
elseif(UNIX)
|
||||||
file(GLOB x_headers "XWindows*.h")
|
set(PLATFORM_SOURCES
|
||||||
file(GLOB x_sources "XWindows*.cpp")
|
XWindowsClipboard.cpp
|
||||||
|
XWindowsClipboard.h
|
||||||
|
XWindowsClipboardAnyBitmapConverter.cpp
|
||||||
|
XWindowsClipboardAnyBitmapConverter.h
|
||||||
|
XWindowsClipboardBMPConverter.cpp
|
||||||
|
XWindowsClipboardBMPConverter.h
|
||||||
|
XWindowsClipboardHTMLConverter.cpp
|
||||||
|
XWindowsClipboardHTMLConverter.h
|
||||||
|
XWindowsClipboardTextConverter.cpp
|
||||||
|
XWindowsClipboardTextConverter.h
|
||||||
|
XWindowsClipboardUCS2Converter.cpp
|
||||||
|
XWindowsClipboardUCS2Converter.h
|
||||||
|
XWindowsClipboardUTF8Converter.cpp
|
||||||
|
XWindowsClipboardUTF8Converter.h
|
||||||
|
XWindowsEventQueueBuffer.cpp
|
||||||
|
XWindowsEventQueueBuffer.h
|
||||||
|
XWindowsKeyState.cpp
|
||||||
|
XWindowsKeyState.h
|
||||||
|
XWindowsPowerManager.cpp
|
||||||
|
XWindowsPowerManager.h
|
||||||
|
XWindowsScreen.cpp
|
||||||
|
XWindowsScreen.h
|
||||||
|
XWindowsScreenSaver.cpp
|
||||||
|
XWindowsScreenSaver.h
|
||||||
|
XWindowsUtil.cpp
|
||||||
|
XWindowsUtil.h
|
||||||
|
)
|
||||||
|
|
||||||
if(LIBEI_FOUND)
|
if(LIBEI_FOUND)
|
||||||
file(GLOB ei_headers "Ei*.h")
|
list(APPEND PLATFORM_SOURCES
|
||||||
file(GLOB ei_sources "Ei*.cpp")
|
EiEventQueueBuffer.cpp
|
||||||
|
EiEventQueueBuffer.h
|
||||||
|
EiKeyState.cpp
|
||||||
|
EiKeyState.h
|
||||||
|
EiScreen.cpp
|
||||||
|
EiScreen.h
|
||||||
|
)
|
||||||
# The Portal sources also require EI.
|
# The Portal sources also require EI.
|
||||||
if(LIBPORTAL_FOUND)
|
if(LIBPORTAL_FOUND)
|
||||||
file(GLOB portal_headers "Portal*.h")
|
list(APPEND PLATFORM_SOURCES
|
||||||
file(GLOB portal_sources "Portal*.cpp")
|
PortalInputCapture.cpp
|
||||||
|
PortalInputCapture.h
|
||||||
|
PortalRemoteDesktop.cpp
|
||||||
|
PortalRemoteDesktop.h
|
||||||
|
)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
list(
|
|
||||||
APPEND
|
|
||||||
headers
|
|
||||||
${x_headers}
|
|
||||||
${ei_headers}
|
|
||||||
${portal_headers})
|
|
||||||
list(
|
|
||||||
APPEND
|
|
||||||
sources
|
|
||||||
${x_sources}
|
|
||||||
${ei_sources}
|
|
||||||
${portal_sources})
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(ADD_HEADERS_TO_SOURCES)
|
|
||||||
list(APPEND sources ${headers})
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(APPLE)
|
if(APPLE)
|
||||||
list(APPEND inc /System/Library/Frameworks)
|
list(APPEND inc /System/Library/Frameworks)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
include_directories(${inc})
|
include_directories(${inc})
|
||||||
add_library(platform STATIC ${sources})
|
|
||||||
|
# wayland.h is included to check for wayland support
|
||||||
|
add_library(platform STATIC ${PLATFORM_SOURCES} wayland.h)
|
||||||
|
|
||||||
target_link_libraries(platform client ${libs})
|
target_link_libraries(platform client ${libs})
|
||||||
|
|
||||||
macro(link_wayland_libs)
|
macro(link_wayland_libs)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue