[Build] Added cmake install.
This commit is contained in:
parent
eed31a2446
commit
84fb93f336
|
@ -1,7 +1,7 @@
|
||||||
cmake_minimum_required(VERSION 3.1.0)
|
cmake_minimum_required(VERSION 3.5.1)
|
||||||
|
|
||||||
project(KittehPlayer)
|
project(KittehPlayer)
|
||||||
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
include_directories(${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR})
|
||||||
set(CMAKE_AUTOMOC ON)
|
set(CMAKE_AUTOMOC ON)
|
||||||
|
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Werror -fstrict-aliasing -Wno-deprecated-declarations -Wno-unused-variable")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Werror -fstrict-aliasing -Wno-deprecated-declarations -Wno-unused-variable")
|
||||||
|
@ -15,6 +15,9 @@ find_package(Qt5 REQUIRED Qml Quick Gui Widgets Core)
|
||||||
find_package(Qt5QuickCompiler)
|
find_package(Qt5QuickCompiler)
|
||||||
qtquick_compiler_add_resources(qml_QRC src/qml/qml.qrc)
|
qtquick_compiler_add_resources(qml_QRC src/qml/qml.qrc)
|
||||||
|
|
||||||
|
find_package(PkgConfig)
|
||||||
|
pkg_check_modules(MPV REQUIRED mpv)
|
||||||
|
|
||||||
set(SOURCES
|
set(SOURCES
|
||||||
src/main.cpp
|
src/main.cpp
|
||||||
src/mpvobject.cpp
|
src/mpvobject.cpp
|
||||||
|
@ -28,10 +31,12 @@ endif(DEVELOP)
|
||||||
add_executable(KittehPlayer ${SOURCES} ${qml_QRC})
|
add_executable(KittehPlayer ${SOURCES} ${qml_QRC})
|
||||||
|
|
||||||
# Use the Qml/Quick modules from Qt 5.
|
# Use the Qml/Quick modules from Qt 5.
|
||||||
target_link_libraries(KittehPlayer mpv)
|
target_link_libraries(KittehPlayer ${MPV_LIBRARIES})
|
||||||
|
|
||||||
qt5_use_modules(KittehPlayer Qml Quick Core Gui Widgets)
|
qt5_use_modules(KittehPlayer Qml Quick Core Gui Widgets)
|
||||||
|
|
||||||
|
install (TARGETS ${PROJECT_NAME} DESTINATION bin)
|
||||||
|
install (FILES "${PROJECT_NAME}.desktop" DESTINATION share/applications)
|
||||||
|
install (FILES "${PROJECT_NAME}.png" DESTINATION share/icons/hicolor/256x256/apps)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue