--- CMakeLists.txt 2023-09-11 10:03:12.000000000 +0800 +++ CMakeLists.txt 2024-01-18 13:26:52.000000000 +0800 @@ -29,7 +29,7 @@ include(ConfigureCompilerFlags) include(DependencyDetection) -if (NOT DEFINED ENV{HOMEBREW_PREFIX} AND NOT ${BUILD_STANDALONE} MATCHES "true") +if (NOT ${BUILD_STANDALONE} MATCHES "true") find_program(CCACHE_FOUND ccache) if (CCACHE_FOUND) message(STATUS "${BoldGreen}[ccache] ccache enabled!${ColorReset}") @@ -37,7 +37,7 @@ set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ccache) endif(CCACHE_FOUND) else() - message(STATUS "${BoldYellow}[ccache] disabled; homebrew or standalone build detected.${ColorReset}") + message(STATUS "${BoldYellow}[ccache] disabled; standalone build detected.${ColorReset}") endif() if (CROSS_COMPILE_SYSROOT) @@ -55,8 +55,7 @@ "${musikcube_SOURCE_DIR}/src/musikcore" "${musikcube_SOURCE_DIR}/src/musikcube" "${musikcube_SOURCE_DIR}/src/musikcube/cursespp" - "${musikcube_SOURCE_DIR}/src/3rdparty/include" - "${musikcube_SOURCE_DIR}/src/3rdparty/asio/asio/include") + "${musikcube_SOURCE_DIR}/src/3rdparty/include") include_directories(${PROJECT_INCLUDE_DIRECTORIES}) @@ -78,8 +77,8 @@ # disable update check for environments that we know will provided hosted, # prebuilt binaries. -if (DEFINED ENV{HOMEBREW_PREFIX}) - message(STATUS "[build] detected homebrew, disabling update check functionality.") +if (APPLE) + message(STATUS "[build] detected Darwin, disabling update check functionality.") add_definitions(-DDISABLE_UPDATE_CHECK) endif() --- src/plugins/stockencoders/CMakeLists.txt 2023-09-11 10:03:12.000000000 +0800 +++ src/plugins/stockencoders/CMakeLists.txt 2024-01-18 13:47:58.000000000 +0800 @@ -5,22 +5,11 @@ add_library(stockencoders SHARED ${stockencoders_SOURCES}) -if (${BUILD_STANDALONE} MATCHES "true") - include_directories(BEFORE ${VENDOR_INCLUDE_DIRECTORIES}) - find_vendor_library(AVCODEC avcodec-musikcube) - find_vendor_library(AVUTIL avutil-musikcube) - find_vendor_library(AVFORMAT avformat-musikcube) - find_vendor_library(SWRESAMPLE swresample-musikcube) - find_vendor_library(MP3LAME mp3lame) -else() - # fedora (and probably other RPM-based distros) put ffmpeg includes here... - include_directories("/usr/include/ffmpeg") - include_directories("/usr/local/include/ffmpeg") - find_library(AVCODEC NAMES avcodec) - find_library(AVUTIL NAMES avutil) - find_library(AVFORMAT NAMES avformat) - find_library(SWRESAMPLE NAMES swresample) - find_library(MP3LAME NAMES mp3lame) -endif() +include_directories("@PREFIX@/libexec/ffmpeg@FFMPG_VER@/include") +find_library(AVCODEC NAMES avcodec PATHS @PREFIX@/libexec/ffmpeg@FFMPG_VER@/lib) +find_library(AVUTIL NAMES avutil PATHS @PREFIX@/libexec/ffmpeg@FFMPG_VER@/lib) +find_library(AVFORMAT NAMES avformat PATHS @PREFIX@/libexec/ffmpeg@FFMPG_VER@/lib) +find_library(SWRESAMPLE NAMES swresample PATHS @PREFIX@/libexec/ffmpeg@FFMPG_VER@/lib) +find_library(MP3LAME NAMES mp3lame) target_link_libraries(stockencoders ${AVCODEC} ${AVUTIL} ${AVFORMAT} ${SWRESAMPLE} ${MP3LAME}) --- src/plugins/ffmpegdecoder/CMakeLists.txt 2024-07-06 04:54:06.000000000 +0800 +++ src/plugins/ffmpegdecoder/CMakeLists.txt 2024-07-06 19:11:13.000000000 +0800 @@ -4,21 +4,10 @@ add_library(ffmpegdecoder SHARED ${ffmpegdecoder_SOURCES}) -if (${BUILD_STANDALONE} MATCHES "true") - include_directories(AFTER ${VENDOR_INCLUDE_DIRECTORIES}) - message(STATUS "[ffmpegdecoder] using include dirs: ${VENDOR_INCLUDE_DIRECTORIES}") - find_vendor_library(AVCODEC avcodec-musikcube) - find_vendor_library(AVUTIL avutil-musikcube) - find_vendor_library(AVFORMAT avformat-musikcube) - find_vendor_library(SWRESAMPLE swresample-musikcube) -else() - # fedora (and probably other RPM-based distros) put ffmpeg includes here... - include_directories("/usr/include/ffmpeg") - include_directories("/usr/local/include/ffmpeg") - find_library(AVCODEC NAMES avcodec) - find_library(AVUTIL NAMES avutil) - find_library(AVFORMAT NAMES avformat) - find_library(SWRESAMPLE NAMES swresample) -endif() +include_directories("@PREFIX@/libexec/ffmpeg@FFMPG_VER@/include") +find_library(AVCODEC NAMES avcodec PATHS @PREFIX@/libexec/ffmpeg@FFMPG_VER@/lib) +find_library(AVUTIL NAMES avutil PATHS @PREFIX@/libexec/ffmpeg@FFMPG_VER@/lib) +find_library(AVFORMAT NAMES avformat PATHS @PREFIX@/libexec/ffmpeg@FFMPG_VER@/lib) +find_library(SWRESAMPLE NAMES swresample PATHS @PREFIX@/libexec/ffmpeg@FFMPG_VER@/lib) target_link_libraries(ffmpegdecoder ${AVCODEC} ${AVUTIL} ${AVFORMAT} ${SWRESAMPLE})