36 lines
955 B
CMake
36 lines
955 B
CMake
cmake_minimum_required(VERSION 3.5.1)
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
|
|
include(${CMAKE_ROOT}/Modules/ExternalProject.cmake)
|
|
|
|
execute_process(
|
|
COMMAND dpkg-architecture -qDEB_HOST_MULTIARCH
|
|
OUTPUT_VARIABLE ARCH_TRIPLET
|
|
OUTPUT_STRIP_TRAILING_WHITESPACE
|
|
)
|
|
|
|
execute_process (
|
|
COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/clean.sh ${ARCH_TRIPLET}
|
|
)
|
|
|
|
set(THIRD_PATH "${CMAKE_CURRENT_SOURCE_DIR}")
|
|
set(OPENSSL_PATH "${THIRD_PATH}/libgit2")
|
|
set(LIBGIT2_PATH "${THIRD_PATH}/openssl/")
|
|
|
|
|
|
ExternalProject_Add(
|
|
OPENSSL_PATH
|
|
INSTALL_DIR ${EXTERNAL_LIBS}
|
|
DOWNLOAD_COMMAND ""
|
|
SOURCE_DIR ${OPENSSL_PATH}
|
|
CONFIGURE_COMMAND <SOURCE_DIR>/configure
|
|
BUILD_COMMAND make
|
|
INSTALL_COMMAND make install
|
|
)
|
|
|
|
ExternalProject_Add(
|
|
LIBGIT2_PATH
|
|
INSTALL_DIR ${EXTERNAL_LIBS}
|
|
DOWNLOAD_COMMAND ""
|
|
SOURCE_DIR ${LIBGIT2_PATH}
|
|
)
|