/[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 3641 by capela, Fri Nov 15 19:46:23 2019 UTC revision 3868 by capela, Tue Mar 30 23:31:09 2021 UTC
# Line 1  Line 1 
1  project(QSAMPLER)  cmake_minimum_required(VERSION 3.10)
2    
3  cmake_minimum_required(VERSION 3.1)  project(qsampler
4      VERSION 0.9.3
5      DESCRIPTION "A LinuxSampler Qt GUI Interface"
6      LANGUAGES C CXX)
7    
8  set (VERSION "0.6.1")  set (CONFIG_VERSION ${PROJECT_VERSION})
   
 set (CONFIG_VERSION ${VERSION})  
9  execute_process (  execute_process (
10    COMMAND git describe --tags --dirty --abbrev=6    COMMAND git describe --tags --dirty --abbrev=6
11    OUTPUT_VARIABLE GIT_DESCRIBE_OUTPUT    OUTPUT_VARIABLE GIT_DESCRIBE_OUTPUT
# Line 12  execute_process ( Line 13  execute_process (
13    OUTPUT_STRIP_TRAILING_WHITESPACE)    OUTPUT_STRIP_TRAILING_WHITESPACE)
14  if (GIT_DESCRIBE_RESULT EQUAL 0)  if (GIT_DESCRIBE_RESULT EQUAL 0)
15    set (VERSION "${GIT_DESCRIBE_OUTPUT}")    set (VERSION "${GIT_DESCRIBE_OUTPUT}")
16    string (REGEX REPLACE "^[^_]+"   "" VERSION "${VERSION}")    string (REGEX REPLACE "^[^0-9]+" "" VERSION "${VERSION}")
   string (REGEX REPLACE "^[_vV]+"  "" VERSION "${VERSION}")  
17    string (REGEX REPLACE "-g"   "git." VERSION "${VERSION}")    string (REGEX REPLACE "-g"   "git." VERSION "${VERSION}")
18    string (REGEX REPLACE "[_|-]+"  "." VERSION "${VERSION}")    string (REGEX REPLACE "[_|-]+"  "." VERSION "${VERSION}")
19    execute_process (    execute_process (
# Line 24  if (GIT_DESCRIBE_RESULT EQUAL 0) Line 24  if (GIT_DESCRIBE_RESULT EQUAL 0)
24    if (GIT_REVPARSE_RESULT EQUAL 0 AND NOT GIT_REVPARSE_OUTPUT STREQUAL "master")    if (GIT_REVPARSE_RESULT EQUAL 0 AND NOT GIT_REVPARSE_OUTPUT STREQUAL "master")
25      set (VERSION "${VERSION} [${GIT_REVPARSE_OUTPUT}]")      set (VERSION "${VERSION} [${GIT_REVPARSE_OUTPUT}]")
26    endif ()    endif ()
27    else ()
28      set (VERSION "${PROJECT_VERSION}")
29  endif ()  endif ()
30    
31  set (PACKAGE_NAME "Qsampler")  set (PACKAGE_NAME "Qsampler")
# Line 32  set (PACKAGE_BUGREPORT "rncbc@rncbc.org" Line 34  set (PACKAGE_BUGREPORT "rncbc@rncbc.org"
34  set (PACKAGE_STRING "${PACKAGE_NAME} ${PACKAGE_VERSION}")  set (PACKAGE_STRING "${PACKAGE_NAME} ${PACKAGE_VERSION}")
35  set (PACKAGE_TARNAME "qsampler")  set (PACKAGE_TARNAME "qsampler")
36    
37    set (ac_version "${PROJECT_VERSION}")
38    set (ac_prefix "${CMAKE_INSTALL_PREFIX}")
39    
40  set (CONFIG_BUILD_VERSION "${PACKAGE_VERSION}")  set (CONFIG_BUILD_VERSION "${PACKAGE_VERSION}")
41    
42  if (CMAKE_BUILD_TYPE)  if (CMAKE_BUILD_TYPE)
# Line 69  if (POLICY CMP0075) Line 74  if (POLICY CMP0075)
74    cmake_policy (SET CMP0075 NEW)    cmake_policy (SET CMP0075 NEW)
75  endif ()  endif ()
76    
77  # Check for Qt  # Check for Qt...
78  find_package (Qt5 REQUIRED COMPONENTS Core Gui Widgets)  find_package (Qt6 QUIET)
79    if (Qt6_FOUND)
80      find_package (QT QUIET NAMES Qt6)
81    else ()
82      find_package (QT QUIET NAMES Qt5)
83    endif ()
84    
85    find_package (Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Core Gui Widgets)
86    
87  if (CONFIG_XUNIQUE)  if (CONFIG_XUNIQUE)
88    find_package (Qt5 REQUIRED COMPONENTS Network)    find_package (Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Network)
89  endif ()  endif ()
90    
91  find_package (Qt5LinguistTools)  find_package (Qt${QT_VERSION_MAJOR}LinguistTools)
92    
93  include (CheckIncludeFile)  include (CheckIncludeFile)
94  include (CheckIncludeFiles)  include (CheckIncludeFiles)
# Line 108  endif () Line 120  endif ()
120  find_package (PkgConfig REQUIRED)  find_package (PkgConfig REQUIRED)
121    
122  # Check for LSCP libraries.  # Check for LSCP libraries.
123  pkg_check_modules (LSCP REQUIRED lscp)  pkg_check_modules (LSCP REQUIRED IMPORTED_TARGET lscp)
124  if (LSCP_FOUND)  if (LSCP_FOUND)
125    set (CONFIG_LIBLSCP 1)    set (CONFIG_LIBLSCP 1)
126    include_directories (${LSCP_INCLUDE_DIRS})    include_directories (${LSCP_INCLUDE_DIRS})
# Line 182  endif () Line 194  endif ()
194    
195  # Check for GIG libraries.  # Check for GIG libraries.
196  if (CONFIG_LIBGIG)  if (CONFIG_LIBGIG)
197    pkg_check_modules (GIG gig>=3.3.0)    pkg_check_modules (GIG IMPORTED_TARGET gig>=3.3.0)
198    if (GIG_FOUND)    if (GIG_FOUND)
199      include_directories (${GIG_INCLUDE_DIRS})      include_directories (${GIG_INCLUDE_DIRS})
200      link_directories (${GIG_LIBRARY_DIRS})      link_directories (${GIG_LIBRARY_DIRS})
# Line 221  macro (SHOW_OPTION text value) Line 233  macro (SHOW_OPTION text value)
233  endmacro ()  endmacro ()
234    
235    
236  message   ("\n  ${PACKAGE_NAME} ${PACKAGE_VERSION}")  message   ("\n  ${PACKAGE_NAME} ${PACKAGE_VERSION} (Qt ${QT_VERSION})")
237  message   ("\n  Build target . . . . . . . . . . . . . . . . . . .: ${CONFIG_BUILD_TYPE}\n")  message   ("\n  Build target . . . . . . . . . . . . . . . . . . .: ${CONFIG_BUILD_TYPE}\n")
238  show_option ("  LSCP instrument name support . . . . . . . . . . ." CONFIG_INSTRUMENT_NAME)  show_option ("  LSCP instrument name support . . . . . . . . . . ." CONFIG_INSTRUMENT_NAME)
239  show_option ("  LSCP mute/solo support . . . . . . . . . . . . . ." CONFIG_MUTE_SOLO)  show_option ("  LSCP mute/solo support . . . . . . . . . . . . . ." CONFIG_MUTE_SOLO)

Legend:
Removed from v.3641  
changed lines
  Added in v.3868

  ViewVC Help
Powered by ViewVC