diff --git a/cmake/AddAutoformatTarget.cmake b/cmake/AddAutoformatTarget.cmake index 07e739f..7137116 100644 --- a/cmake/AddAutoformatTarget.cmake +++ b/cmake/AddAutoformatTarget.cmake @@ -1,9 +1,10 @@ -find_program(_CLANG_FORMAT clang-format) +find_program(clang-format_EXECUTABLE clang-format) +mark_as_advanced(clang-format_EXECUTABLE) -if(_CLANG_FORMAT) +if(clang-format_EXECUTABLE) add_executable(clang-format IMPORTED) set_target_properties(clang-format PROPERTIES - IMPORTED_LOCATION ${_CLANG_FORMAT}) + IMPORTED_LOCATION ${clang-format_EXECUTABLE}) endif() unset(_CLANG_FORMAT) diff --git a/cmake/Makeheaders.cmake b/cmake/Makeheaders.cmake index c2c6fe4..b6129c7 100644 --- a/cmake/Makeheaders.cmake +++ b/cmake/Makeheaders.cmake @@ -1,9 +1,10 @@ -find_program(_MAKEHEADERS makeheaders) +find_program(makeheaders_EXECUTABLE makeheaders) +mark_as_advanced(makeheaders_EXECUTABLE) -if(_MAKEHEADERS) +if(makeheaders_EXECUTABLE) add_executable(makeheaders IMPORTED) set_target_properties(makeheaders PROPERTIES - IMPORTED_LOCATION ${_MAKEHEADERS}) + IMPORTED_LOCATION ${makeheaders_EXECUTABLE}) else() add_executable(makeheaders ${CMAKE_CURRENT_LIST_DIR}/makeheaders.c) endif()