2018-03-03 14:02:33 +03:00
|
|
|
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_DIRS ${MATRIX_STRUCTS_ROOT}/deps)
|
2018-03-03 19:46:31 +03:00
|
|
|
|
|
|
|
include_directories(SYSTEM ${MATRIX_STRUCTS_ROOT}/deps)
|
|
|
|
include_directories(SYSTEM ${MATRIX_STRUCTS_ROOT}/include)
|
|
|
|
link_directories(${MATRIX_STRUCTS_ROOT}/lib)
|
2018-03-03 14:02:33 +03:00
|
|
|
|
2018-03-03 20:57:00 +03:00
|
|
|
set(WINDOWS_FLAGS "")
|
|
|
|
|
|
|
|
if(MSVC)
|
|
|
|
set(WINDOWS_FLAGS "-DCMAKE_GENERATOR_PLATFORM=x64")
|
|
|
|
endif()
|
|
|
|
|
2018-03-03 14:02:33 +03:00
|
|
|
ExternalProject_Add(
|
|
|
|
MatrixStructs
|
|
|
|
|
|
|
|
GIT_REPOSITORY https://github.com/mujx/matrix-structs
|
2018-03-12 23:23:26 +03:00
|
|
|
GIT_TAG 850100c0ac2b5a04720b2a1f09270749bf99f7dd
|
2018-03-03 14:02:33 +03:00
|
|
|
|
|
|
|
BUILD_IN_SOURCE 1
|
|
|
|
SOURCE_DIR ${MATRIX_STRUCTS_ROOT}
|
2018-03-03 19:46:31 +03:00
|
|
|
CONFIGURE_COMMAND ${CMAKE_COMMAND}
|
|
|
|
-DCMAKE_BUILD_TYPE=Release ${MATRIX_STRUCTS_ROOT}
|
|
|
|
-DCMAKE_INSTALL_PREFIX=${MATRIX_STRUCTS_ROOT}
|
2018-03-03 20:57:00 +03:00
|
|
|
${WINDOWS_FLAGS}
|
2018-03-03 14:16:21 +03:00
|
|
|
BUILD_COMMAND ${CMAKE_COMMAND} --build ${MATRIX_STRUCTS_ROOT} --config Release
|
2018-03-03 19:46:31 +03:00
|
|
|
INSTALL_COMMAND ${CMAKE_COMMAND}
|
|
|
|
--build ${MATRIX_STRUCTS_ROOT}
|
|
|
|
--config Release
|
|
|
|
--target install
|
2018-03-03 14:02:33 +03:00
|
|
|
)
|