diff options
| author | Xavier Del Campo Romero <xavi.dcr@tutanota.com> | 2022-06-30 22:30:36 +0200 |
|---|---|---|
| committer | Xavier Del Campo Romero <xavi.dcr@tutanota.com> | 2022-06-30 22:49:35 +0200 |
| commit | d55fb31e217adc1c1f6b5adca84b8ef6bd03ff00 (patch) | |
| tree | 4552cd8705b723df6186370b08d128e0b8f049aa | |
| parent | c4a24800b8566b6e1a0f9888a184ee9e3d5864ac (diff) | |
| download | rts-d55fb31e217adc1c1f6b5adca84b8ef6bd03ff00.tar.gz | |
host.cmake, win9x.cmake: fetch libfixmath if missing
| -rw-r--r-- | cmake/fetch-libfixmath.cmake | 8 | ||||
| -rw-r--r-- | cmake/host.cmake | 1 | ||||
| -rw-r--r-- | cmake/win9x.cmake | 1 |
3 files changed, 10 insertions, 0 deletions
diff --git a/cmake/fetch-libfixmath.cmake b/cmake/fetch-libfixmath.cmake new file mode 100644 index 0000000..6137dd5 --- /dev/null +++ b/cmake/fetch-libfixmath.cmake @@ -0,0 +1,8 @@ +find_path(libfixmath "CMakeLists.txt" + PATHS "${PROJECT_SOURCE_DIR}/libfixmath/" + NO_DEFAULT_PATH) + +if(${libfixmath} STREQUAL "libfixmath-NOTFOUND") + message(STATUS "Fetching submodules...") + execute_process(COMMAND git submodule update --init --recursive) +endif() diff --git a/cmake/host.cmake b/cmake/host.cmake index b1b000a..1d80613 100644 --- a/cmake/host.cmake +++ b/cmake/host.cmake @@ -9,4 +9,5 @@ else() set(cflags ${cflags} -O3) endif() +include("${CMAKE_CURRENT_LIST_DIR}/fetch-libfixmath.cmake") add_subdirectory(libfixmath) diff --git a/cmake/win9x.cmake b/cmake/win9x.cmake index 331058a..bafca86 100644 --- a/cmake/win9x.cmake +++ b/cmake/win9x.cmake @@ -34,4 +34,5 @@ else() set(cflags ${cflags} -O2) endif() +include("${CMAKE_CURRENT_LIST_DIR}/fetch-libfixmath.cmake") add_subdirectory(libfixmath) |
