mirror of
https://github.com/Vita3K/Vita3K-Android.git
synced 2025-02-18 20:37:37 +00:00
Check the presence of the submodules (#19)
Taken from here: https://github.com/yuzu-emu/yuzu/blob/master/CMakeLists.txt
This commit is contained in:
parent
e1f7967d00
commit
40a247b962
6
CMakeLists.txt
Normal file
6
CMakeLists.txt
Normal file
@ -0,0 +1,6 @@
|
||||
cmake_minimum_required(VERSION 3.8)
|
||||
project(Vita3K)
|
||||
|
||||
add_subdirectory(src/external)
|
||||
add_subdirectory(src/emulator)
|
||||
add_subdirectory(src/gen-modules)
|
2
gen.bat
2
gen.bat
@ -1,4 +1,4 @@
|
||||
mkdir build-windows
|
||||
pushd build-windows
|
||||
cmake -G "Visual Studio 15 2017 Win64" ../src
|
||||
cmake -G "Visual Studio 15 2017 Win64" ..
|
||||
popd
|
||||
|
2
gen.sh
2
gen.sh
@ -3,4 +3,4 @@ set -ex
|
||||
|
||||
mkdir -p build-macos
|
||||
cd build-macos
|
||||
cmake -G Xcode ../src
|
||||
cmake -G Xcode ..
|
||||
|
@ -1,6 +0,0 @@
|
||||
cmake_minimum_required(VERSION 3.8)
|
||||
project(Vita3K)
|
||||
|
||||
add_subdirectory(external)
|
||||
add_subdirectory(emulator)
|
||||
add_subdirectory(gen-modules)
|
13
src/external/CMakeLists.txt
vendored
13
src/external/CMakeLists.txt
vendored
@ -1,3 +1,16 @@
|
||||
function(check_submodules_present)
|
||||
file(READ "${CMAKE_SOURCE_DIR}/.gitmodules" gitmodules)
|
||||
string(REGEX MATCHALL "path *= *[^ \t\r\n]*" gitmodules ${gitmodules})
|
||||
foreach(module ${gitmodules})
|
||||
string(REGEX REPLACE "path *= *" "" module ${module})
|
||||
if (NOT EXISTS "${CMAKE_SOURCE_DIR}/${module}/.git")
|
||||
message(FATAL_ERROR "Git submodule ${module} not found. "
|
||||
"Please run: git submodule update --init --recursive")
|
||||
endif()
|
||||
endforeach()
|
||||
endfunction()
|
||||
check_submodules_present()
|
||||
|
||||
option(CAPSTONE_BUILD_SHARED "Build shared library" OFF)
|
||||
option(CAPSTONE_BUILD_TESTS "Build tests" OFF)
|
||||
option(CAPSTONE_ARM_SUPPORT "ARM support" ON)
|
||||
|
Loading…
x
Reference in New Issue
Block a user