firebase-unity-sdk
firebase-unity-sdk copied to clipboard
Building locally fails to find cpp src
I pulled this today to start contributing but I was having problems building locally.
./build_windows_x64.bat
From the errors it seems to be failing to find the firebase_cpp_sdk:
D:\Dev\Google\firebase-unity-sdk\windows_unity_seperate>cmake .. -A x64 -DPROTOBUF_SRC_ROOT_FOLDER=\=/ -DMONO_DIR="C:/Program Files/Mono/bin" -DUNITY_ROOT_DIR=\=/ -DOPENSSL_ROOT_DIR="C:/Program Files/OpenSSL-Win64" -DFIREBASE_UNITY_BUILD_TESTS=ON -DCMAKE_CONFIGURATION_TYPES=RelWithDebInfo -DFIREBASE_INCLUDE_UNITY=ON -DFIREBASE_UNI_LIBRARY=OFF
-- Building for: Visual Studio 16 2019
-- Selecting Windows SDK version 10.0.20348.0 to target Windows 10.0.19043.
-- The C compiler identification is MSVC 19.29.30133.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- The CXX compiler identification is MSVC 19.29.30133.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)
-- Found Mono: C:/Program Files/Mono/bin/mono.exe
-- Auto detected latest Unity version: C:/Program Files/Unity/Hub/Editor/2020.3.17f1
-- Using Unity root directory: C:/Program Files/Unity/Hub/Editor/2020.3.17f1
-- UNITY_MONO_EXE is
-- UNITY_CSHARP_BUILD_EXE is
-- Found Unity: C:/Program Files/Unity/Hub/Editor/2020.3.17f1/Editor/Data/Managed/UnityEngine.dll
-- Found SWIG: C:/Program Files/SWIG/swigwin-3.0.12/swig.exe (found version "3.0.12")
-- Found SWIG: C:/Program Files/SWIG/swigwin-3.0.12/swig.exe (found suitable version "3.0.12", minimum required is "3.0.6")
-- Using Unity root directory: C:/Program Files/Unity/Hub/Editor/2020.3.17f1
-- UNITY_MONO_EXE is C:/Program Files/Unity/Hub/Editor/2020.3.17f1/Editor/Data/MonoBleedingEdge/bin/mono.exe
-- UNITY_CSHARP_BUILD_EXE is C:/Program Files/Unity/Hub/Editor/2020.3.17f1/Editor/Data/MonoBleedingEdge/bin/xbuild.bat
CMake Warning:
Manually-specified variables were not used by the project:
FIREBASE_DOWNLOAD_DIR
FIREBASE_EXTERNAL_PLATFORM
CMake Error at CMakeLists.txt:205 (add_subdirectory):
The source directory
D:/Dev/Google/firebase-unity-sdk/windows_unity_seperate/external/src/firebase_cpp_sdk
does not contain a CMakeLists.txt file.
Example:
CMake Error at cmake/firebase_swig.cmake:116 (get_property):
get_property could not find TARGET firebase_storage. Perhaps it has not
yet been created.
Call Stack (most recent call first):
storage/CMakeLists.txt:40 (firebase_swig_add_library)
This same error repeats for each of the missing firebase modules
I had the same problem,is there any solution?
The Unity SDK depends on the C++ SDK. In order to build from source, you must also check out the C++ SDK source (https://github.com/firebase/firebase-cpp-sdk)
By default, the builds scripts will search for the C++ SDK source in a folder named firebase-cpp-sdk that is in the same parent folder as the firebase-unity-sdk folder. If the C++ SDK is in a different location, it must be specified with FIREBASE_CPP_SDK_DIR
Okay please update the documents to adequately describe this setup step