File: CMakeLists.txt

package info (click to toggle)
taptempo 1.4.5-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, sid, trixie
  • size: 220 kB
  • sloc: cpp: 643; exp: 59; sh: 41; makefile: 3
file content (57 lines) | stat: -rw-r--r-- 1,761 bytes parent folder | download
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
#    TapTempo, a command line tap tempo.
#    Copyright (C) 2017 Francois Mazen
#
#    This program is free software: you can redistribute it and/or modify
#    it under the terms of the GNU General Public License as published by
#    the Free Software Foundation, either version 3 of the License, or
#    (at your option) any later version.
#
#    This program is distributed in the hope that it will be useful,
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#    GNU General Public License for more details.
#
#    You should have received a copy of the GNU General Public License
#    along with this program.  If not, see <https://www.gnu.org/licenses/>.


cmake_minimum_required (VERSION 3.1)

set (CMAKE_CXX_STANDARD 11)

set(TAPTEMPO_VERSION_MAJOR 1)
set(TAPTEMPO_VERSION_MINOR 4)
set(TAPTEMPO_VERSION_REVISION 5)
set(TAPTEMPO_PACKAGE_NAME taptempo)

project (${TAPTEMPO_PACKAGE_NAME})

if(MSYS)
	set(TAPTEMPO_LOCALE_DIR "share/locale")
	set(TAPTEMPO_INSTALL_DIR ${CMAKE_INSTALL_PREFIX})
else()
	set(TAPTEMPO_LOCALE_DIR "${CMAKE_INSTALL_PREFIX}/share/locale")
	set(TAPTEMPO_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/bin)
endif()

configure_file (
        "${PROJECT_SOURCE_DIR}/src/taptempo_config.h.in"
        "${PROJECT_BINARY_DIR}/taptempo_config.h"
        )
include_directories("${PROJECT_BINARY_DIR}")

add_subdirectory(src)
add_subdirectory(po)

# Create test target.

if(${CMAKE_VERSION} VERSION_LESS "3.11.0" AND ${CMAKE_VERSION} VERSION_GREATER "3.0.0")
    # Disable error report when creating "test" target.
    # This happens with CMake version between 3.0 and 3.11
    cmake_policy(SET CMP0037 OLD)
endif()

add_custom_target(test)
add_subdirectory(test)