1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-07-30 15:39:27 +02:00
Leland Lucius 6217351a12 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)
2020-02-03 00:39:43 -06:00

52 lines
1.4 KiB
CMake

add_library( ${TARGET} STATIC )
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
)
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} )