mirror of
https://github.com/aseprite/aseprite.git
synced 2025-03-23 13:20:50 +00:00
Merge branch 'main' into beta
This commit is contained in:
commit
5bd83d0c1a
5
.github/workflows/build.yml
vendored
5
.github/workflows/build.yml
vendored
@ -17,6 +17,11 @@ jobs:
|
|||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
submodules: 'recursive'
|
submodules: 'recursive'
|
||||||
|
- name: ccache
|
||||||
|
uses: hendrikmuhs/ccache-action@v1
|
||||||
|
if: runner.os == 'Linux'
|
||||||
|
with:
|
||||||
|
key: ${{ matrix.os }}-${{ matrix.enable_ui }}
|
||||||
- uses: seanmiddleditch/gha-setup-ninja@master
|
- uses: seanmiddleditch/gha-setup-ninja@master
|
||||||
- uses: ilammy/msvc-dev-cmd@v1
|
- uses: ilammy/msvc-dev-cmd@v1
|
||||||
if: runner.os == 'Windows'
|
if: runner.os == 'Windows'
|
||||||
|
@ -78,6 +78,7 @@ option(ENABLE_DEVMODE "Compile vesion for developers" off)
|
|||||||
option(ENABLE_UI "Compile UI (turn off to compile CLI-only version)" on)
|
option(ENABLE_UI "Compile UI (turn off to compile CLI-only version)" on)
|
||||||
option(FULLSCREEN_PLATFORM "Enable fullscreen by default" off)
|
option(FULLSCREEN_PLATFORM "Enable fullscreen by default" off)
|
||||||
option(ENABLE_CLANG_TIDY "Enable static analysis" off)
|
option(ENABLE_CLANG_TIDY "Enable static analysis" off)
|
||||||
|
option(ENABLE_CCACHE "Use CCache to improve recompilation speed (optional)" on)
|
||||||
set(CUSTOM_WEBSITE_URL "" CACHE STRING "Enable custom local webserver to check updates")
|
set(CUSTOM_WEBSITE_URL "" CACHE STRING "Enable custom local webserver to check updates")
|
||||||
|
|
||||||
if(ENABLE_NEWS OR ENABLE_UPDATER)
|
if(ENABLE_NEWS OR ENABLE_UPDATER)
|
||||||
@ -169,6 +170,14 @@ set(ZLIB_DIR ${CMAKE_CURRENT_SOURCE_DIR}/third_party/zlib)
|
|||||||
# Search in the "cmake" directory for additional CMake modules.
|
# Search in the "cmake" directory for additional CMake modules.
|
||||||
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
|
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
|
||||||
|
|
||||||
|
if(ENABLE_CCACHE)
|
||||||
|
find_package(CCache)
|
||||||
|
if(CCache_FOUND)
|
||||||
|
# Use e.g. "ccache clang++" instead of "clang++"
|
||||||
|
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE "${CCache_EXECUTABLE}")
|
||||||
|
set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK "${CCache_EXECUTABLE}")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
# Put libraries into "lib".
|
# Put libraries into "lib".
|
||||||
set(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}/lib)
|
set(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}/lib)
|
||||||
|
|
||||||
|
23
cmake/FindCCache.cmake
Normal file
23
cmake/FindCCache.cmake
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
# To find CCache compiler cache
|
||||||
|
|
||||||
|
include(FindPackageHandleStandardArgs)
|
||||||
|
|
||||||
|
find_program(CCache_EXECUTABLE ccache)
|
||||||
|
|
||||||
|
if (CCache_EXECUTABLE)
|
||||||
|
execute_process(COMMAND "${CCache_EXECUTABLE}" --version
|
||||||
|
OUTPUT_VARIABLE CCache_VERSION_OUTPUT
|
||||||
|
)
|
||||||
|
|
||||||
|
if (CCache_VERSION_OUTPUT MATCHES "version ([0-9]+\\.[0-9]+\\.[0-9]+)")
|
||||||
|
set(CCache_VERSION "${CMAKE_MATCH_1}")
|
||||||
|
endif ()
|
||||||
|
endif (CCache_EXECUTABLE)
|
||||||
|
|
||||||
|
find_package_handle_standard_args(CCache
|
||||||
|
FOUND_VAR CCache_FOUND
|
||||||
|
REQUIRED_VARS CCache_EXECUTABLE
|
||||||
|
VERSION_VAR CCache_VERSION
|
||||||
|
)
|
||||||
|
|
||||||
|
mark_as_advanced(CCache_EXECUTABLE)
|
Loading…
x
Reference in New Issue
Block a user