2023-10-08 23:29:40 +00:00
|
|
|
cmake_minimum_required(VERSION 3.5)
|
2023-07-16 00:15:31 +00:00
|
|
|
project(
|
|
|
|
mlc
|
2023-10-09 21:47:00 +00:00
|
|
|
VERSION 1.3.0
|
2023-07-16 00:15:31 +00:00
|
|
|
DESCRIPTION "Media Library Compiler: rips your media library to a lossy compilation"
|
|
|
|
LANGUAGES CXX
|
|
|
|
)
|
|
|
|
cmake_policy(SET CMP0076 NEW)
|
|
|
|
cmake_policy(SET CMP0079 NEW)
|
2023-07-15 19:44:29 +00:00
|
|
|
|
2023-07-16 00:15:31 +00:00
|
|
|
set(CMAKE_CXX_STANDARD 17)
|
|
|
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
|
|
|
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake")
|
2023-07-15 19:44:29 +00:00
|
|
|
|
2023-07-25 23:39:56 +00:00
|
|
|
find_package(PkgConfig REQUIRED)
|
2023-07-16 00:15:31 +00:00
|
|
|
find_package(FLAC REQUIRED)
|
2023-07-18 23:05:32 +00:00
|
|
|
find_package(JPEG REQUIRED)
|
2023-07-16 00:15:31 +00:00
|
|
|
|
2023-07-25 23:39:56 +00:00
|
|
|
pkg_check_modules(LAME REQUIRED IMPORTED_TARGET lame)
|
|
|
|
pkg_check_modules(TAGLIB REQUIRED IMPORTED_TARGET taglib)
|
|
|
|
|
2023-10-06 21:39:07 +00:00
|
|
|
add_executable(mlc)
|
|
|
|
|
|
|
|
add_subdirectory(src)
|
2023-07-16 00:15:31 +00:00
|
|
|
|
|
|
|
target_link_libraries(mlc
|
2023-07-25 23:39:56 +00:00
|
|
|
FLAC::FLAC
|
|
|
|
PkgConfig::LAME
|
2023-07-18 23:05:32 +00:00
|
|
|
JPEG::JPEG
|
2023-07-25 23:39:56 +00:00
|
|
|
PkgConfig::TAGLIB
|
2023-07-16 00:15:31 +00:00
|
|
|
)
|
2023-07-15 19:44:29 +00:00
|
|
|
|
|
|
|
install(TARGETS mlc RUNTIME DESTINATION bin)
|