From dd32f4e3ed9ceacab81c2804231b1ec3f611e076 Mon Sep 17 00:00:00 2001 From: "Azamat H. Hackimov" Date: Sun, 28 Jul 2024 21:51:35 +0300 Subject: [PATCH] Split libacm files to third_party/libacm and AudioEncode Logically adecode/aencode belongs to AudioEncode. --- AudioEncode/CMakeLists.txt | 2 ++ {libacm => AudioEncode}/adecode.cpp | 0 {libacm => AudioEncode}/adecode.h | 0 {libacm => AudioEncode}/aencode.cpp | 0 {libacm => AudioEncode}/aencode.h | 0 CMakeLists.txt | 2 -- THIRD_PARTY.md | 4 ++-- libacm/CMakeLists.txt | 17 ----------------- music/CMakeLists.txt | 2 +- stream_audio/CMakeLists.txt | 5 +++-- third_party/CMakeLists.txt | 1 + third_party/libacm/CMakeLists.txt | 6 ++++++ {libacm => third_party/libacm}/decode.c | 0 {libacm => third_party/libacm}/libacm.h | 0 14 files changed, 15 insertions(+), 24 deletions(-) rename {libacm => AudioEncode}/adecode.cpp (100%) rename {libacm => AudioEncode}/adecode.h (100%) rename {libacm => AudioEncode}/aencode.cpp (100%) rename {libacm => AudioEncode}/aencode.h (100%) delete mode 100644 libacm/CMakeLists.txt create mode 100644 third_party/libacm/CMakeLists.txt rename {libacm => third_party/libacm}/decode.c (100%) rename {libacm => third_party/libacm}/libacm.h (100%) diff --git a/AudioEncode/CMakeLists.txt b/AudioEncode/CMakeLists.txt index 3dc428cf..70d161cf 100644 --- a/AudioEncode/CMakeLists.txt +++ b/AudioEncode/CMakeLists.txt @@ -1,4 +1,6 @@ set(CPPS + adecode.cpp + aencode.cpp encoder.cpp ) diff --git a/libacm/adecode.cpp b/AudioEncode/adecode.cpp similarity index 100% rename from libacm/adecode.cpp rename to AudioEncode/adecode.cpp diff --git a/libacm/adecode.h b/AudioEncode/adecode.h similarity index 100% rename from libacm/adecode.h rename to AudioEncode/adecode.h diff --git a/libacm/aencode.cpp b/AudioEncode/aencode.cpp similarity index 100% rename from libacm/aencode.cpp rename to AudioEncode/aencode.cpp diff --git a/libacm/aencode.h b/AudioEncode/aencode.h similarity index 100% rename from libacm/aencode.h rename to AudioEncode/aencode.h diff --git a/CMakeLists.txt b/CMakeLists.txt index 78a098fb..5b83a80f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -221,8 +221,6 @@ add_subdirectory(unzip) add_subdirectory(vecmat) add_subdirectory(libmve) add_subdirectory(md5) -add_subdirectory(libacm) - if(BUILD_EDITOR AND CMAKE_SYSTEM_NAME STREQUAL "Windows") add_subdirectory(editor) diff --git a/THIRD_PARTY.md b/THIRD_PARTY.md index 59d44fa9..87f7ad7a 100644 --- a/THIRD_PARTY.md +++ b/THIRD_PARTY.md @@ -7,8 +7,8 @@ for building Descent 3. libacm - library for InterPlay ACM Audio format. https://github.com/markokr/libacm -* libacm/decode.c -* libacm/libacm.h +* third_party/libacm/decode.c +* third_party/libacm/libacm.h The libacm core code is licensed under minimal BSD/ISC license. diff --git a/libacm/CMakeLists.txt b/libacm/CMakeLists.txt deleted file mode 100644 index 178d81ca..00000000 --- a/libacm/CMakeLists.txt +++ /dev/null @@ -1,17 +0,0 @@ -set(CPPS - adecode.cpp - aencode.cpp -) - -# these are the relevant source files from upstream libacm (https://github.com/markokr/libacm/) -set(LIB_SRC - decode.c - libacm.h -) - -add_library(libacm STATIC ${CPPS} ${LIB_SRC}) -target_include_directories(libacm PUBLIC - $ -) diff --git a/music/CMakeLists.txt b/music/CMakeLists.txt index 1a19d9b4..7b34d9bc 100644 --- a/music/CMakeLists.txt +++ b/music/CMakeLists.txt @@ -7,9 +7,9 @@ set(CPPS add_library(music STATIC ${HEADERS} ${CPPS}) target_link_libraries(music + AudioEncode cfile ddio - libacm mem misc sndlib diff --git a/stream_audio/CMakeLists.txt b/stream_audio/CMakeLists.txt index d0d01604..34a70b74 100644 --- a/stream_audio/CMakeLists.txt +++ b/stream_audio/CMakeLists.txt @@ -1,7 +1,8 @@ set(HEADERS) set(CPPS osfarchive.cpp - streamaudio.cpp) + streamaudio.cpp +) add_library(stream_audio STATIC ${HEADERS} ${CPPS}) target_link_libraries(stream_audio PRIVATE @@ -11,7 +12,7 @@ target_link_libraries(stream_audio PRIVATE sndlib ) target_link_libraries(stream_audio PUBLIC - libacm + AudioEncode ) target_include_directories(stream_audio PUBLIC $ +) diff --git a/libacm/decode.c b/third_party/libacm/decode.c similarity index 100% rename from libacm/decode.c rename to third_party/libacm/decode.c diff --git a/libacm/libacm.h b/third_party/libacm/libacm.h similarity index 100% rename from libacm/libacm.h rename to third_party/libacm/libacm.h