diff options
author | Aaron Carlisle <carlisle.b3d@gmail.com> | 2019-09-05 21:22:52 +0300 |
---|---|---|
committer | Aaron Carlisle <carlisle.b3d@gmail.com> | 2019-09-05 21:28:20 +0300 |
commit | 3a15643b906f186c87b4777b0ed95f04712dcb82 (patch) | |
tree | 4003f85649d57af71a642654417f1b2479e2a0a4 /CMakeLists.txt | |
parent | 08991c01f01c00b1a1710bac65b23ab8158f5bae (diff) |
Cleanup: Cmake submodule checks
It is a pain if the subfile we are checking if it exists gets
renamed/removed.
Instead we can check if the directory is empty.
Reviewers: mont29
Reviewed By: mont29
Differential Revision: https://developer.blender.org/D5653
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 2939d33c4a8..747acf27c64 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -752,14 +752,12 @@ if(NOT WITH_CUDA_DYNLOAD) endif() #----------------------------------------------------------------------------- -# Check for valid directories -# ... a partial checkout may cause this. -# -# note: we need to check for a known subdir in both cases. -# since uninitialized git submodules will give blank dirs +# Check check if submodules are cloned if(WITH_INTERNATIONAL) - if(NOT EXISTS "${CMAKE_SOURCE_DIR}/release/datafiles/locale/languages") + file(GLOB RESULT "${CMAKE_SOURCE_DIR}/release/datafiles/locale") + list(LENGTH RESULT DIR_LEN) + if(DIR_LEN EQUAL 0) message(WARNING "Translation path '${CMAKE_SOURCE_DIR}/release/datafiles/locale' is missing, " "This is a 'git submodule', which are known not to work with bridges to other version " @@ -781,7 +779,9 @@ if(WITH_PYTHON) message(FATAL_ERROR "At least Python 3.7 is required to build") endif() - if(NOT EXISTS "${CMAKE_SOURCE_DIR}/release/scripts/addons/modules") + file(GLOB RESULT "${CMAKE_SOURCE_DIR}/release/scripts/addons") + list(LENGTH RESULT DIR_LEN) + if(DIR_LEN EQUAL 0) message(WARNING "Addons path '${CMAKE_SOURCE_DIR}/release/scripts/addons' is missing, " "This is a 'git submodule', which are known not to work with bridges to other version " |