Skip to content

Building locally fails to find cpp src #51

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
StephenHodgson opened this issue Sep 5, 2021 · 3 comments
Closed

Building locally fails to find cpp src #51

StephenHodgson opened this issue Sep 5, 2021 · 3 comments
Labels
sdk: build Issues related to build the sdk type: feature request

Comments

@StephenHodgson
Copy link
Contributor

StephenHodgson commented Sep 5, 2021

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

@cynthiajoan cynthiajoan added question sdk: build Issues related to build the sdk labels May 5, 2022
@waryard
Copy link

waryard commented May 25, 2022

I had the same problem,is there any solution?

@AlmostMatt
Copy link
Contributor

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

@StephenHodgson
Copy link
Contributor Author

Okay please update the documents to adequately describe this setup step

@AlmostMatt AlmostMatt reopened this Jun 28, 2022
@firebase firebase locked and limited conversation to collaborators Jan 18, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
sdk: build Issues related to build the sdk type: feature request
Projects
None yet
Development

No branches or pull requests

5 participants