react-native-keychain/desktop/CMakeLists.txt

42 lines
1.8 KiB
CMake
Raw Normal View History

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()
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})
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
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()
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)
set(REACT_NATIVE_DESKTOP_EXTERNAL_MODULES_INCLUDE_DIRS ${REACT_NATIVE_DESKTOP_EXTERNAL_MODULES_INCLUDE_DIRS}
${qtkeychain_INCLUDE_DIR} PARENT_SCOPE)