From f9a662f7ad84bb69d9685ee98728d55c9b84f86c Mon Sep 17 00:00:00 2001 From: Konstantinos Sideris Date: Sat, 3 Mar 2018 18:46:31 +0200 Subject: [PATCH] Specify install directory & arch for the matrix_structs library [ci skip] --- CMakeLists.txt | 2 +- cmake/MatrixStructs.cmake | 22 +++++++++++++++------- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3f0c44e3..73cbdd0c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -321,7 +321,7 @@ endif() qt5_add_resources(LANG_QRC ${_qrc}) qt5_add_resources(QRC resources/res.qrc) -set(COMMON_LIBS matrix_structs Qt5::Widgets Qt5::Network Qt5::Concurrent) +set(COMMON_LIBS ${MATRIX_STRUCTS_LIBRARY} Qt5::Widgets Qt5::Network Qt5::Concurrent) if(APPVEYOR_BUILD) set(NHEKO_LIBS ${COMMON_LIBS} lmdb) diff --git a/cmake/MatrixStructs.cmake b/cmake/MatrixStructs.cmake index 79a54350..73608981 100644 --- a/cmake/MatrixStructs.cmake +++ b/cmake/MatrixStructs.cmake @@ -8,20 +8,28 @@ 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) +set(MATRIX_STRUCTS_LIBRARY + ${MATRIX_STRUCTS_ROOT}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}matrix_structs${CMAKE_STATIC_LIBRARY_SUFFIX}) + +include_directories(SYSTEM ${MATRIX_STRUCTS_ROOT}/deps) +include_directories(SYSTEM ${MATRIX_STRUCTS_ROOT}/include) +link_directories(${MATRIX_STRUCTS_ROOT}/lib) ExternalProject_Add( MatrixStructs GIT_REPOSITORY https://github.com/mujx/matrix-structs - GIT_TAG 83be1388e632a43f0570857cb79313c09fb3da0b + GIT_TAG a1beea3b115f037e26c15f22ed911341b3893411 BUILD_IN_SOURCE 1 SOURCE_DIR ${MATRIX_STRUCTS_ROOT} - CONFIGURE_COMMAND ${CMAKE_COMMAND} -DCMAKE_BUILD_TYPE=Release ${MATRIX_STRUCTS_ROOT} + CONFIGURE_COMMAND ${CMAKE_COMMAND} + -DCMAKE_BUILD_TYPE=Release ${MATRIX_STRUCTS_ROOT} + -DCMAKE_INSTALL_PREFIX=${MATRIX_STRUCTS_ROOT} + -Ax64 BUILD_COMMAND ${CMAKE_COMMAND} --build ${MATRIX_STRUCTS_ROOT} --config Release - INSTALL_COMMAND "" + INSTALL_COMMAND ${CMAKE_COMMAND} + --build ${MATRIX_STRUCTS_ROOT} + --config Release + --target install ) - -include_directories(SYSTEM ${MATRIX_STRUCTS_ROOT}/deps) -include_directories(SYSTEM ${MATRIX_STRUCTS_ROOT}/include) -link_directories(${MATRIX_STRUCTS_ROOT})