From fbfd8ed8adc604c33b154098f45132501f17a57a Mon Sep 17 00:00:00 2001 From: Shlomi Fish Date: Wed, 31 Jan 2018 14:38:11 +0200 Subject: [PATCH] Convert to shlomif_common_bootstrap. This will help people who use the GitHub source. --- fortune-mod/CMakeLists.txt | 5 +---- fortune-mod/cmake/shlomif_common_bootstrap.cmake | 10 ++++++++++ 2 files changed, 11 insertions(+), 4 deletions(-) create mode 100644 fortune-mod/cmake/shlomif_common_bootstrap.cmake diff --git a/fortune-mod/CMakeLists.txt b/fortune-mod/CMakeLists.txt index e76b1f4..2ef6bae 100644 --- a/fortune-mod/CMakeLists.txt +++ b/fortune-mod/CMakeLists.txt @@ -1,9 +1,6 @@ cmake_minimum_required(VERSION 3.2) -SET (private_mod_path "${CMAKE_SOURCE_DIR}/cmake") -LIST (APPEND CMAKE_MODULE_PATH "${private_mod_path}") -INCLUDE(Shlomif_Common) - +INCLUDE ("${CMAKE_SOURCE_DIR}/cmake/shlomif_common_bootstrap.cmake") SHLOMIF_COMMON_SETUP("${private_mod_path}") CMAKE_POLICY(SET CMP0054 NEW) diff --git a/fortune-mod/cmake/shlomif_common_bootstrap.cmake b/fortune-mod/cmake/shlomif_common_bootstrap.cmake new file mode 100644 index 0000000..8ee7112 --- /dev/null +++ b/fortune-mod/cmake/shlomif_common_bootstrap.cmake @@ -0,0 +1,10 @@ +SET (private_mod_path "${CMAKE_SOURCE_DIR}/cmake") +LIST (APPEND CMAKE_MODULE_PATH "${private_mod_path}") +SET (_result) +INCLUDE(Shlomif_Common OPTIONAL RESULT_VARIABLE _result) + +IF ("${_result}" STREQUAL "NOTFOUND") + MESSAGE (WARNING "Could not find Shlomif_Common.cmake - you can find it here: https://bitbucket.org/shlomif/shlomif-cmake-modules/overview ; trying to download it for you.") + FILE (DOWNLOAD "https://bitbucket.org/shlomif/shlomif-cmake-modules/raw/default/shlomif-cmake-modules/Shlomif_Common.cmake" "${private_mod_path}/Shlomif_Common.cmake") + INCLUDE(Shlomif_Common) +ENDIF () -- 2.40.0