1
0
Fork 0

[Build] Improve CMakeLists.

This commit is contained in:
Kitteh 2018-11-06 11:25:32 +00:00
parent 9ee2b941c1
commit 9c7b16cae7

View file

@ -18,11 +18,21 @@ qtquick_compiler_add_resources(qml_QRC src/qml/qml.qrc)
find_package(PkgConfig) find_package(PkgConfig)
pkg_check_modules(MPV REQUIRED mpv) pkg_check_modules(MPV REQUIRED mpv)
set(SOURCES set(SOURCES
src/main.cpp src/main.cpp
src/MpvPlayerBackend.cpp src/MpvPlayerBackend.cpp
) )
find_program(CCACHE_FOUND ccache)
if(CCACHE_FOUND)
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache)
set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ccache)
endif(CCACHE_FOUND)
set(CMAKE_BUILD_TYPE MINSIZEREL)
if(TESTING) if(TESTING)
SET(CMAKE_C_COMPILER "/usr/bin/clang") SET(CMAKE_C_COMPILER "/usr/bin/clang")
SET(CMAKE_CXX_COMPILER "/usr/bin/clang++") SET(CMAKE_CXX_COMPILER "/usr/bin/clang++")
@ -31,7 +41,6 @@ SET(CMAKE_LINKER "/usr/bin/llvm-link")
SET(CMAKE_NM "/usr/bin/llvm-nm") SET(CMAKE_NM "/usr/bin/llvm-nm")
SET(CMAKE_OBJDUMP "/usr/bin/llvm-objdump") SET(CMAKE_OBJDUMP "/usr/bin/llvm-objdump")
SET(CMAKE_RANLIB "/usr/bin/llvm-ranlib") SET(CMAKE_RANLIB "/usr/bin/llvm-ranlib")
endif(TESTING) endif(TESTING)