build(lib/platform): Explicit Sources
This commit is contained in:
committed by
Chris Rizzitello
parent
e8010eea60
commit
9e2880f714
@ -1,4 +1,5 @@
|
||||
# Deskflow -- mouse and keyboard sharing utility
|
||||
# Copyright (C) 2024 Chris Rizzitello <sithlord48@gmail.com>
|
||||
# Copyright (C) 2012-2024 Symless Ltd.
|
||||
# Copyright (C) 2009-2012 Nick Bolton
|
||||
#
|
||||
@ -13,6 +14,7 @@
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
if(UNIX AND NOT APPLE)
|
||||
pkg_check_modules(LIBEI REQUIRED QUIET "libei-1.0 >= 1.3")
|
||||
message(STATUS "libei version: ${LIBEI_VERSION}")
|
||||
@ -22,56 +24,152 @@ if(UNIX AND NOT APPLE)
|
||||
endif()
|
||||
|
||||
if(WIN32)
|
||||
file(GLOB headers "MSWindows*.h")
|
||||
file(GLOB sources "MSWindows*.cpp")
|
||||
set(PLATFORM_SOURCES
|
||||
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)
|
||||
file(GLOB headers "OSX*.h" "IOSX*.h")
|
||||
file(
|
||||
GLOB
|
||||
sources
|
||||
"OSX*.cpp"
|
||||
"IOSX*.cpp"
|
||||
"OSX*.m"
|
||||
"OSX*.mm")
|
||||
set(PLATFORM_SOURCES
|
||||
IOSXKeyResource.cpp
|
||||
IOSXKeyResource.h
|
||||
OSXAutoTypes.h
|
||||
OSXClipboard.cpp
|
||||
OSXClipboard.h
|
||||
OSXClipboardAnyBitmapConverter.cpp
|
||||
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)
|
||||
file(GLOB x_headers "XWindows*.h")
|
||||
file(GLOB x_sources "XWindows*.cpp")
|
||||
set(PLATFORM_SOURCES
|
||||
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)
|
||||
file(GLOB ei_headers "Ei*.h")
|
||||
file(GLOB ei_sources "Ei*.cpp")
|
||||
|
||||
list(APPEND PLATFORM_SOURCES
|
||||
EiEventQueueBuffer.cpp
|
||||
EiEventQueueBuffer.h
|
||||
EiKeyState.cpp
|
||||
EiKeyState.h
|
||||
EiScreen.cpp
|
||||
EiScreen.h
|
||||
)
|
||||
# The Portal sources also require EI.
|
||||
if(LIBPORTAL_FOUND)
|
||||
file(GLOB portal_headers "Portal*.h")
|
||||
file(GLOB portal_sources "Portal*.cpp")
|
||||
list(APPEND PLATFORM_SOURCES
|
||||
PortalInputCapture.cpp
|
||||
PortalInputCapture.h
|
||||
PortalRemoteDesktop.cpp
|
||||
PortalRemoteDesktop.h
|
||||
)
|
||||
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()
|
||||
|
||||
if(APPLE)
|
||||
list(APPEND inc /System/Library/Frameworks)
|
||||
endif()
|
||||
|
||||
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})
|
||||
|
||||
macro(link_wayland_libs)
|
||||
|
||||
Reference in New Issue
Block a user