cmake_minimum_required(VERSION 3.22.1) project(songshrink_lame C) # The LAME part of SongShrink's Android build file (android/app/src/main/cpp/CMakeLists.txt), unchanged except # LAME_DIR, which points at the folder prepared in BUILD.md. Builds liblame.so on its own. set(LAME_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../LameKit/Sources/CLame) file(GLOB LAME_SRC ${LAME_DIR}/*.c) add_library(lame SHARED ${LAME_SRC}) target_include_directories(lame PUBLIC ${LAME_DIR} ${LAME_DIR}/include) target_compile_definitions(lame PRIVATE HAVE_CONFIG_H) target_compile_options(lame PRIVATE -O3 -w) target_link_libraries(lame m) # 16 KB page alignment (required by Google Play for apps targeting Android 15+ on 16 KB devices). target_link_options(lame PRIVATE "-Wl,-z,max-page-size=16384")