Support linux compilation

This commit is contained in:
Max Risuhin 2018-06-25 00:59:21 -07:00
parent 6536405d1c
commit 8e7228718f
No known key found for this signature in database
GPG Key ID: BF733F5ACA0B4448
1 changed files with 11 additions and 2 deletions

View File

@ -8,10 +8,13 @@ set(REACT_NATIVE_DESKTOP_EXTERNAL_MODULES_SRC ${REACT_NATIVE_DESKTOP_EXTERNAL_MO
include(${CMAKE_ROOT}/Modules/ExternalProject.cmake)
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)
set(qtkeychain_STATIC_LIB ${qtkeychain_BUILDDIR}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}qt5keychain${CMAKE_STATIC_LIBRARY_SUFFIX})
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)
@ -23,10 +26,16 @@ ExternalProject_Add(qtkeychain
LOG_DOWNLOAD 1
)
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}
${qtkeychain_STATIC_LIB} PARENT_SCOPE)
${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)