1
0
forked from blue/mlc
mlc/CMakeLists.txt

34 lines
770 B
CMake
Raw Permalink Normal View History

cmake_minimum_required(VERSION 3.5)
2023-07-16 00:15:31 +00:00
project(
mlc
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)
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)
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
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)