1 |
capela |
3570 |
set(NAME qsampler) |
2 |
capela |
3567 |
|
3 |
|
|
include_directories ( |
4 |
capela |
3589 |
${CMAKE_CURRENT_SOURCE_DIR} |
5 |
capela |
3567 |
${CMAKE_CURRENT_BINARY_DIR} |
6 |
|
|
) |
7 |
|
|
|
8 |
capela |
3594 |
configure_file (cmake_config.h.in ${CMAKE_CURRENT_BINARY_DIR}/config.h) |
9 |
capela |
3567 |
|
10 |
|
|
set (HEADERS |
11 |
|
|
qsampler.h |
12 |
|
|
qsamplerAbout.h |
13 |
|
|
qsamplerOptions.h |
14 |
|
|
qsamplerChannel.h |
15 |
|
|
qsamplerMessages.h |
16 |
|
|
qsamplerInstrument.h |
17 |
|
|
qsamplerInstrumentList.h |
18 |
|
|
qsamplerDevice.h |
19 |
|
|
qsamplerFxSend.h |
20 |
|
|
qsamplerFxSendsModel.h |
21 |
|
|
qsamplerUtilities.h |
22 |
|
|
qsamplerInstrumentForm.h |
23 |
|
|
qsamplerInstrumentListForm.h |
24 |
|
|
qsamplerDeviceForm.h |
25 |
|
|
qsamplerDeviceStatusForm.h |
26 |
|
|
qsamplerChannelStrip.h |
27 |
|
|
qsamplerChannelForm.h |
28 |
|
|
qsamplerChannelFxForm.h |
29 |
|
|
qsamplerOptionsForm.h |
30 |
capela |
3648 |
qsamplerPaletteForm.h |
31 |
capela |
3567 |
qsamplerMainForm.h |
32 |
|
|
) |
33 |
|
|
|
34 |
|
|
set (SOURCES |
35 |
|
|
qsampler.cpp |
36 |
|
|
qsamplerOptions.cpp |
37 |
|
|
qsamplerChannel.cpp |
38 |
|
|
qsamplerMessages.cpp |
39 |
|
|
qsamplerInstrument.cpp |
40 |
|
|
qsamplerInstrumentList.cpp |
41 |
|
|
qsamplerDevice.cpp |
42 |
|
|
qsamplerFxSend.cpp |
43 |
|
|
qsamplerFxSendsModel.cpp |
44 |
|
|
qsamplerUtilities.cpp |
45 |
|
|
qsamplerInstrumentForm.cpp |
46 |
|
|
qsamplerInstrumentListForm.cpp |
47 |
|
|
qsamplerDeviceForm.cpp |
48 |
|
|
qsamplerDeviceStatusForm.cpp |
49 |
|
|
qsamplerChannelStrip.cpp |
50 |
|
|
qsamplerChannelForm.cpp |
51 |
|
|
qsamplerChannelFxForm.cpp |
52 |
|
|
qsamplerOptionsForm.cpp |
53 |
capela |
3648 |
qsamplerPaletteForm.cpp |
54 |
capela |
3567 |
qsamplerMainForm.cpp |
55 |
|
|
) |
56 |
|
|
|
57 |
|
|
set (FORMS |
58 |
|
|
qsamplerInstrumentForm.ui |
59 |
|
|
qsamplerInstrumentListForm.ui |
60 |
|
|
qsamplerDeviceForm.ui |
61 |
|
|
qsamplerChannelStrip.ui |
62 |
|
|
qsamplerChannelForm.ui |
63 |
|
|
qsamplerChannelFxForm.ui |
64 |
|
|
qsamplerOptionsForm.ui |
65 |
capela |
3648 |
qsamplerPaletteForm.ui |
66 |
capela |
3567 |
qsamplerMainForm.ui |
67 |
|
|
) |
68 |
|
|
|
69 |
|
|
set (RESOURCES |
70 |
|
|
qsampler.qrc |
71 |
|
|
) |
72 |
|
|
|
73 |
|
|
set (TRANSLATIONS |
74 |
|
|
translations/qsampler_cs.ts |
75 |
|
|
translations/qsampler_fr.ts |
76 |
|
|
translations/qsampler_ru.ts |
77 |
|
|
) |
78 |
|
|
|
79 |
|
|
qt5_add_translation ( QM_FILES ${TRANSLATIONS} ) |
80 |
|
|
add_custom_target( translations ALL DEPENDS ${QM_FILES} ) |
81 |
|
|
|
82 |
|
|
qt5_wrap_ui (UI_SOURCES ${FORMS}) |
83 |
|
|
qt5_wrap_cpp (MOC_SOURCES ${HEADERS}) |
84 |
|
|
qt5_add_resources (QRC_SOURCES ${RESOURCES}) |
85 |
|
|
|
86 |
capela |
3570 |
if (WIN32) |
87 |
|
|
set (RC_FILE ${CMAKE_CURRENT_SOURCE_DIR}/win32/${NAME}.rc) |
88 |
|
|
set (RES_FILE ${CMAKE_CURRENT_BINARY_DIR}/${NAME}.res.obj) |
89 |
|
|
find_program (WINDRES_EXECUTABLE NAMES windres mingw32-windres i686-mingw32-windres) |
90 |
|
|
if (MINGW) |
91 |
|
|
exec_program (${WINDRES_EXECUTABLE} |
92 |
|
|
ARGS "-i ${RC_FILE} -o ${RES_FILE} --include-dir=${CMAKE_CURRENT_SOURCE_DIR}/images") |
93 |
|
|
list (APPEND SOURCES ${RES_FILE}) |
94 |
|
|
else () |
95 |
|
|
list (APPEND SOURCES ${RC_FILE}) |
96 |
|
|
endif () |
97 |
|
|
endif () |
98 |
|
|
|
99 |
|
|
if (APPLE) |
100 |
|
|
set (ICON_FILE ${CMAKE_CURRENT_SOURCE_DIR}/images/${NAME}.icns) |
101 |
|
|
list (APPEND SOURCES ${ICON_FILE}) |
102 |
|
|
set (MACOSX_BUNDLE_ICON_FILE ${NAME}.icns) |
103 |
|
|
set_source_files_properties (${ICON_FILE} PROPERTIES |
104 |
|
|
MACOSX_PACKAGE_LOCATION Resources) |
105 |
|
|
endif () |
106 |
|
|
|
107 |
|
|
|
108 |
|
|
add_executable (${NAME} |
109 |
capela |
3567 |
${UI_SOURCES} |
110 |
|
|
${MOC_SOURCES} |
111 |
|
|
${QRC_SOURCES} |
112 |
|
|
${SOURCES} |
113 |
|
|
) |
114 |
|
|
|
115 |
capela |
3572 |
set_target_properties (${NAME} PROPERTIES CXX_STANDARD 11) |
116 |
|
|
|
117 |
capela |
3570 |
if (WIN32) |
118 |
capela |
3572 |
set_target_properties (${NAME} PROPERTIES WIN32_EXECUTABLE true) |
119 |
capela |
3570 |
endif () |
120 |
capela |
3567 |
|
121 |
capela |
3570 |
if (APPLE) |
122 |
capela |
3572 |
set_target_properties (${NAME} PROPERTIES MACOSX_BUNDLE true) |
123 |
capela |
3567 |
endif () |
124 |
|
|
|
125 |
capela |
3570 |
target_link_libraries (${NAME} PRIVATE Qt5::Widgets) |
126 |
|
|
|
127 |
capela |
3569 |
if (CONFIG_XUNIQUE) |
128 |
capela |
3570 |
target_link_libraries (${NAME} PRIVATE Qt5::Network) |
129 |
capela |
3569 |
endif () |
130 |
|
|
|
131 |
capela |
3570 |
if (CONFIG_LIBLSCP) |
132 |
|
|
target_link_libraries (${NAME} PRIVATE ${LSCP_LIBRARIES}) |
133 |
|
|
endif () |
134 |
|
|
|
135 |
|
|
if (CONFIG_LIBGIG) |
136 |
|
|
target_link_libraries (${NAME} PRIVATE ${GIG_LIBRARIES}) |
137 |
|
|
endif () |
138 |
|
|
|
139 |
|
|
|
140 |
capela |
3567 |
if (UNIX AND NOT APPLE) |
141 |
capela |
3570 |
install (TARGETS ${NAME} RUNTIME |
142 |
capela |
3569 |
DESTINATION ${CMAKE_INSTALL_BINDIR}) |
143 |
capela |
3567 |
install (FILES ${QM_FILES} |
144 |
capela |
3570 |
DESTINATION ${CMAKE_INSTALL_DATADIR}/${NAME}/translations) |
145 |
capela |
3589 |
install (FILES ${NAME}.desktop |
146 |
capela |
3569 |
DESTINATION ${CMAKE_INSTALL_DATADIR}/applications) |
147 |
capela |
3570 |
install (FILES images/${NAME}.png |
148 |
capela |
3569 |
DESTINATION ${CMAKE_INSTALL_DATADIR}/icons/hicolor/32x32/apps) |
149 |
capela |
3570 |
install (FILES images/${NAME}.svg |
150 |
capela |
3569 |
DESTINATION ${CMAKE_INSTALL_DATADIR}/icons/hicolor/scalable/apps) |
151 |
capela |
3570 |
install (FILES appdata/${NAME}.appdata.xml |
152 |
capela |
3569 |
DESTINATION ${CMAKE_INSTALL_DATADIR}/metainfo) |
153 |
capela |
3570 |
install (FILES mimetypes/${NAME}.xml |
154 |
capela |
3569 |
DESTINATION ${CMAKE_INSTALL_DATADIR}/mime/packages) |
155 |
capela |
3570 |
install (FILES mimetypes/application-x-${NAME}-session.png |
156 |
capela |
3569 |
DESTINATION ${CMAKE_INSTALL_DATADIR}/icons/hicolor/32x32/mimetypes) |
157 |
capela |
3570 |
install (FILES mimetypes/application-x-${NAME}-session.svg |
158 |
capela |
3569 |
DESTINATION ${CMAKE_INSTALL_DATADIR}/icons/hicolor/scalable/mimetypes) |
159 |
capela |
3567 |
endif () |
160 |
capela |
3570 |
|
161 |
|
|
if (WIN32) |
162 |
|
|
install (TARGETS ${NAME} RUNTIME |
163 |
|
|
DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) |
164 |
|
|
install (FILES ${QM_FILES} |
165 |
|
|
DESTINATION ${CMAKE_INSTALL_DATADIR}/${NAME}/translations) |
166 |
|
|
endif () |