Skip to content

Commit

Permalink
try to make builds based on git clone work.
Browse files Browse the repository at this point in the history
Without the --recursive flag
  • Loading branch information
shlomif committed Oct 25, 2020
1 parent b965936 commit be1e8e9
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions fortune-mod/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -105,18 +105,26 @@ SHLOMIF_FINALIZE_FLAGS()

# Clone the rinutils repository with the appropriate tag.
SET (rinutils_dir "rinutils")
IF (NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${rinutils_dir}")
SET (rinutils_dir_absolute "${CMAKE_CURRENT_SOURCE_DIR}/${rinutils_dir}")
SET (rinutils_inc_dir "${rinutils_dir_absolute}/rinutils/include")
IF (NOT EXISTS "${rinutils_inc_dir}")
EXECUTE_PROCESS(
COMMAND "git" "clone" "-b" "0.6.0" "https://github.com/shlomif/rinutils.git" "${rinutils_dir}"
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
)
ELSE ()
IF (NOT EXISTS "${rinutils_inc_dir}")
EXECUTE_PROCESS(
COMMAND "git" "submodule" "update" "--init"
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
)
ENDIF ()
ENDIF ()

find_package(Rinutils QUIET)
IF ("${Rinutils_FOUND}")
INCLUDE_DIRECTORIES(AFTER ${RINUTILS_INCLUDE_DIR} ${RINUTILS_INCLUDE_DIRS})
ELSE ()
SET(rinutils_inc_dir "${CMAKE_CURRENT_SOURCE_DIR}/${rinutils_dir}/rinutils/include")
IF (NOT EXISTS "${rinutils_inc_dir}")
MESSAGE(FATAL_ERROR "Could not find rinutils anywhere - it should have been bundled in the releases' source tarball.\nAlso see: https://github.com/shlomif/fortune-mod/issues/44")
ENDIF ()
Expand Down

0 comments on commit be1e8e9

Please sign in to comment.