2018-06-22 15:28:24 +00:00
|
|
|
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
|
|
|
|
|
|
|
set(REACT_NATIVE_DESKTOP_EXTERNAL_MODULES_TYPE_NAMES ${REACT_NATIVE_DESKTOP_EXTERNAL_MODULES_TYPE_NAMES}
|
|
|
|
\"RNKeychainManager\" PARENT_SCOPE)
|
|
|
|
|
|
|
|
set(REACT_NATIVE_DESKTOP_EXTERNAL_MODULES_SRC ${REACT_NATIVE_DESKTOP_EXTERNAL_MODULES_SRC}
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/rnkeychainmanager.cpp PARENT_SCOPE)
|
|
|
|
|
|
|
|
include(${CMAKE_ROOT}/Modules/ExternalProject.cmake)
|
|
|
|
|
2018-06-25 07:59:21 +00:00
|
|
|
if (UNIX AND NOT APPLE)
|
|
|
|
set(qtkeychain_LIBPATHSUFFIX /x86_64-linux-gnu)
|
|
|
|
endif()
|
2018-06-22 15:28:24 +00:00
|
|
|
|
|
|
|
set(qtkeychain_ROOT ${CMAKE_CURRENT_BINARY_DIR}/qtkeychain)
|
|
|
|
set(qtkeychain_BUILDDIR ${qtkeychain_ROOT}/build)
|
2018-06-25 07:59:21 +00:00
|
|
|
set(qtkeychain_STATIC_LIB ${qtkeychain_BUILDDIR}/lib${qtkeychain_LIBPATHSUFFIX}/${CMAKE_STATIC_LIBRARY_PREFIX}qt5keychain${CMAKE_STATIC_LIBRARY_SUFFIX})
|
2018-06-22 15:28:24 +00:00
|
|
|
set(qtkeychain_INCLUDE_DIR ${qtkeychain_BUILDDIR}/include/qt5keychain)
|
|
|
|
|
|
|
|
|
|
|
|
ExternalProject_Add(qtkeychain
|
2018-07-03 17:10:32 +00:00
|
|
|
GIT_REPOSITORY https://github.com/status-im/qtkeychain.git
|
2018-06-26 08:22:31 +00:00
|
|
|
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${qtkeychain_BUILDDIR} -DQTKEYCHAIN_STATIC=ON -DBUILD_TRANSLATIONS=OFF
|
2018-06-22 15:28:24 +00:00
|
|
|
BUILD_BYPRODUCTS ${qtkeychain_STATIC_LIB}
|
|
|
|
LOG_BUILD 1
|
|
|
|
LOG_DOWNLOAD 1
|
|
|
|
)
|
|
|
|
|
2018-06-25 07:59:21 +00:00
|
|
|
if (UNIX AND NOT APPLE)
|
|
|
|
find_package(Qt5 COMPONENTS DBus REQUIRED)
|
|
|
|
set(qtkeychain_DEPS Qt5::DBus)
|
|
|
|
set(REACT_NATIVE_DESKTOP_EXTERNAL_QT_COMPONENTS ${REACT_NATIVE_DESKTOP_EXTERNAL_PROJECT_DEPS} DBus PARENT_SCOPE)
|
|
|
|
endif()
|
|
|
|
|
2018-06-22 15:28:24 +00:00
|
|
|
set(REACT_NATIVE_DESKTOP_EXTERNAL_PROJECT_DEPS ${REACT_NATIVE_DESKTOP_EXTERNAL_PROJECT_DEPS} qtkeychain PARENT_SCOPE)
|
|
|
|
|
|
|
|
set(REACT_NATIVE_DESKTOP_EXTERNAL_MODULES_LIBS ${REACT_NATIVE_DESKTOP_EXTERNAL_MODULES_LIBS}
|
2018-06-25 07:59:21 +00:00
|
|
|
${qtkeychain_STATIC_LIB} ${qtkeychain_DEPS} PARENT_SCOPE)
|
2018-06-22 15:28:24 +00:00
|
|
|
|
|
|
|
set(REACT_NATIVE_DESKTOP_EXTERNAL_MODULES_INCLUDE_DIRS ${REACT_NATIVE_DESKTOP_EXTERNAL_MODULES_INCLUDE_DIRS}
|
|
|
|
${qtkeychain_INCLUDE_DIR} PARENT_SCOPE)
|