mirror of
https://github.com/cookiengineer/audacity
synced 2025-05-01 08:09:41 +02:00
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)
48 lines
1.2 KiB
CMake
48 lines
1.2 KiB
CMake
|
|
add_library( ${TARGET} STATIC )
|
|
|
|
list( APPEND SOURCES
|
|
PRIVATE
|
|
${TARGET_ROOT}/lib/xmlparse.c
|
|
${TARGET_ROOT}/lib/xmlrole.c
|
|
${TARGET_ROOT}/lib/xmltok.c
|
|
${TARGET_ROOT}/lib/xmltok_impl.c
|
|
${TARGET_ROOT}/lib/xmltok_ns.c
|
|
)
|
|
|
|
list( APPEND INCLUDES
|
|
PRIVATE
|
|
${CMAKE_CURRENT_BINARY_DIR}/private
|
|
PUBLIC
|
|
${TARGET_ROOT}/lib
|
|
)
|
|
|
|
list( APPEND DEFINES
|
|
PRIVATE
|
|
HAVE_EXPAT_CONFIG_H
|
|
)
|
|
|
|
check_symbol_exists( "getpagesize" "unistd.h" HAVE_GETPAGESIZE )
|
|
check_symbol_exists( "bcopy" "strings.h" HAVE_BCOPY )
|
|
check_symbol_exists( "memmove" "string.h" HAVE_MEMMOVE )
|
|
|
|
if( WORDS_BIGENDIAN )
|
|
set( BYTEORDER 4321 )
|
|
else( WORDS_BIGENDIAN )
|
|
set( BYTEORDER 1234 )
|
|
endif()
|
|
|
|
set( XML_DTD OFF )
|
|
set( XML_NS OFF )
|
|
|
|
configure_file( ${TARGET_ROOT}/expat_config.h.cmake private/expat_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} )
|
|
|