From cd1e33baa4e766f6d388d6cae8f054568db1a509 Mon Sep 17 00:00:00 2001 From: "Azamat H. Hackimov" Date: Sun, 19 May 2024 02:31:50 +0300 Subject: [PATCH] Move lnxcontroller to linux submodule --- CMakeLists.txt | 1 - Descent3/CMakeLists.txt | 4 ++-- linux/CMakeLists.txt | 12 ++++++++---- {lnxcontroller => linux}/lnxcontroller.cpp | 3 +-- lnxcontroller/CMakeLists.txt | 7 ------- 5 files changed, 11 insertions(+), 16 deletions(-) rename {lnxcontroller => linux}/lnxcontroller.cpp (99%) delete mode 100644 lnxcontroller/CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt index ba7888bd..334b653f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -168,7 +168,6 @@ else() add_subdirectory(linux) add_subdirectory(ddvid_lnx) add_subdirectory(dd_lnxsound) - add_subdirectory(lnxcontroller) add_subdirectory(ddio_lnx) endif() diff --git a/Descent3/CMakeLists.txt b/Descent3/CMakeLists.txt index 270ef3f9..c700b627 100644 --- a/Descent3/CMakeLists.txt +++ b/Descent3/CMakeLists.txt @@ -280,12 +280,12 @@ if(WIN32) endif() if(UNIX AND NOT APPLE) - set(PLATFORM_LIBS linux dd_lnxsound ddvid_lnx lnxcontroller ddio_lnx SDL2::SDL2 m ${CMAKE_DL_LIBS} ${CURSES_LIBRARIES}) + set(PLATFORM_LIBS linux dd_lnxsound ddvid_lnx ddio_lnx SDL2::SDL2 m ${CMAKE_DL_LIBS} ${CURSES_LIBRARIES}) set(PLATFORM_CPPS loki_utils.c lnxmain.cpp) endif() if(APPLE) - set(PLATFORM_LIBS linux dd_lnxsound ddvid_lnx lnxcontroller ddio_lnx SDL2::SDL2 ${CURSES_LIBRARIES}) + set(PLATFORM_LIBS linux dd_lnxsound ddvid_lnx ddio_lnx SDL2::SDL2 ${CURSES_LIBRARIES}) set(PLATFORM_CPPS loki_utils.c lnxmain.cpp) set(CMAKE_EXE_LINKER_FLAGS "-framework IOKit -framework Cocoa -framework OpenGL -framework Carbon") endif() diff --git a/linux/CMakeLists.txt b/linux/CMakeLists.txt index 0f982db6..da878ab4 100644 --- a/linux/CMakeLists.txt +++ b/linux/CMakeLists.txt @@ -1,10 +1,14 @@ -set(HEADERS registry.h) set(CPPS lnxcon.cpp lnxcon_raw.cpp + lnxcontroller.cpp lnxapp.cpp lnxcon_null.cpp lnxdata.cpp - registry.cpp) -# DynXLib.cpp -add_library(linux STATIC ${HEADERS} ${CPPS}) + registry.cpp +) + +add_library(linux STATIC ${CPPS}) +target_link_libraries(linux PRIVATE + cfile +) diff --git a/lnxcontroller/lnxcontroller.cpp b/linux/lnxcontroller.cpp similarity index 99% rename from lnxcontroller/lnxcontroller.cpp rename to linux/lnxcontroller.cpp index 51d0137b..fb80df90 100644 --- a/lnxcontroller/lnxcontroller.cpp +++ b/linux/lnxcontroller.cpp @@ -41,9 +41,8 @@ * $NoKeywords: $ */ +#include #include "Controller.h" -#include -#include #include "ddio.h" #include "pserror.h" #include "joystick.h" diff --git a/lnxcontroller/CMakeLists.txt b/lnxcontroller/CMakeLists.txt deleted file mode 100644 index 912ba4e6..00000000 --- a/lnxcontroller/CMakeLists.txt +++ /dev/null @@ -1,7 +0,0 @@ -set(HEADERS) -set(CPPS lnxcontroller.cpp) - -add_library(lnxcontroller STATIC ${HEADERS} ${CPPS}) -target_link_libraries(lnxcontroller PRIVATE - cfile -)