/[svn]/qsampler/trunk/CMakeLists.txt
ViewVC logotype

Diff of /qsampler/trunk/CMakeLists.txt

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 3633 by capela, Thu Oct 17 14:09:09 2019 UTC revision 3824 by capela, Sat Sep 26 18:49:03 2020 UTC
# Line 2  project(QSAMPLER) Line 2  project(QSAMPLER)
2    
3  cmake_minimum_required(VERSION 3.1)  cmake_minimum_required(VERSION 3.1)
4    
5  set (VERSION "0.6.0")  set (VERSION "0.9.0")
6    
7  set (CONFIG_VERSION ${VERSION})  set (CONFIG_VERSION ${VERSION})
8  execute_process (  execute_process (
# Line 12  execute_process ( Line 12  execute_process (
12    OUTPUT_STRIP_TRAILING_WHITESPACE)    OUTPUT_STRIP_TRAILING_WHITESPACE)
13  if (GIT_DESCRIBE_RESULT EQUAL 0)  if (GIT_DESCRIBE_RESULT EQUAL 0)
14    set (VERSION "${GIT_DESCRIBE_OUTPUT}")    set (VERSION "${GIT_DESCRIBE_OUTPUT}")
15    string (REGEX REPLACE "^[^_]+"   "" VERSION "${VERSION}")    string (REGEX REPLACE "^[^0-9]+" "" VERSION "${VERSION}")
   string (REGEX REPLACE "^[_vV]+"  "" VERSION "${VERSION}")  
