build(lib/arch): Explicit Sources
This commit is contained in:
parent
5657152c58
commit
da4b85b3fb
1 changed files with 81 additions and 21 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
|
||||||
#
|
#
|
||||||
|
|
@ -14,34 +15,93 @@
|
||||||
# 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/>.
|
||||||
|
|
||||||
file(GLOB headers "*.h")
|
# Platform Specific Code
|
||||||
file(GLOB sources "*.cpp")
|
|
||||||
|
|
||||||
if(ADD_HEADERS_TO_SOURCES)
|
|
||||||
list(APPEND sources ${headers})
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# arch
|
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
file(GLOB arch_headers "win32/*.h")
|
set(PLATFORM_CODE
|
||||||
file(GLOB arch_sources "win32/*.cpp")
|
win32/ArchConsoleWindows.cpp
|
||||||
|
win32/ArchConsoleWindows.h
|
||||||
|
win32/ArchDaemonWindows.cpp
|
||||||
|
win32/ArchDaemonWindows.h
|
||||||
|
win32/ArchFileWindows.cpp
|
||||||
|
win32/ArchFileWindows.h
|
||||||
|
win32/ArchLogWindows.cpp
|
||||||
|
win32/ArchLogWindows.h
|
||||||
|
win32/ArchMiscWindows.cpp
|
||||||
|
win32/ArchMiscWindows.h
|
||||||
|
win32/ArchMultithreadWindows.cpp
|
||||||
|
win32/ArchMultithreadWindows.h
|
||||||
|
win32/ArchNetworkWinsock.cpp
|
||||||
|
win32/ArchNetworkWinsock.h
|
||||||
|
win32/ArchSleepWindows.cpp
|
||||||
|
win32/ArchSleepWindows.h
|
||||||
|
win32/ArchStringWindows.cpp
|
||||||
|
win32/ArchStringWindows.h
|
||||||
|
win32/ArchSystemWindows.cpp
|
||||||
|
win32/ArchSystemWindows.h
|
||||||
|
win32/ArchTaskBarWindows.cpp
|
||||||
|
win32/ArchTaskBarWindows.h
|
||||||
|
win32/ArchTimeWindows.cpp
|
||||||
|
win32/ArchTimeWindows.h
|
||||||
|
win32/XArchWindows.cpp
|
||||||
|
win32/XArchWindows.h
|
||||||
|
)
|
||||||
|
|
||||||
elseif(UNIX)
|
elseif(UNIX)
|
||||||
file(GLOB arch_headers "unix/*.h")
|
set(PLATFORM_CODE
|
||||||
file(GLOB arch_sources "unix/*.cpp")
|
unix/ArchConsoleUnix.cpp
|
||||||
|
unix/ArchConsoleUnix.h
|
||||||
|
unix/ArchDaemonUnix.cpp
|
||||||
|
unix/ArchDaemonUnix.h
|
||||||
|
unix/ArchFileUnix.cpp
|
||||||
|
unix/ArchFileUnix.h
|
||||||
|
unix/ArchLogUnix.cpp
|
||||||
|
unix/ArchLogUnix.h
|
||||||
|
unix/ArchMultithreadPosix.cpp
|
||||||
|
unix/ArchMultithreadPosix.h
|
||||||
|
unix/ArchNetworkBSD.cpp
|
||||||
|
unix/ArchNetworkBSD.h
|
||||||
|
unix/ArchSleepUnix.cpp
|
||||||
|
unix/ArchSleepUnix.h
|
||||||
|
unix/ArchStringUnix.cpp
|
||||||
|
unix/ArchStringUnix.h
|
||||||
|
unix/ArchSystemUnix.cpp
|
||||||
|
unix/ArchSystemUnix.h
|
||||||
|
unix/ArchTaskBarXWindows.cpp
|
||||||
|
unix/ArchTaskBarXWindows.h
|
||||||
|
unix/ArchTimeUnix.cpp
|
||||||
|
unix/ArchTimeUnix.h
|
||||||
|
unix/XArchUnix.cpp
|
||||||
|
unix/XArchUnix.h
|
||||||
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
list(APPEND sources ${arch_sources})
|
add_library(arch STATIC ${PLATFORM_CODE}
|
||||||
list(APPEND headers ${arch_headers})
|
Arch.cpp
|
||||||
|
Arch.h
|
||||||
if(ADD_HEADERS_TO_SOURCES)
|
ArchConsoleStd.cpp
|
||||||
list(APPEND sources ${headers})
|
ArchConsoleStd.h
|
||||||
endif()
|
ArchDaemonNone.cpp
|
||||||
|
ArchDaemonNone.h
|
||||||
add_library(arch STATIC ${sources})
|
IArchConsole.h
|
||||||
|
IArchDaemon.h
|
||||||
|
IArchFile.h
|
||||||
|
IArchLog.h
|
||||||
|
IArchMultithread.h
|
||||||
|
IArchNetwork.h
|
||||||
|
IArchSleep.h
|
||||||
|
IArchString.cpp
|
||||||
|
IArchString.h
|
||||||
|
IArchSystem.h
|
||||||
|
IArchTaskBar.h
|
||||||
|
IArchTaskBarReceiver.h
|
||||||
|
IArchTime.h
|
||||||
|
multibyte.h
|
||||||
|
vsnprintf.h
|
||||||
|
XArch.h
|
||||||
|
)
|
||||||
|
|
||||||
if(UNIX)
|
if(UNIX)
|
||||||
target_link_libraries(arch ${CMAKE_DL_LIBS} ${libs})
|
target_link_libraries(arch ${CMAKE_DL_LIBS} ${libs})
|
||||||
|
|
||||||
if(NOT APPLE)
|
if(NOT APPLE)
|
||||||
find_package(Qt6 COMPONENTS DBus)
|
find_package(Qt6 COMPONENTS DBus)
|
||||||
target_link_libraries(arch Qt6::DBus)
|
target_link_libraries(arch Qt6::DBus)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue