aboutsummaryrefslogtreecommitdiff
path: root/src/plugins/Output/directsound/CMakeLists.txt
blob: 5de46e9eb41a6eb22a5794063af04f93da05aece (plain) (blame)
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
project(libdirectsound)

INCLUDE(CheckIncludeFile)

# qt plugin
ADD_DEFINITIONS( -Wall )
ADD_DEFINITIONS(${QT_DEFINITIONS})
ADD_DEFINITIONS(-DQT_PLUGIN)
ADD_DEFINITIONS(-DQT_NO_DEBUG)
ADD_DEFINITIONS(-DQT_SHARED)
ADD_DEFINITIONS(-DQT_THREAD)

include_directories(${CMAKE_CURRENT_BINARY_DIR})

SET(QT_INCLUDES
  ${QT_INCLUDES}
  ${CMAKE_CURRENT_SOURCE_DIR}/../../../
)

# libqmmp
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../../../)
link_directories(${CMAKE_CURRENT_BINARY_DIR}/../../../qmmp)

# Win32 DirectSound
CHECK_INCLUDE_FILE(dsound.h DSOUND_H_FOUND)

SET(libdirectsound_SRCS
  outputdirectsound.cpp
  outputdirectsoundfactory.cpp
)

SET(libdirectsound_HDRS
  outputdirectsound.h
)

SET(libdirectsound_RCCS translations/translations.qrc)

QT4_ADD_RESOURCES(libdirectsound_RCC_SRCS ${libdirectsound_RCCS})


IF(DSOUND_H_FOUND)
ADD_LIBRARY(directsound MODULE ${libdirectsound_SRCS} ${libdirectsound_RCC_SRCS} ${libdirectsound_HDRS})
add_dependencies(directsound qmmp)
target_link_libraries(directsound ${QT_LIBRARIES} libqmmp -ldxguid -lstrmiids -ldmoguids -lmsdmo -lole32 -loleaut32 -luuid -lgdi32 -ldsound)
install(TARGETS directsound DESTINATION ${LIB_DIR}/qmmp/Output)
ENDIF(DSOUND_H_FOUND)