diff --git a/CMakeLists.txt b/CMakeLists.txt index f2bbd4e2..4b42247f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -40,10 +40,9 @@ set(CPACK_PACKAGE_VERSION "${PACKAGE_VERSION}") ####################################################################### if(USE_CCACHE) - find_program(CCACHE_FOUND ccache) + find_program(CCACHE_FOUND NAMES ccache ccache.bat) if(CCACHE_FOUND) - set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache) - set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ccache) + set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ${CCACHE_FOUND}) endif(CCACHE_FOUND) endif(USE_CCACHE) diff --git a/ng/CMakeLists.txt b/ng/CMakeLists.txt index 33f0991d..0f36f434 100644 --- a/ng/CMakeLists.txt +++ b/ng/CMakeLists.txt @@ -5,6 +5,8 @@ if(USE_GUI) # add icon to netgen executable enable_language(RC) set(netgen_sources ${netgen_sources} ../windows/netgen.rc) + # Don't use ccache here due to incompatiblity with the resource compiler + set_directory_properties(PROPERTIES RULE_LAUNCH_COMPILE "") endif(WIN32) add_executable(netgen ${netgen_sources})