diff --git a/desktop/CMakeLists.txt b/desktop/CMakeLists.txt index 93455beec4..a2b9faca92 100644 --- a/desktop/CMakeLists.txt +++ b/desktop/CMakeLists.txt @@ -16,6 +16,14 @@ set(CMAKE_OSX_DEPLOYMENT_TARGET "10.9") message(STATUS "EXTERNAL_MODULES_DIR: ${EXTERNAL_MODULES_DIR}") string(REGEX MATCH "BUILD_FOR_BUNDLE" BUILD_FOR_BUNDLE "${CMAKE_CXX_FLAGS}") + +# It is important to distinguish between directory hierarchies +# in release and dev builds. Release contains .env +# in the root dir of the build, while dev build's current dir +# is status-react/desktop/bin, hence the need +# to jump two levels up. +# This is required by react-native-config library which references ENVFILE +# from its own CMakeLists.txt file, so it will read the value set here if(${BUILD_FOR_BUNDLE} MATCHES "BUILD_FOR_BUNDLE") set(ENVFILE "/.env") else()