summary refs log tree commit diff
path: root/deps/cmake/Olm.cmake
blob: b0df28338e1e09d64ac01d0cc40948252ec675bb (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
if(MSVC)
    set(MAKE_CMD "mingw32-make.exe")
else()
    set(MAKE_CMD "make")
endif()

set(OLM_NAME "${CMAKE_STATIC_LIBRARY_PREFIX}olm${CMAKE_STATIC_LIBRARY_SUFFIX}")

ExternalProject_Add(
  Olm

  GIT_REPOSITORY ${OLM_URL}
  GIT_TAG ${OLM_TAG}

  BUILD_IN_SOURCE 1
  SOURCE_DIR ${DEPS_BUILD_DIR}/olm
  CONFIGURE_COMMAND ""
  BUILD_COMMAND ${MAKE_CMD} static
  INSTALL_COMMAND 
    cp -R ${DEPS_BUILD_DIR}/olm/include ${DEPS_INSTALL_DIR} &&
    cp ${DEPS_BUILD_DIR}/olm/build/libolm.a ${DEPS_INSTALL_DIR}/lib
)

list(APPEND THIRD_PARTY_DEPS Olm)