1 |
project(QSAMPLER) |
project(QSAMPLER) |
2 |
|
|
3 |
cmake_minimum_required(VERSION 2.6) |
cmake_minimum_required(VERSION 3.1) |
4 |
|
|
5 |
set (VERSION "0.5.7") |
set (VERSION "0.5.7") |
6 |
|
|
7 |
|
set (CONFIG_VERSION ${VERSION}) |
8 |
execute_process ( |
execute_process ( |
9 |
COMMAND git describe --tags --dirty --abbrev=6 |
COMMAND git describe --tags --dirty --abbrev=6 |
10 |
OUTPUT_VARIABLE GIT_DESCRIBE_OUTPUT |
OUTPUT_VARIABLE GIT_DESCRIBE_OUTPUT |
44 |
if (CONFIG_BUILD_TYPE MATCHES "debug") |
if (CONFIG_BUILD_TYPE MATCHES "debug") |
45 |
set(CONFIG_DEBUG 1) |
set(CONFIG_DEBUG 1) |
46 |
endif () |
endif () |
47 |
|
|
48 |
set (CONFIG_PREFIX "${CMAKE_INSTALL_PREFIX}") |
set (CONFIG_PREFIX "${CMAKE_INSTALL_PREFIX}") |
49 |
|
|
50 |
|
include (GNUInstallDirs) |
51 |
|
set (CONFIG_BINDIR "${CONFIG_PREFIX}/${CMAKE_INSTALL_BINDIR}") |
52 |
|
set (CONFIG_LIBDIR "${CONFIG_PREFIX}/${CMAKE_INSTALL_LIBDIR}") |
53 |
|
set (CONFIG_DATADIR "${CONFIG_PREFIX}/${CMAKE_INSTALL_DATADIR}") |
54 |
|
set (CONFIG_MANDIR "${CONFIG_PREFIX}/${CMAKE_INSTALL_MANDIR}") |
55 |
|
|
56 |
|
|
57 |
# Enable libgig availability. |
# Enable libgig availability. |
58 |
option (CONFIG_LIBGIG "Enable libgig interface (default=yes)" 1) |
option (CONFIG_LIBGIG "Enable libgig interface (default=yes)" 1) |
69 |
endif () |
endif () |
70 |
|
|
71 |
# Check for Qt |
# Check for Qt |
72 |
find_package (Qt5 REQUIRED NO_MODULE COMPONENTS Core Gui Widgets Network) |
find_package (Qt5 REQUIRED NO_MODULE COMPONENTS Core Gui Widgets) |
73 |
|
|
74 |
|
if (CONFIG_XUNIQUE) |
75 |
|
find_package (Qt5 REQUIRED NO_MODULE COMPONENTS Network) |
76 |
|
endif () |
77 |
|
|
78 |
find_package (Qt5LinguistTools) |
find_package (Qt5LinguistTools) |
79 |
|
|
|
include (GNUInstallDirs) |
|
80 |
include (CheckIncludeFile) |
include (CheckIncludeFile) |
81 |
include (CheckIncludeFiles) |
include (CheckIncludeFiles) |
82 |
include (CheckIncludeFileCXX) |
include (CheckIncludeFileCXX) |
180 |
# Configuration status |
# Configuration status |
181 |
macro (SHOW_OPTION text value) |
macro (SHOW_OPTION text value) |
182 |
if (${value}) |
if (${value}) |
183 |
message( "${text}: yes" ) |
message("${text}: yes") |
184 |
else () |
else () |
185 |
message( "${text}: no" ) |
message("${text}: no") |
186 |
endif () |
endif () |
187 |
endmacro () |
endmacro () |
188 |
|
|
189 |
message ( "\n ${PACKAGE_NAME} ${PACKAGE_VERSION}") |
|
190 |
message ( "\n Build target . . . . . . . . . . . . . . . . . . .: ${CONFIG_BUILD_TYPE}\n") |
message ("\n ${PACKAGE_NAME} ${PACKAGE_VERSION}") |
191 |
|
message ("\n Build target . . . . . . . . . . . . . . . . . . .: ${CONFIG_BUILD_TYPE}\n") |
192 |
show_option (" LSCP instrument name support . . . . . . . . . . ." CONFIG_INSTRUMENT_NAME) |
show_option (" LSCP instrument name support . . . . . . . . . . ." CONFIG_INSTRUMENT_NAME) |
193 |
show_option (" LSCP mute/solo support . . . . . . . . . . . . . ." CONFIG_MUTE_SOLO) |
show_option (" LSCP mute/solo support . . . . . . . . . . . . . ." CONFIG_MUTE_SOLO) |
194 |
show_option (" LSCP MIDI instrument support . . . . . . . . . . ." CONFIG_MIDI_INSTRUMENT) |
show_option (" LSCP MIDI instrument support . . . . . . . . . . ." CONFIG_MIDI_INSTRUMENT) |
206 |
show_option (" LSCP channel MIDI event support . . . . . . . . ." CONFIG_EVENT_CHANNEL_MIDI) |
show_option (" LSCP channel MIDI event support . . . . . . . . ." CONFIG_EVENT_CHANNEL_MIDI) |
207 |
show_option (" LSCP device MIDI event support . . . . . . . . . ." CONFIG_EVENT_DEVICE_MIDI) |
show_option (" LSCP device MIDI event support . . . . . . . . . ." CONFIG_EVENT_DEVICE_MIDI) |
208 |
show_option (" LSCP runtime max. voices / disk streams support ." CONFIG_MAX_VOICES) |
show_option (" LSCP runtime max. voices / disk streams support ." CONFIG_MAX_VOICES) |
209 |
message ("") |
message ("") |
210 |
show_option (" Unique/Single instance support . . . . . . . . . ." CONFIG_XUNIQUE) |
show_option (" Unique/Single instance support . . . . . . . . . ." CONFIG_XUNIQUE) |
211 |
show_option (" Debugger stack-trace (gdb) . . . . . . . . . . . ." CONFIG_STACKTRACE) |
show_option (" Debugger stack-trace (gdb) . . . . . . . . . . . ." CONFIG_STACKTRACE) |
212 |
message ( "\n Install prefix . . . . . . . . . . . . . . . . . . ${CMAKE_INSTALL_PREFIX}") |
message ("\n Install prefix . . . . . . . . . . . . . . . . . .: ${CMAKE_INSTALL_PREFIX}") |
213 |
message ( "\nNow type 'make', followed by 'make install' as root.\n") |
message ("\nNow type 'make', followed by 'make install' as root.\n") |