summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt6
1 files changed, 6 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 46ddd44a..4c65bab6 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -26,6 +26,7 @@ project (Lagrange
26set (COPYRIGHT_YEAR 2020) 26set (COPYRIGHT_YEAR 2020)
27 27
28# Build configuration. 28# Build configuration.
29option (ENABLE_MPG123 "Use mpg123 for decoding MPEG audio" ON)
29option (ENABLE_X11_SWRENDER "Use software rendering under X11" OFF) 30option (ENABLE_X11_SWRENDER "Use software rendering under X11" OFF)
30option (ENABLE_KERNING "Enable kerning in font renderer (slower)" ON) 31option (ENABLE_KERNING "Enable kerning in font renderer (slower)" ON)
31option (ENABLE_RESOURCE_EMBED "Embed resources inside the executable" OFF) 32option (ENABLE_RESOURCE_EMBED "Embed resources inside the executable" OFF)
@@ -47,6 +48,7 @@ else ()
47endif () 48endif ()
48find_package (PkgConfig REQUIRED) 49find_package (PkgConfig REQUIRED)
49pkg_check_modules (SDL2 REQUIRED sdl2) 50pkg_check_modules (SDL2 REQUIRED sdl2)
51pkg_check_modules (MPG123 IMPORTED_TARGET libmpg123)
50 52
51# Embedded resources are written to a generated source file. 53# Embedded resources are written to a generated source file.
52message (STATUS "Preparing embedded resources...") 54message (STATUS "Preparing embedded resources...")
@@ -201,6 +203,10 @@ endif ()
201if (ENABLE_WINDOWPOS_FIX) 203if (ENABLE_WINDOWPOS_FIX)
202 target_compile_definitions (app PUBLIC LAGRANGE_ENABLE_WINDOWPOS_FIX=1) 204 target_compile_definitions (app PUBLIC LAGRANGE_ENABLE_WINDOWPOS_FIX=1)
203endif () 205endif ()
206if (ENABLE_MPG123 AND MPG123_FOUND)
207 target_compile_definitions (app PUBLIC LAGRANGE_ENABLE_MPG123=1)
208 target_link_libraries (app PUBLIC PkgConfig::MPG123)
209endif ()
204target_link_libraries (app PUBLIC the_Foundation::the_Foundation) 210target_link_libraries (app PUBLIC the_Foundation::the_Foundation)
205target_link_libraries (app PUBLIC ${SDL2_LDFLAGS}) 211target_link_libraries (app PUBLIC ${SDL2_LDFLAGS})
206if (APPLE) 212if (APPLE)