summaryrefslogtreecommitdiffstats
path: root/src/CMakeLists.txt
blob: d3b652b8099cbd74cd67cf61fa001c5ce476e563 (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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
#################################################
#
#  (C) 2011 Timothy Pearson
#  kb9vqf (AT) pearsoncomputing.net
#
#  Improvements and feedback are welcome
#
#  This file is released under GPL >= 2
#
#################################################

include_directories(
  ${TQT_INCLUDE_DIRS}
  ${TDE_INCLUDE_DIR}
  ${CMAKE_BINARY_DIR}
  ${CMAKE_BINARY_DIR}/src
  ${CMAKE_SOURCE_DIR}/src
  ${ALSA_INC_DIR}
  ${JACK_INC_DIR}
  ${XFT_INC_DIR}
  ${DSSI_INC_DIR}
  ${LIBLO_INC_DIR}
  ${LADSPA_INC_DIR}
  ${LRDF_INC_DIR}
  ${LIRC_INC_DIR}
  ${FFTW3F_INC_DIR}
)

link_directories(
  ${TQT_LIBRARY_DIRS}
  ${TDE_LIBRARY_DIR}
  ${ALSA_LIB_DIR}
  ${JACK_LIB_DIR}
  ${XFT_LIB_DIR}
  ${LIBLO_LIB_DIR}
  ${LRDF_LIB_DIR}
  ${LIRC_LIB_DIR}
  ${FFTW3F_LIB_DIR}
)

##### include cmake file lists ##################

set( CMAKE_INCLUDE_PATH "." )

# Common sources
include( BaseFileList.txt )
include( MiscFileList.txt )

# Sound sources
include( SoundFileList.txt )

# sequencer executable
include( SequencerFileList.txt )

# gui executable
include( GUIFileList.txt )

##### other data ################################

# Install helper scripts
install( PROGRAMS
    helpers/rosegarden-lilypondview
    helpers/rosegarden-project-package
    helpers/rosegarden-audiofile-importer
  DESTINATION ${BIN_INSTALL_DIR} )

# Install GUI resource files
file( GLOB RC_FILES gui/ui/*.rc )
install( FILES ${RC_FILES} DESTINATION ${DATA_INSTALL_DIR}/rosegarden )


##### RosegardenCommon ##############################

tde_add_library( RosegardenCommon STATIC AUTOMOC
  SOURCES ${${misc_SRCS} ${base_SRCS} ${common_sound_SRCS}}
  LINK dl
  DESTINATION ${LIB_INSTALL_DIR}
)


##### rosegardensequencer ###########################

if( WANT_SOUND )
  set( snd_SRCS ${sound_SRCS} )
else( WANT_SOUND )
  set( snd_SRCS ${nosnd_SRCS} )
endif( WANT_SOUND )

tde_add_executable( rosegardensequencer AUTOMOC
  SOURCES ${${seq_dcop_SRCS} ${snd_SRCS} ${sequencer_SRCS}}
  LINK dl tdecore-shared ${ALSA_LIBS} ${JACK_LIBS} ${LIBLO_LIBS} ${LRDF_LIBS} ${FFTW3F_LIBS} tdeui-shared RosegardenCommon
  DESTINATION ${BIN_INSTALL_DIR}
)


##### RosegardenExtended ############################

tde_add_library( RosegardenExtended STATIC AUTOMOC
  SOURCES ${${document_SRCS} ${gui_SRCS} ${gui_dcop_SRCS} ${ui_SRCS}}
  LINK dl lo
  DESTINATION ${LIB_INSTALL_DIR}
)


##### RosegardenCommands ############################

tde_add_library( RosegardenCommands STATIC AUTOMOC
  SOURCES ${${commands_SRCS}}
#  LINK dl
  DESTINATION ${LIB_INSTALL_DIR}
)


##### RosegardenSegmentCanvas #######################

tde_add_library( RosegardenSegmentCanvas STATIC AUTOMOC
  SOURCES ${${segmentcanvas_SRCS}}
#  LINK dl
  DESTINATION ${LIB_INSTALL_DIR}
)


##### rosegarden ####################################

tde_add_executable( rosegarden AUTOMOC
  SOURCES ${gui/application/main.cpp}
  LINK dl lo tdecore-shared ${LIBLO_LIBS} ${LRDF_LIBS} ${FFTW3F_LIBS} ${XFT_LIBS} ${LIRC_LIBS} ${JACK_LIBS} kio-shared tdeui-shared tdeprint-shared RosegardenExtended RosegardenSegmentCanvas RosegardenCommands RosegardenCommon
  DESTINATION ${BIN_INSTALL_DIR}
)

if( WANT_TEST )
  include( TestFileList.txt )

  CREATE_TEST_SOURCELIST(RosegardenTest
    RosegardenTestDriver.cpp
    ${tests_SRCS}
#    base/test/transpose.cpp
#    base/test/segmenttransposecommand.cpp
  )

  tde_add_executable( RosegardenTestDriver AUTOMOC
    SOURCES ${RosegardenTestDriver.cpp ${tests_SRCS}}
    LINK dl lo tdecore-shared ${LIBLO_LIBS} ${LRDF_LIBS} ${FFTW3F_LIBS} ${XFT_LIBS} ${LIRC_LIBS} ${JACK_LIBS} kio-shared tdeui-shared tdeprint-shared RosegardenExtended RosegardenSegmentCanvas RosegardenCommands RosegardenCommon
    DESTINATION ${BIN_INSTALL_DIR}
)

  FOREACH(currenttest ${tests_SRCS})
    GET_FILENAME_COMPONENT(TestName ${currenttest} NAME_WE)
    ADD_TEST(test/${TestName} RosegardenTestDriver test/${TestName})
  ENDFOREACH(currenttest ${tests_SRCS})
endif( WANT_TEST )