16    string (REGEX REPLACE "-g"   "git." VERSION "${VERSION}")    string (REGEX REPLACE "-g"   "git." VERSION "${VERSION}")
17    string (REGEX REPLACE "[_|-]+"  "." VERSION "${VERSION}")    string (REGEX REPLACE "[_|-]+"  "." VERSION "${VERSION}")
18    execute_process (    execute_process (
# Line 109  find_package (PkgConfig REQUIRED) Line 108  find_package (PkgConfig REQUIRED)
108    
109  # Check for LSCP libraries.  # Check for LSCP libraries.
110  pkg_check_modules (LSCP REQUIRED lscp)  pkg_check_modules (LSCP REQUIRED lscp)
111  set (CONFIG_LIBLSCP ${LSCP_FOUND})  if (LSCP_FOUND)
112  if (CONFIG_LIBLSCP)    set (CONFIG_LIBLSCP 1)
113    include_directories (${LSCP_INCLUDE_DIRS})    include_directories (${LSCP_INCLUDE_DIRS})
114    link_directories (${LSCP_LIBRARY_DIRS})    link_directories (${LSCP_LIBRARY_DIRS})
115  # link_libraries (${LSCP_LIBRARIES})  # link_libraries (${LSCP_LIBRARIES})
116    set (CMAKE_REQUIRED_LIBRARIES "${LSCP_LIBRARIES};${CMAKE_REQUIRED_LIBRARIES}")    set (CMAKE_REQUIRED_LIBRARIES "${LSCP_LIBRARIES};${CMAKE_REQUIRED_LIBRARIES}")
117    # Check for for instrument_name in lscp_channel_info_t.    # Check for for instrument_name in lscp_channel_info_t.
118    check_include_file (lscp/client.h CONFIG_INSTRUMENT_NAME)    check_include_file (lscp/client.h HAVE_LSCP_CLIENT_H)
119      if (NOT HAVE_LSCP_CLIENT_H)
120        set (CONFIG_INSTRUMENT_NAME 0)
121      else ()
122        set (CONFIG_INSTRUMENT_NAME 1)    
123      endif ()
124    # Check for mute/solo in lscp_channel_info_t.    # Check for mute/solo in lscp_channel_info_t.
125    check_include_file (lscp/client.h CONFIG_MUTE_SOLO)    if (NOT HAVE_LSCP_CLIENT_H)
126        set (CONFIG_MUTE_SOLO 0)
127      else ()
128        set (CONFIG_MUTE_SOLO 1)    
129      endif ()
130    if (CONFIG_MUTE_SOLO)    if (CONFIG_MUTE_SOLO)
131      check_function_exists (lscp_set_channel_mute CONFIG_MUTE_SOLO)      check_function_exists (lscp_set_channel_mute CONFIG_MUTE_SOLO)
132    endif ()    endif ()
# Line 131  if (CONFIG_LIBLSCP) Line 139  if (CONFIG_LIBLSCP)
139    check_function_exists (lscp_create_fxsend CONFIG_FXSEND)    check_function_exists (lscp_create_fxsend CONFIG_FXSEND)
140    # Check for FX send level in lscp_fxsend_info_t    # Check for FX send level in lscp_fxsend_info_t
141    if (CONFIG_FXSEND)    if (CONFIG_FXSEND)
142      check_include_file (lscp/client.h CONFIG_FXSEND_LEVEL)      if (NOT HAVE_LSCP_CLIENT_H)
143          set (CONFIG_FXSEND_LEVEL 0)
144        else ()
145          set (CONFIG_FXSEND_LEVEL 1)    
146        endif ()
147    endif ()    endif ()
148    # Check if FX send rename is available.    # Check if FX send rename is available.
149    if (CONFIG_FXSEND)    if (CONFIG_FXSEND)
150      check_function_exists (lscp_set_fxsend_name CONFIG_FXSEND_RENAME)      check_function_exists (lscp_set_fxsend_name CONFIG_FXSEND_RENAME)
151    endif ()    endif ()
152    # Check for audio_routing array type    # Check for audio_routing array type
153    check_include_file (lscp/client.h CONFIG_AUDIO_ROUTING)    if (NOT HAVE_LSCP_CLIENT_H)
154        set (CONFIG_AUDIO_ROUTING 0)
155      else ()
156        set (CONFIG_AUDIO_ROUTING 1)    
157      endif ()
158    # Check if global volume is available.    # Check if global volume is available.
159    check_function_exists (lscp_set_volume CONFIG_VOLUME)    check_function_exists (lscp_set_volume CONFIG_VOLUME)
160    # Check if instrument editing is available.    # Check if instrument editing is available.
161    check_function_exists (lscp_edit_channel_instrument CONFIG_EDIT_INSTRUMENT)    check_function_exists (lscp_edit_channel_instrument CONFIG_EDIT_INSTRUMENT)
162    # Check for CHANNEL_MIDI LSCP event support in liblscp],    # Check for CHANNEL_MIDI LSCP event support in liblscp],
163    check_include_file (lscp/event.h CONFIG_EVENT_CHANNEL_MIDI)    check_include_file (lscp/event.h HAVE_LSCP_EVENT_H)
164      if (NOT HAVE_LSCP_EVENT_H)
165        set (CONFIG_EVENT_CHANNEL_MIDI 0)
166      else ()
167        set (CONFIG_EVENT_CHANNEL_MIDI 1)    
168      endif ()
169    # Check for DEVICE_MIDI LSCP event support in liblscp],    # Check for DEVICE_MIDI LSCP event support in liblscp],
170    check_include_file (lscp/event.h CONFIG_EVENT_DEVICE_MIDI)    if (NOT HAVE_LSCP_EVENT_H)
171        set (CONFIG_EVENT_DEVICE_MIDI 0)
172      else ()
173        set (CONFIG_EVENT_DEVICE_MIDI 1)    
174      endif ()
175    # Check if max. voices / streams is available.    # Check if max. voices / streams is available.
176    check_function_exists (lscp_get_voices CONFIG_MAX_VOICES)    check_function_exists (lscp_get_voices CONFIG_MAX_VOICES)
177  else ()  else ()
178    message (FATAL_ERROR "*** LSCP library not found.")    message (FATAL_ERROR "*** LSCP library not found.")
179      set (CONFIG_LIBLSCP 0)
180  endif ()  endif ()
181    
182  # Check for GIG libraries.  # Check for GIG libraries.
183  if (CONFIG_LIBGIG)  if (CONFIG_LIBGIG)
184    pkg_check_modules (GIG gig>=3.3.0)    pkg_check_modules (GIG gig>=3.3.0)
185    set (CONFIG_LIBGIG ${GIG_FOUND})    if (GIG_FOUND)
   if (CONFIG_LIBGIG)  
186      include_directories (${GIG_INCLUDE_DIRS})      include_directories (${GIG_INCLUDE_DIRS})
187      link_directories (${GIG_LIBRARY_DIRS})      link_directories (${GIG_LIBRARY_DIRS})
188      link_libraries (${GIG_LIBRARIES})      link_libraries (${GIG_LIBRARIES})
# Line 165  if (CONFIG_LIBGIG) Line 190  if (CONFIG_LIBGIG)
190      # liggig supports fast information retrieval.      # liggig supports fast information retrieval.
191      set (CONFIG_LIBGIG_SETAUTOLOAD 1)      set (CONFIG_LIBGIG_SETAUTOLOAD 1)
192      # Check if libgig/SF.h is available.      # Check if libgig/SF.h is available.
193      check_include_file_cxx (libgig/SF.h CONFIG_LIBGIG_SF2)      check_include_file_cxx (libgig/SF.h HAVE_LIBGIG_SF_H)
194        if (NOT HAVE_LIBGIG_SF_H)
195          set (CONFIG_LIBGIG_SF2 0)
196        else ()
197          set (CONFIG_LIBGIG_SF2 1)    
198        endif ()
199    else ()    else ()
200      message (WARNING "*** GIG library not found.")      message (WARNING "*** GIG library not found.")
201        set (CONFIG_LIBGIG 0)
202    endif ()    endif ()
203  endif ()  endif ()
204    

Legend:
Removed from v.3633  
changed lines
  Added in v.3824

  ViewVC Help
Powered by ViewVC