forked from Ri0n/QtNote
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
55 lines (46 loc) · 1.92 KB
/
CMakeLists.txt
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
# -------------------------------------------------
# QtNote - Simple note-taking application
# Copyright (C) 2020 Sergei Ilinykh
# 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 <http://www.gnu.org/licenses/>.
# Contacts:
# E-Mail: [email protected] XMPP: [email protected]
# -------------------------------------------------
cmake_minimum_required(VERSION 3.10.0)
set(CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH}" "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules")
include(QtNoteMacro)
message(STATUS "Version: QtNote-${QTNOTE_VERSION}")
project(qtnote VERSION ${QTNOTE_VERSION})
option(QTNOTE_DEVEL "Enable development mode (adjusts some paths and output)" OFF)
find_package(Qt5 COMPONENTS Widgets Core Gui PrintSupport REQUIRED)
if (Qt5Widgets_VERSION VERSION_LESS 5.10.0)
message(FATAL_ERROR "Minimum supported Qt5 version is 5.10!")
endif()
set(CMAKE_CXX_STANDARD 17)
if(UNIX AND NOT (APPLE OR HAIKU))
set(UNIXLIKE ON)
endif()
include(GNUInstallDirs)
set(APP_NAME qtnote)
set(TRANSLATIONSDIR ${CMAKE_INSTALL_FULL_DATADIR}/${APP_NAME})
set(PLUGINSDIR ${CMAKE_INSTALL_FULL_LIBDIR}/${APP_NAME})
configure_file(qtnote_config.h.in qtnote_config.h)
if(QTNOTE_DEVEL)
add_definitions(-DQTNOTE_DEVEL)
endif()
if(WIN32)
set(EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR}/qtnote)
endif()
add_subdirectory(3rdparty)
add_subdirectory(libqtnote)
add_subdirectory(src)
add_subdirectory(plugins)
add_subdirectory(langs)