From d2af90a2b3a284dfea01ec25d2c3ce8b2e99cfa6 Mon Sep 17 00:00:00 2001 From: W3AXL Date: Fri, 14 Feb 2025 10:54:46 -0500 Subject: [PATCH] confirmed linux build works fine with make/cmake --- CMakeLists.txt | 9 ++++++--- CMakeSettings.json | 36 ------------------------------------ vocoder/MBEEncoder.h | 2 +- 3 files changed, 7 insertions(+), 40 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 936e65e..f40817c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -16,9 +16,12 @@ project(dvmvocoder) set(CMAKE_STATIC_LIBRARY_PREFIX "") set(CMAKE_SHARED_LIBRARY_PREFIX "") -# Set up export symbols (Windows only) -if(WIN32) - set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) +option(COMPILE_WIN32 "Compile for Win32" off) + +# Set up wion +if(COMPILE_WIN32) + set(CMAKE_SYSTEM_NAME "Windows") + set(CMAKE_SYSTEM_PROCESSOR "x86_64") endif() # diff --git a/CMakeSettings.json b/CMakeSettings.json index 3879f92..af6fae1 100644 --- a/CMakeSettings.json +++ b/CMakeSettings.json @@ -1,41 +1,5 @@ { "configurations": [ - { - "name": "x64-Debug", - "generator": "Ninja", - "configurationType": "Debug", - "inheritEnvironments": [ "msvc_x64_x64" ], - "buildRoot": "${projectDir}\\out\\build\\${name}", - "installRoot": "${projectDir}\\out\\install\\${name}", - "cmakeCommandArgs": "", - "buildCommandArgs": "-v", - "ctestCommandArgs": "", - "variables": [ - { - "name": "COMPILE_WIN32", - "value": "True", - "type": "BOOL" - } - ] - }, - { - "name": "x64-RelWithDebInfo", - "generator": "Ninja", - "configurationType": "RelWithDebInfo", - "buildRoot": "${projectDir}\\out\\build\\${name}", - "installRoot": "${projectDir}\\out\\install\\${name}", - "cmakeCommandArgs": "", - "buildCommandArgs": "", - "ctestCommandArgs": "", - "inheritEnvironments": [ "msvc_x64_x64" ], - "variables": [ - { - "name": "COMPILE_WIN32", - "value": "True", - "type": "BOOL" - } - ] - }, { "name": "x86-Debug", "generator": "Ninja", diff --git a/vocoder/MBEEncoder.h b/vocoder/MBEEncoder.h index 1958ff7..186a8a2 100644 --- a/vocoder/MBEEncoder.h +++ b/vocoder/MBEEncoder.h @@ -91,7 +91,7 @@ namespace vocoder #else MBEEncoder* MBEEncoder_Create(MBE_ENCODER_MODE mode); void MBEEncoder_Encode(MBEEncoder* pEncoder, int16_t* samples, uint8_t* codeword); - void MBEEncoder_EncodeBits(MBEEncoder* pEncoder, uint8_t* bits, uint8_t* codeword) + void MBEEncoder_EncodeBits(MBEEncoder* pEncoder, uint8_t* bits, uint8_t* codeword); void MBEEncoder_Delete(MBEEncoder* pEncoder); #endif }