Index: CMakeLists.txt =================================================================== --- CMakeLists.txt +++ CMakeLists.txt @@ -26,11 +26,13 @@ set(CMAKE_AUTOMOC ON) # Ccache support -FIND_PROGRAM(CCACHE_FOUND ccache) -SET(CCACHE_SUPPORT OFF CACHE BOOL "Enable ccache support") -IF ((CCACHE_FOUND OR ANDROID) AND CCACHE_SUPPORT MATCHES ON) - SET_PROPERTY(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache) - SET_PROPERTY(GLOBAL PROPERTY RULE_LAUNCH_LINK ccache) +IF (ANDROID OR UNIX OR APPLE) + FIND_PROGRAM(CCACHE_FOUND ccache) + SET(CCACHE_SUPPORT OFF CACHE BOOL "Enable ccache support") + IF ((CCACHE_FOUND OR ANDROID) AND CCACHE_SUPPORT MATCHES ON) + SET_PROPERTY(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache) + SET_PROPERTY(GLOBAL PROPERTY RULE_LAUNCH_LINK ccache) + ENDIF () ENDIF () if(CMAKE_SYSTEM_NAME STREQUAL Android) @@ -256,6 +258,14 @@ # let our config.h be found first in any case include_directories (BEFORE ${CMAKE_CURRENT_BINARY_DIR}) +# Ccache support +find_program(CCACHE_FOUND ccache) +set(CCACHE ON CACHE BOOL "Enable ccache") +if (CCACHE_FOUND AND CCACHE MATCHES ON) + set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache) + set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ccache) +endif () + add_subdirectory(doc) add_subdirectory(kstars) add_subdirectory(datahandlers) Index: README.android =================================================================== --- README.android +++ README.android @@ -7,7 +7,7 @@ (https://bugreports.qt.io/browse/QTBUG-54666) what can be fixed by only patching one cmake config file. The build files will comment the problematic line. - Get KStars source code from from Github or KDE -- sudo apt-get install dos2unix +- Some tools are needed for the compilation: sudo apt-get install dos2unix ccache Set the following environmental variables before building: