Remove extra dependencies

This commit is contained in:
Vitaly Petrov
2019-09-10 11:31:22 +03:00
parent 604df237b5
commit 3e2f657d58
5 changed files with 23 additions and 25 deletions
+1 -2
View File
@@ -14,7 +14,6 @@ set(CMAKE_AUTOMOC ON)
#available params:
# - NO_BUILD_TESTS=1
# - NO_BUILD_EXAMPLES=1
# - WINPTY_ROOT_DIR=<path/to/winpty> - if you set this parameter, winpty doesn't be auto-downloaded like dependency
# - WINPTY_LIBS=<path/to/winpty.lib> - redefine path to winpty lib for libkage and ignore included find mechanic
IF("${CMAKE_BUILD_TYPE}" STREQUAL "Debug")
set(PTYQT_DEBUG TRUE)
@@ -52,7 +51,7 @@ if (MSVC)
endif()
#dependencies
if (MSVC AND "${WINPTY_LIBS}" STREQUAL "STATIC")
if (MSVC)
add_subdirectory(thirdparty)
endif()
-1
View File
@@ -75,7 +75,6 @@ target_link_libraries(ptyqt Qt5::Core ${ADDITIONAL_LIBS})
if (MSVC)
target_link_libraries( ptyqt Qt5::Network ${WINPTY_LIBS})
add_dependencies(ptyqt winpty)
endif()
install(TARGETS ptyqt DESTINATION ${PTYQT_INSTALL_LIB_DIR})
-1
View File
@@ -8,7 +8,6 @@ add_dependencies(xtermjs_sample ptyqt)
target_link_libraries(xtermjs_sample ptyqt Qt5::Core ${Qt5WebSockets_LIBRARIES})
if (MSVC)
add_dependencies(xtermjs_sample winpty)
target_link_libraries(xtermjs_sample Qt5::Network ${WINPTY_LIBS})
endif()
-1
View File
@@ -9,7 +9,6 @@ add_dependencies(ptyqt_tests ptyqt)
add_test(ptyqt_tests ptyqt_tests)
if (MSVC)
add_dependencies(ptyqt_tests winpty)
if ("${PTYQT_DEBUG}")
set(WINPTY_DEBUG_SERVER_PATH ${WINPTY_ROOT_DIR}/${TARGET_ARCH}/bin/winpty-debugserver.exe)
add_definitions(-DWINPTY_DEBUG_SRV_PATH="${WINPTY_DEBUG_SERVER_PATH}")
+22 -20
View File
@@ -2,7 +2,7 @@ if (MSVC)
include(ExternalProject)
if("${WINPTY_ROOT_DIR}" STREQUAL "")
if("${WINPTY_LIBS}" STREQUAL "")
set(WINPTY_URL https://github.com/rprichard/winpty/releases/download/0.4.3/winpty-0.4.3-msvc2015.zip)
@@ -27,24 +27,26 @@ if (MSVC)
message("Use user-defined WinPty")
endif()
set(WINPTY_SUB_ARCH ${TARGET_ARCH})
if ("${WINPTY_SUB_ARCH}" STREQUAL "x86")
set(WINPTY_SUB_ARCH ia32)
if("${WINPTY_LIBS}" STREQUAL "")
set(WINPTY_SUB_ARCH ${TARGET_ARCH})
if ("${WINPTY_SUB_ARCH}" STREQUAL "x86")
set(WINPTY_SUB_ARCH ia32)
endif()
#message("WINPTY_SUB_ARCH " ${WINPTY_SUB_ARCH})
#message("TARGET_ARCH " ${TARGET_ARCH})
#can be linked only to DLL, because WinPty built and distributed only for MSVC/Shared/x64
if("${BUILD_TYPE}" STREQUAL "STATIC")
set(WINPTY_LIBS ${WINPTY_ROOT_DIR}/${WINPTY_SUB_ARCH}/lib/winpty.lib PARENT_SCOPE)
else()
set(WINPTY_LIBS ${WINPTY_ROOT_DIR}/${WINPTY_SUB_ARCH}/bin/winpty.dll PARENT_SCOPE)
endif()
#winpty.dll and winpty-agent.exe must be near your project executable
set(WINPTY_DIST_FILES ${WINPTY_ROOT_DIR}/${WINPTY_SUB_ARCH}/bin/winpty.dll
${WINPTY_ROOT_DIR}/${WINPTY_SUB_ARCH}/bin/winpty-agent.exe
PARENT_SCOPE)
#message("WINPTY_DIST_FILES" ${WINPTY_DIST_FILES})
endif()
#message("WINPTY_SUB_ARCH " ${WINPTY_SUB_ARCH})
#message("TARGET_ARCH " ${TARGET_ARCH})
#can be linked only to DLL, because WinPty built and distributed only for MSVC/Shared/x64
if("${BUILD_TYPE}" STREQUAL "STATIC")
set(WINPTY_LIBS ${WINPTY_ROOT_DIR}/${WINPTY_SUB_ARCH}/lib/winpty.lib PARENT_SCOPE)
else()
set(WINPTY_LIBS ${WINPTY_ROOT_DIR}/${WINPTY_SUB_ARCH}/bin/winpty.dll PARENT_SCOPE)
endif()
#winpty.dll and winpty-agent.exe must be near your project executable
set(WINPTY_DIST_FILES ${WINPTY_ROOT_DIR}/${WINPTY_SUB_ARCH}/bin/winpty.dll
${WINPTY_ROOT_DIR}/${WINPTY_SUB_ARCH}/bin/winpty-agent.exe
PARENT_SCOPE)
#message("WINPTY_DIST_FILES" ${WINPTY_DIST_FILES})
endif()