build(cmd/deskflowc): Explicit Sources

This commit is contained in:
sithlord48 2024-10-23 21:17:57 -04:00 committed by Chris Rizzitello
parent 1b13c843aa
commit 04d6895990

View file

@ -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
#
@ -16,39 +17,35 @@
set(client_source_name "deskflowc")
set(target ${CLIENT_BINARY_NAME})
set(sources ${client_source_name}.cpp)
if(WIN32)
file(GLOB arch_headers "MSWindows*.h")
file(GLOB arch_sources "MSWindows*.cpp")
list(
APPEND
sources
resource.h
set(PLATFORM_SOURCES
${client_source_name}.exe.manifest
${client_source_name}.ico
${client_source_name}.rc
MSWindowsClientTaskBarReceiver.cpp
MSWindowsClientTaskBarReceiver.h
resource.h
tb_error.ico
tb_idle.ico
tb_run.ico
tb_wait.ico
${client_source_name}.exe.manifest
${PROJECT_BINARY_DIR}/src/version.rc)
${PROJECT_BINARY_DIR}/src/version.rc
)
elseif(APPLE)
file(GLOB arch_headers "OSX*.h")
file(GLOB arch_sources "OSX*.cpp")
set(PLATFORM_SOURCES
OSXClientTaskBarReceiver.cpp
OSXClientTaskBarReceiver.h
)
elseif(UNIX)
file(GLOB arch_headers "XWindows*.h")
file(GLOB arch_sources "XWindows*.cpp")
set(PLATFORM_SOURCES
XWindowsClientTaskBarReceiver.cpp
XWindowsClientTaskBarReceiver.h
)
endif()
list(APPEND sources ${arch_sources})
list(APPEND headers ${arch_headers})
add_executable(${target} ${PLATFORM_SOURCES} "${client_source_name}.cpp")
if(ADD_HEADERS_TO_SOURCES)
list(APPEND sources ${headers})
endif()
add_executable(${target} ${sources})
target_link_libraries(
${target}
arch