-
Notifications
You must be signed in to change notification settings - Fork 93
/
CMakeLists.txt
48 lines (32 loc) · 1.22 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
# CMake file reference: https://github.com/euler0/mini-cmake-qt
cmake_minimum_required(VERSION 3.0)
# Basic information about project
if (APPLE)
project(MoonPlayer VERSION 4.3)
else()
project(moonplayer VERSION 4.3)
endif()
add_definitions(-DMOONPLAYER_VERSION="${PROJECT_VERSION}")
# Set additional project information
set(COMPANY "coslyk")
set(COPYRIGHT "Copyright (c) 2019 coslyk. All rights reserved.")
set(IDENTIFIER "io.github.coslyk")
# Set C/C++ standard
set(CMAKE_C_STANDARD 99)
set(CMAKE_CXX_STANDARD 14)
# Add folder where are supportive functions
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
# Force CMake to generate xxx_autogen targets when Visual Studio is used
set(CMAKE_GLOBAL_AUTOGEN_TARGET ON)
# Include Qt basic functions
include(QtCommon)
# Disables automatic conversions from 8-bit strings to unicode QStrings
add_definitions(-DQT_NO_CAST_FROM_ASCII)
# Set PROJECT_VERSION_PATCH and PROJECT_VERSION_TWEAK to 0 if not present, needed by add_project_meta
fix_project_version()
find_package(Qt6 REQUIRED COMPONENTS Gui Qml Quick OpenGL Network LinguistTools)
find_package(Qt6Gui REQUIRED)
find_package(MPV REQUIRED)
add_subdirectory(3rdparty)
add_subdirectory(src)