-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
43 lines (35 loc) · 1.82 KB
/
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
cmake_minimum_required(VERSION 2.6)
project(agents)
find_package(OpenGL REQUIRED)
find_package(PkgConfig REQUIRED)
pkg_check_modules(GLFW3 REQUIRED glfw3)
pkg_check_modules(GLEW REQUIRED glew)
pkg_check_modules(LIBPULSE-SIMPLE REQUIRED libpulse-simple)
pkg_check_modules(LIBAVCODEC REQUIRED libavcodec)
pkg_check_modules(LIBAVUTIL REQUIRED libavutil)
pkg_check_modules(LIBAVFORMAT REQUIRED libavformat)
pkg_check_modules(LIBSWSCALE REQUIRED libswscale)
pkg_check_modules(LIBSWRESAMPLE REQUIRED libswresample)
pkg_check_modules(FFTW3 REQUIRED fftw3)
set(CMAKE_CXX_FLAGS "-O2 -Wall -Wextra")
SET(LIBRARIES glfw ${LIBAVCODEC_LDFLAGS} ${LIBAVUTIL_LDFLAGS} ${GLFW_LIBRARIES} ${GLEW_LIBRARIES} ${OPENGL_LIBRARY} ${CMAKE_DL_LIBS})
include_directories(${LIBAVCODEC_INCLUDE_DIRS} )
include_directories(${LIBAVUTIL_INCLUDE_DIRS})
include_directories(${LIBAVFORMAT_INCLUDE_DIRS})
include_directories(${LIBSWSCALE_INCLUDE_DIRS})
include_directories(${LIBSWRESAMPLE_INCLUDE_DIRS})
include_directories(${FFTW3_INCLUDE_DIRS})
ADD_LIBRARY(SlimeModule src/ffmpeg_decoder.cpp src/ffmpeg_encoder.cpp src/input_pulse.cpp src/slime.cpp src/util.cpp src/spectrum.cpp src/fluid.cpp)
target_link_libraries(SlimeModule ${LIBAVCODEC_LDFLAGS})
target_link_libraries(SlimeModule ${LIBAVUTIL_LDFLAGS})
target_link_libraries(SlimeModule ${LIBRARIES})
target_link_libraries(SlimeModule ${LIBAVCODEC_LIBRARIES})
target_link_libraries(SlimeModule ${LIBAVUTIL_LIBRARIES})
target_link_libraries(SlimeModule ${LIBAVFORMAT_LIBRARIES})
target_link_libraries(SlimeModule ${LIBSWSCALE_LIBRARIES})
target_link_libraries(SlimeModule ${LIBSWRESAMPLE_LIBRARIES})
target_link_libraries(SlimeModule ${FFTW3_LIBRARIES})
target_link_libraries(SlimeModule ${LIBPULSE-SIMPLE_LIBRARIES})
ADD_EXECUTABLE(agents src/agents.cpp)
target_link_libraries(agents SlimeModule)
target_link_libraries(agents ${LIBRARIES})