1
0
mirror of https://github.com/cookiengineer/audacity synced 2026-01-14 00:25:51 +01:00

Updates the cmake build system

It's still has some work, but it successfully builds on
all 3 main platforms.  Some of the outstanding items
include:

   Install target testing (mostly important for Linux)
   CMakeList clean up and comments
   Debug and Release build verification
   Audit of compile/link options
   Need a Mac signed and notarized build
   (and probably more)
This commit is contained in:
Leland Lucius
2020-02-03 00:39:43 -06:00
parent 3b77af5dfc
commit 6217351a12
57 changed files with 7958 additions and 6106 deletions

View File

@@ -1,35 +1,51 @@
#directory cmake-proxies/soundtouch
set( TARGET soundtouch )
set( TARGET_SOURCE ${LIB_SRC_DIRECTORY}${TARGET} )
project( ${TARGET} )
set( SOURCES
add_library( ${TARGET} STATIC )
#${LIB_SRC_DIRECTORY}soundtouch/source/Android-lib/jni/soundtouch-jni.cpp
#${LIB_SRC_DIRECTORY}soundtouch/source/SoundStretch/main.cpp
#${LIB_SRC_DIRECTORY}soundtouch/source/SoundStretch/RunParameters.cpp
#${LIB_SRC_DIRECTORY}soundtouch/source/SoundStretch/WavFile.cpp
${LIB_SRC_DIRECTORY}soundtouch/source/SoundTouch/AAFilter.cpp
#${LIB_SRC_DIRECTORY}soundtouch/source/SoundTouch/BPMDetect.cpp
${LIB_SRC_DIRECTORY}soundtouch/source/SoundTouch/cpu_detect_x86.cpp
${LIB_SRC_DIRECTORY}soundtouch/source/SoundTouch/FIFOSampleBuffer.cpp
${LIB_SRC_DIRECTORY}soundtouch/source/SoundTouch/FIRFilter.cpp
${LIB_SRC_DIRECTORY}soundtouch/source/SoundTouch/mmx_optimized.cpp
#${LIB_SRC_DIRECTORY}soundtouch/source/SoundTouch/PeakFinder.cpp
${LIB_SRC_DIRECTORY}soundtouch/source/SoundTouch/RateTransposer.cpp
${LIB_SRC_DIRECTORY}soundtouch/source/SoundTouch/SoundTouch.cpp
${LIB_SRC_DIRECTORY}soundtouch/source/SoundTouch/sse_optimized.cpp
${LIB_SRC_DIRECTORY}soundtouch/source/SoundTouch/TDStretch.cpp
#${LIB_SRC_DIRECTORY}soundtouch/source/SoundTouchDLL/SoundTouchDLL.cpp
)
# This defines the #define on both Windows and Linux.
add_definitions(
-D_LIB
)
add_library( ${TARGET} STATIC ${SOURCES})
target_include_directories( ${TARGET} PRIVATE
${TARGET_SOURCE}/include
list( APPEND SOURCES
PRIVATE
${TARGET_ROOT}/source/SoundTouch/AAFilter.cpp
${TARGET_ROOT}/source/SoundTouch/FIFOSampleBuffer.cpp
${TARGET_ROOT}/source/SoundTouch/FIRFilter.cpp
${TARGET_ROOT}/source/SoundTouch/mmx_optimized.cpp
${TARGET_ROOT}/source/SoundTouch/RateTransposer.cpp
${TARGET_ROOT}/source/SoundTouch/SoundTouch.cpp
${TARGET_ROOT}/source/SoundTouch/TDStretch.cpp
${TARGET_ROOT}/source/SoundTouch/cpu_detect_x86.cpp
${TARGET_ROOT}/source/SoundTouch/sse_optimized.cpp
)
target_link_libraries( ${TARGET} )
list( APPEND INCLUDES
PUBLIC
${CMAKE_CURRENT_BINARY_DIR}/public
${TARGET_ROOT}/include
)
if( UNIX )
check_cxx_compiler_flag( "-mmmx" HAVE_MMX )
if( HAVE_MMX )
list( APPEND OPTIONS
PRIVATE
-mmmx
)
endif()
check_cxx_compiler_flag( "-msse" HAVE_SSE )
if( HAVE_SSE )
list( APPEND OPTIONS
PRIVATE
-msse
)
endif()
endif()
configure_file( soundtouch_config.h.in public/soundtouch_config.h )
organize_source( "${TARGET_ROOT}" "" "${SOURCES}" )
target_sources( ${TARGET} PRIVATE ${SOURCES} )
target_compile_definitions( ${TARGET} PRIVATE ${DEFINES} )
target_compile_features( ${TARGET} PRIVATE ${FEATURES} )
target_compile_options( ${TARGET} PRIVATE ${OPTIONS} )
target_include_directories( ${TARGET} PRIVATE ${INCLUDES} )
target_link_libraries( ${TARGET} PRIVATE ${LIBRARIES} )

View File

@@ -0,0 +1,75 @@
/* include/soundtouch_config.h.in. Generated from configure.ac by autoheader. */
/* Define to 1 if you have the <cpuid.h> header file. */
#cmakedefine HAVE_CPUID_H 1
/* Define to 1 if you have the <dlfcn.h> header file. */
#cmakedefine HAVE_DLFCN_H 1
/* Define to 1 if you have the <inttypes.h> header file. */
#cmakedefine HAVE_INTTYPES_H 1
/* Define to 1 if you have the `m' library (-lm). */
#cmakedefine HAVE_LIBM 1
/* Define to 1 if your system has a GNU libc compatible `malloc' function, and
to 0 otherwise. */
#cmakedefine HAVE_MALLOC 1
/* Define to 1 if you have the <memory.h> header file. */
#cmakedefine HAVE_MEMORY_H 1
/* Define to 1 if you have the <stdint.h> header file. */
#cmakedefine HAVE_STDINT_H 1
/* Define to 1 if you have the <stdlib.h> header file. */
#cmakedefine HAVE_STDLIB_H 1
/* Define to 1 if you have the <strings.h> header file. */
#cmakedefine HAVE_STRINGS_H 1
/* Define to 1 if you have the <string.h> header file. */
#cmakedefine HAVE_STRING_H 1
/* Define to 1 if you have the <sys/stat.h> header file. */
#cmakedefine HAVE_SYS_STAT_H 1
/* Define to 1 if you have the <sys/types.h> header file. */
#cmakedefine HAVE_SYS_TYPES_H 1
/* Define to 1 if you have the <unistd.h> header file. */
#cmakedefine HAVE_UNISTD_H 1
/* Define to the sub-directory in which libtool stores uninstalled libraries.
*/
#cmakedefine LT_OBJDIR "@LT_OBJDIR@"
/* Define as the return type of signal handlers (`int' or `void'). */
#cmakedefine RETSIGTYPE @RETSIGTYPE@
/* Do not use x86 optimizations */
#cmakedefine SOUNDTOUCH_DISABLE_X86_OPTIMIZATIONS 1
/* Use Float as Sample type */
#cmakedefine SOUNDTOUCH_FLOAT_SAMPLES 1
/* Use Integer as Sample type */
#cmakedefine SOUNDTOUCH_INTEGER_SAMPLES 1
/* Define to 1 if you have the ANSI C header files. */
#cmakedefine STDC_HEADERS 1
/* Version number of package */
#cmakedefine VERSION "@VERSION@"
/* Define to empty if `const' does not conform to ANSI C. */
#cmakedefine const @const@
/* Define to `__inline__' or `__inline' if that's what the C compiler
calls it, or to nothing if 'inline' is not supported under any name. */
#ifndef __cplusplus
#cmakedefine inline @inline@
#endif
/* Define to rpl_malloc if the replacement function should be used. */
#cmakedefine malloc @malloc@