diff --git a/buildutil/cmake_common.txt b/buildutil/cmake_common.txt index f089fa6..5343906 100644 --- a/buildutil/cmake_common.txt +++ b/buildutil/cmake_common.txt @@ -79,8 +79,6 @@ function(set_common_build_variables) CACHE PATH "Directory containing the fplutil library.") set(dependencies_libfplutil_dir "${fpl_root}/fplutil/libfplutil" CACHE PATH "Directory containing the libfplutil library.") - set(dependencies_gtest_dir "${fpl_root}/googletest" - CACHE PATH "Directory containing the GoogleTest library.") set(dependencies_mathfu_dir "${fpl_root}/mathfu" CACHE PATH "Directory containing the MathFu library.") set(dependencies_motive_dir "${fpl_root}/motive" @@ -90,6 +88,16 @@ function(set_common_build_variables) set(dependencies_scene_lab_dir "${fpl_root}/scene_lab" CACHE PATH "Directory containing the Scene Lab library.") + # Depending on googletest version, the gtest directory may be nested under + # googletest/googletest + if(EXISTS "${fpl_root}/googletest/googletest") + set(dependencies_gtest_dir "${fpl_root}/googletest/googletest" + CACHE PATH "Directory containing the GoogleTest library.") + else() + set(dependencies_gtest_dir "${fpl_root}/googletest" + CACHE PATH "Directory containing the GoogleTest library.") + endif() + # third party module directory variables set(dependencies_vectorial_dir "${third_party_root}/vectorial" CACHE PATH "Directory containing the Vectorial library.") diff --git a/disttools/push_package.py b/disttools/push_package.py index 05f9e80..4373d08 100755 --- a/disttools/push_package.py +++ b/disttools/push_package.py @@ -687,9 +687,12 @@ def update_docs(self, branch, docs_branch, dryrun): # Clean the working copy and reset to the docs branch. dependencies_dir = os.path.join(self.working_copy, 'dependencies') if os.path.exists(dependencies_dir): + # This is only required if the docs are being built from the github + # master branch which includes a set of submodules. + if os.path.exists(os.path.join(self.working_copy, '.gitmodules')): + self.subprocess_runner.check_call( + ['git', 'submodule', 'deinit', '.'], cwd=self.working_copy) shutil.rmtree(dependencies_dir) - self.subprocess_runner.check_call(['git', 'submodule', 'deinit', '.'], - cwd=self.working_copy) if Package.git_remote_branch_exists(self.git_remote_upstream, docs_branch, self.working_copy, self.subprocess_runner): diff --git a/libfplutil/CMakeLists.txt b/libfplutil/CMakeLists.txt index 58a6145..4897bba 100644 --- a/libfplutil/CMakeLists.txt +++ b/libfplutil/CMakeLists.txt @@ -30,7 +30,7 @@ if(NOT DEFINED fpl_root) endif () endif() -include (${fpl_root}/fplutil/buildutil/cmake_common.txt) +include (${CMAKE_CURRENT_SOURCE_DIR}/../buildutil/cmake_common.txt) set_common_build_variables() # Includes for this project.