2018-06-04 13:54:51 +03:00
|
|
|
set(PLATFORM_FLAGS "")
|
|
|
|
|
|
|
|
if(MSVC)
|
|
|
|
set(PLATFORM_FLAGS "-DCMAKE_GENERATOR_PLATFORM=x64")
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if(APPLE)
|
|
|
|
set(PLATFORM_FLAGS "-DOPENSSL_ROOT_DIR=/usr/local/opt/openssl")
|
|
|
|
endif()
|
|
|
|
|
2018-06-22 15:22:10 +03:00
|
|
|
# Force to build with the bundled version of Boost. This is necessary because
|
|
|
|
# if an outdated version of Boost is installed, then CMake will grab that
|
|
|
|
# instead of the bundled version of Boost, like we wanted.
|
|
|
|
set(BOOST_BUNDLE_ROOT "-DBOOST_ROOT=${DEPS_BUILD_DIR}/boost")
|
|
|
|
|
2019-05-23 05:06:45 +03:00
|
|
|
set (MTX_SHARED ON)
|
|
|
|
|
|
|
|
if (MTX_STATIC)
|
|
|
|
set (MTX_SHARED OFF)
|
|
|
|
endif()
|
|
|
|
|
2018-06-04 13:54:51 +03:00
|
|
|
ExternalProject_Add(
|
|
|
|
MatrixClient
|
|
|
|
|
2018-08-08 14:15:14 +03:00
|
|
|
URL ${MTXCLIENT_URL}
|
|
|
|
URL_HASH SHA256=${MTXCLIENT_HASH}
|
2018-06-04 13:54:51 +03:00
|
|
|
|
|
|
|
BUILD_IN_SOURCE 1
|
|
|
|
SOURCE_DIR ${DEPS_BUILD_DIR}/mtxclient
|
|
|
|
CONFIGURE_COMMAND ${CMAKE_COMMAND}
|
|
|
|
-DCMAKE_INSTALL_PREFIX=${DEPS_INSTALL_DIR}
|
|
|
|
-DCMAKE_BUILD_TYPE=Release
|
|
|
|
-DBUILD_LIB_TESTS=OFF
|
|
|
|
-DBUILD_LIB_EXAMPLES=OFF
|
2018-06-15 02:25:09 +03:00
|
|
|
-DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}
|
2018-06-22 15:22:10 +03:00
|
|
|
${BOOST_BUNDLE_ROOT}
|
2019-05-23 05:06:45 +03:00
|
|
|
-DBUILD_SHARED_LIBS=${MTX_SHARED}
|
2018-06-04 13:54:51 +03:00
|
|
|
${PLATFORM_FLAGS}
|
|
|
|
${DEPS_BUILD_DIR}/mtxclient
|
|
|
|
BUILD_COMMAND
|
|
|
|
${CMAKE_COMMAND} --build ${DEPS_BUILD_DIR}/mtxclient --config Release)
|
|
|
|
|
|
|
|
list(APPEND THIRD_PARTY_DEPS MatrixClient)
|