mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-10-22 22:15:21 -04:00
OBS CMake build framework 3.0 is a minor overhaul of version 2.0. Due to close proximity of the 2.0 rework, the amount of actual changes to project files are minimal and mostly concern application generation. This commit contains the bootstrap elements only and requires OS-specific implementations to be functional.
21 lines
672 B
CMake
21 lines
672 B
CMake
# OBS CMake ccache module
|
|
|
|
if(NOT DEFINED CCACHE_PROGRAM)
|
|
message(DEBUG "Trying to find ccache on build host...")
|
|
find_program(CCACHE_PROGRAM "ccache")
|
|
mark_as_advanced(CCACHE_PROGRAM)
|
|
endif()
|
|
|
|
if(CCACHE_PROGRAM)
|
|
message(DEBUG "CCache found as ${CCACHE_PROGRAM}...")
|
|
option(ENABLE_CCACHE "Enable compiler acceleration with ccache" ON)
|
|
|
|
if(ENABLE_CCACHE)
|
|
set(CMAKE_CXX_COMPILER_LAUNCHER "${CCACHE_PROGRAM}")
|
|
set(CMAKE_C_COMPILER_LAUNCHER "${CCACHE_PROGRAM}")
|
|
set(CMAKE_OBJC_COMPILER_LAUNCHER "${CCACHE_PROGRAM}")
|
|
set(CMAKE_OBJCXX_COMPILER_LAUNCHER "${CCACHE_PROGRAM}")
|
|
set(CMAKE_CUDA_COMPILER_LAUNCHER "${CCACHE_PROGRAM}")
|
|
endif()
|
|
endif()
|