blob: c8659c3af9c990e17997961ca59f67e371d3c6a2 (
plain)
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
|
#################################################
#
# (C) 2010 Serghei Amelian
# serghei (DOT) amelian (AT) gmail.com
#
# Improvements and feedback are welcome
#
# This file is released under GPL >= 2
#
#################################################
##### variables for artsc-config ################
set( prefix ${CMAKE_INSTALL_PREFIX} )
set( exec_prefix $prefix )
set( libdir $prefix/${LIB_INSTALL_DIR} )
set( includedir ${prefix}/${INCLUDE_INSTALL_DIR} )
set( LIBDL -l${DL_LIBRARIES} )
set( USE_THREADS )
set( LIBPTHREAD ${CMAKE_THREAD_LIBS_INIT} )
foreach( LIB ${GTHREAD2_LIBRARIES} )
set( GLIB_LDFLAGS "${GLIB_LDFLAGS} -l${LIB}" )
endforeach(LIB)
set( GLIB_LIBADD )
foreach( INC ${GTHREAD2_INCLUDE_DIRS} )
set( GLIB_CFLAGS "${GLIB_CFLAGS} -I${INC}" )
endforeach(INC)
configure_file( artsc-config.in artsc-config @ONLY )
configure_file( artsc_export.h.in artsc_export.h @ONLY )
set( FLOWLIBS artsflow )
set( artsc_INCS
artsc.h
artsc_export.h
)
add_definitions(
-DCOMPILING_ARTSC
)
include_directories(
${CMAKE_CURRENT_BINARY_DIR} # for artsc_export.h
${CMAKE_BINARY_DIR}/mcop # for arts_export.h
${CMAKE_SOURCE_DIR}/mcop # for common.h
${CMAKE_BINARY_DIR}/flow # for artsflow.h
${CMAKE_SOURCE_DIR}/flow # for stdsynthmodule.h
${CMAKE_BINARY_DIR}/soundserver # for soundserver.h
)
##### libartsdsp ################################
set( artsdsp_SRCS
artsdsp.c
)
add_library( artsdsp SHARED ${artsdsp_SRCS} )
set_target_properties( artsdsp PROPERTIES VERSION 0.0 SOVERSION 0 )
target_link_libraries( artsdsp artsc )
##### libartsdsp_st #############################
set( artsdsp_st_SRCS
artsc.c
artsdsp.c
)
add_library( artsdsp_st SHARED ${artsdsp_st_SRCS} )
set_target_properties( artsdsp_st PROPERTIES VERSION 0.0 SOVERSION 0 )
set_target_properties( artsdsp_st PROPERTIES COMPILE_FLAGS -DARTSC_BACKEND=\\"$(libdir)/libartscbackend.la\\" )
target_link_libraries( artsdsp_st ltdlc )
##### libartsc ##################################
set( artsc_SRCS
artsc.c
)
add_library( artsc SHARED ${artsc_SRCS} )
set_target_properties( artsc PROPERTIES VERSION 0.0 SOVERSION 0 )
set_target_properties( artsc PROPERTIES COMPILE_FLAGS -DARTSC_BACKEND=\\"$(libdir)/libartscbackend.la\\" )
target_link_libraries( artsc ltdlc ${LIBPTHREAD} )
##### libartscbackend ###########################
set( artscbackend_SRCS
artscbackend.cc
)
add_library( artscbackend SHARED ${artscbackend_SRCS} )
set_target_properties( artscbackend PROPERTIES VERSION 0.0 SOVERSION 0 )
target_link_libraries( artscbackend ${FLOWLIBS} soundserver_idl )
##### install ###################################
#install( FILES ${artsc_INCS} DESTINATION ${INCLUDE_INSTALL_DIR} )
install( PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/artsc-config DESTINATION ${BIN_INSTALL_DIR} )
install( TARGETS artsdsp artsdsp_st artsc artscbackend LIBRARY DESTINATION ${LIB_INSTALL_DIR} )
|