-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
42 lines (32 loc) · 979 Bytes
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
cmake_minimum_required(VERSION 3.0)
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
project(playlist)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_FLAGS "-O2")
option(LIBCURL "Verify links with libcurl" ON)
option(TAGLIB "Populate playlist metadata with taglib" ON)
find_package(pugixml REQUIRED)
find_package(RapidJSON REQUIRED)
add_executable(playlist
src/main.cpp
src/playlist.cpp
src/asx.cpp
src/cue.cpp
src/jspf.cpp
src/m3u.cpp
src/pls.cpp
src/wpl.cpp
src/xspf.cpp)
target_link_libraries(playlist pugixml RapidJSON)
if(LIBCURL)
find_package(CURL)
target_link_libraries(playlist curl)
add_definitions(-DLIBCURL)
endif()
if(TAGLIB)
find_package(TagLib)
target_link_libraries(playlist tag)
add_definitions(-DTAGLIB)
endif()
install(TARGETS playlist RUNTIME DESTINATION /usr/bin)