2015-04-16 02:01:08 -07:00
|
|
|
if(WIN32)
|
2016-07-29 05:53:44 -07:00
|
|
|
set(LIBVTERM_CONFIGURE_COMMAND ${CMAKE_COMMAND} -E copy
|
2018-03-17 14:20:30 -07:00
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/cmake/LibvtermCMakeLists.txt
|
|
|
|
${DEPS_BUILD_DIR}/src/libvterm/CMakeLists.txt
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E copy
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/cmake/Libvterm-tbl2inc_c.cmake
|
|
|
|
${DEPS_BUILD_DIR}/src/libvterm/tbl2inc_c.cmake
|
|
|
|
COMMAND ${CMAKE_COMMAND} ${DEPS_BUILD_DIR}/src/libvterm
|
2016-07-29 05:53:44 -07:00
|
|
|
-DCMAKE_INSTALL_PREFIX=${DEPS_INSTALL_DIR}
|
|
|
|
-DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
|
2021-10-23 18:38:58 -07:00
|
|
|
-DCMAKE_GENERATOR_PLATFORM=${CMAKE_GENERATOR_PLATFORM}
|
2016-07-29 05:53:44 -07:00
|
|
|
-DCMAKE_GENERATOR=${CMAKE_GENERATOR})
|
2022-08-05 08:23:32 -07:00
|
|
|
if(MSVC)
|
|
|
|
list(APPEND LIBVTERM_CONFIGURE_COMMAND "-DCMAKE_C_FLAGS:STRING=${CMAKE_C_COMPILER_ARG1}")
|
|
|
|
else()
|
|
|
|
list(APPEND LIBVTERM_CONFIGURE_COMMAND "-DCMAKE_C_FLAGS:STRING=${CMAKE_C_COMPILER_ARG1} -fPIC")
|
|
|
|
endif()
|
2022-09-06 07:52:39 -07:00
|
|
|
set(LIBVTERM_BUILD_COMMAND ${CMAKE_COMMAND} --build . --config $<CONFIG>)
|
|
|
|
set(LIBVTERM_INSTALL_COMMAND ${CMAKE_COMMAND} --build . --target install --config $<CONFIG>)
|
2016-07-29 05:53:44 -07:00
|
|
|
else()
|
|
|
|
set(LIBVTERM_INSTALL_COMMAND ${MAKE_PRG} CC=${DEPS_C_COMPILER}
|
2018-03-01 02:23:21 -07:00
|
|
|
PREFIX=${DEPS_INSTALL_DIR}
|
|
|
|
CFLAGS=-fPIC
|
2019-10-14 06:16:58 -07:00
|
|
|
LDFLAGS+=-static
|
2018-03-01 02:23:21 -07:00
|
|
|
${DEFAULT_MAKE_CFLAGS}
|
|
|
|
install)
|
2015-04-16 02:01:08 -07:00
|
|
|
endif()
|
|
|
|
|
2022-08-29 07:57:46 -07:00
|
|
|
ExternalProject_Add(libvterm
|
|
|
|
PREFIX ${DEPS_BUILD_DIR}
|
|
|
|
URL ${LIBVTERM_URL}
|
|
|
|
DOWNLOAD_DIR ${DEPS_DOWNLOAD_DIR}/libvterm
|
|
|
|
DOWNLOAD_COMMAND ${CMAKE_COMMAND}
|
|
|
|
-DPREFIX=${DEPS_BUILD_DIR}
|
|
|
|
-DDOWNLOAD_DIR=${DEPS_DOWNLOAD_DIR}/libvterm
|
|
|
|
-DURL=${LIBVTERM_URL}
|
|
|
|
-DEXPECTED_SHA256=${LIBVTERM_SHA256}
|
|
|
|
-DTARGET=libvterm
|
|
|
|
-DUSE_EXISTING_SRC_DIR=${USE_EXISTING_SRC_DIR}
|
|
|
|
-P ${CMAKE_CURRENT_SOURCE_DIR}/cmake/DownloadAndExtractFile.cmake
|
|
|
|
BUILD_IN_SOURCE 1
|
|
|
|
CONFIGURE_COMMAND "${LIBVTERM_CONFIGURE_COMMAND}"
|
|
|
|
BUILD_COMMAND "${LIBVTERM_BUILD_COMMAND}"
|
|
|
|
INSTALL_COMMAND "${LIBVTERM_INSTALL_COMMAND}")
|
2015-03-09 06:24:21 -07:00
|
|
|
|
2015-03-10 03:04:06 -07:00
|
|
|
list(APPEND THIRD_PARTY_DEPS libvterm)
|