1SET (private_mod_path "${CMAKE_SOURCE_DIR}/cmake") 2LIST (APPEND CMAKE_MODULE_PATH "${private_mod_path}") 3SET (_result) 4INCLUDE(Shlomif_Common OPTIONAL RESULT_VARIABLE _result) 5 6IF ("${_result}" STREQUAL "NOTFOUND") 7 MESSAGE (WARNING "Could not find Shlomif_Common.cmake - you can find it here: https://github.com/shlomif/shlomif-cmake-modules ; trying to download it for you.") 8 FILE (DOWNLOAD "https://raw.githubusercontent.com/shlomif/shlomif-cmake-modules/master/shlomif-cmake-modules/Shlomif_Common.cmake" "${private_mod_path}/Shlomif_Common.cmake") 9 INCLUDE(Shlomif_Common) 10ENDIF () 11