mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-22 03:00:46 +03:00
33 lines
834 B
CMake
33 lines
834 B
CMake
include(ExternalProject)
|
|
|
|
#
|
|
# Build matrix-structs.
|
|
#
|
|
|
|
set(THIRD_PARTY_ROOT ${CMAKE_SOURCE_DIR}/.third-party)
|
|
set(MATRIX_STRUCTS_ROOT ${THIRD_PARTY_ROOT}/matrix_structs)
|
|
set(MATRIX_STRUCTS_INCLUDE_DIR ${MATRIX_STRUCTS_ROOT}/include)
|
|
set(MATRIX_STRUCTS_LIBRARY matrix_structs)
|
|
|
|
link_directories(${MATRIX_STRUCTS_ROOT})
|
|
|
|
set(WINDOWS_FLAGS "")
|
|
|
|
if(MSVC)
|
|
set(WINDOWS_FLAGS "-DCMAKE_GENERATOR_PLATFORM=x64")
|
|
endif()
|
|
|
|
ExternalProject_Add(
|
|
MatrixStructs
|
|
|
|
GIT_REPOSITORY https://github.com/mujx/matrix-structs
|
|
GIT_TAG e6ce4fee893d7db8c6e9ece366d8184e009f003c
|
|
|
|
BUILD_IN_SOURCE 1
|
|
SOURCE_DIR ${MATRIX_STRUCTS_ROOT}
|
|
CONFIGURE_COMMAND ${CMAKE_COMMAND}
|
|
-DCMAKE_BUILD_TYPE=Release ${MATRIX_STRUCTS_ROOT}
|
|
${WINDOWS_FLAGS}
|
|
BUILD_COMMAND ${CMAKE_COMMAND} --build ${MATRIX_STRUCTS_ROOT} --config Release
|
|
INSTALL_COMMAND ""
|
|
)
|