-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
48 lines (40 loc) · 995 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
43
44
45
46
47
CMAKE_MINIMUM_REQUIRED(VERSION 3.10)
PROJECT(LightMusic VERSION 1.5)
SET(CMAKE_CXX_STANDARD 17)
SET(CMAKE_CXX_STANDARD_REQUIRED true)
LINK_LIBRARIES(
avformat
avcodec
avdevice
avutil
swresample
fltk
X11
fltk_images)
# Create an empty directory for the images
# Configure-time!
ADD_CUSTOM_TARGET(make-img-dir ALL
COMMAND ${CMAKE_COMMAND} -E make_directory img)
# Copy the icon to the destination
# Configure-time!
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/img/icon.png ${CMAKE_CURRENT_BINARY_DIR}/img/icon.png COPYONLY)
ADD_EXECUTABLE(lightmusic
main.cpp
Music.h
Music.cpp
Playlist.h
Playlist.cpp
MainWindow.h
MainWindow.cpp
AboutWindow.h
AboutWindow.cpp
sys-specific.h
license.h
version.h
)
# Add a "run" target, it runs lightmusic with the files in ~/Music as arguments
ADD_CUSTOM_TARGET(run
DEPENDS lightmusic
COMMAND lightmusic ~/Music/*
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
)