Files
reVC/cmake/Findmpg123.cmake
Elnur Hajiyev a03a68de95 Add first-class macOS build and launch support (#42)
* fix: fix GLFW video mode fallback on startup

* fix: fix GLFW mouse activation on startup

* feat: locate macOS game directory when launched from Finder

* feat: ask the user to choose a game directory if gamefiles could not be found

* feat: create an app bundle for macOS builds

* feat: resolve gamefiles inside or beside the app bundle

* fix: distinguish ARM64 Premake platforms

* fix: use libmpg123 pkg-config metadata

* feat: add Xcode support to Premake and CMake

* chore: ignore .DS_Store files

* fix: center mouse cursor when launching and quitting the game

* fix: address a TODO comment

* feat: bundle reVC gamefiles as runtime overrides

* feat: use macOS user directories for saves and settings

* refactor: store macOS game path in reVC.ini

* fix: make Xcode recognize the archive as a macOS app archive

* fix: enable Hardened Runtime for the Xcode app target

* fix: support CMake’s Xcode generator on macOS

* build: remove stale libsndfile linkage

* build: make the app bundle self-contained

* fix: prevent buffer overflow with long game directory paths

* chore: add application category to Info.plist

* fix: omit missing Homebrew OpenAL search paths when using MacPorts

* refactor: move game path declarations to FileMgr header

* build: include the LICENSE file in the app bundle
2026-09-05 12:00:00 -03:00

39 lines
1.2 KiB
CMake

# - Find mpg123
# Find the native mpg123 includes and library
#
# mpg123_INCLUDE_DIR - Where to find mpg123.h
# mpg123_LIBRARIES - List of libraries when using mpg123.
# mpg123_CFLAGS - Compile options to use mpg123
# mpg123_FOUND - True if mpg123 found.
# MPG123::libmpg123 - Imported library of libmpg123
find_package(PkgConfig QUIET)
if(PKG_CONFIG_FOUND)
pkg_search_module(PKG_MPG123 libmpg123)
endif()
find_path(mpg123_INCLUDE_DIR mpg123.h
HINTS ${PKG_MPG123_INCLUDE_DIRS}
PATHS "${mpg123_DIR}"
PATH_SUFFIXES include
)
find_library(mpg123_LIBRARIES NAMES mpg123 mpg123-0 libmpg123-0
HINTS ${PKG_MPG123_LIBRARY_DIRS}
PATHS "${mpg123_DIR}"
PATH_SUFFIXES lib
)
set(mpg123_CFLAGS "${PKG_MPG123_CFLAGS_OTHER}" CACHE STRING "CFLAGS of mpg123")
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(mpg123 DEFAULT_MSG mpg123_LIBRARIES mpg123_INCLUDE_DIR)
if(NOT TARGET MPG123::libmpg123)
add_library(__libmpg123 INTERFACE)
target_compile_options(__libmpg123 INTERFACE ${mpg123_CFLAGS})
target_include_directories(__libmpg123 INTERFACE ${mpg123_INCLUDE_DIR})
target_link_libraries(__libmpg123 INTERFACE ${mpg123_LIBRARIES})
add_library(MPG123::libmpg123 ALIAS __libmpg123)
endif()