Merge pull request #22102 from taosdata/fix_windows_packaging_issue
fix Windows packaging issue
This commit is contained in:
commit
2495a5675d
|
@ -56,8 +56,8 @@ copy %binary_dir%\\build\\bin\\taos.exe %target_dir% > nul
|
|||
if exist %binary_dir%\\build\\bin\\taosBenchmark.exe (
|
||||
copy %binary_dir%\\build\\bin\\taosBenchmark.exe %target_dir% > nul
|
||||
)
|
||||
if exist %binary_dir%\\build\\lib\\taosws.dll.lib (
|
||||
copy %binary_dir%\\build\\lib\\taosws.dll.lib %target_dir%\\driver > nul
|
||||
if exist %binary_dir%\\build\\lib\\taosws.lib (
|
||||
copy %binary_dir%\\build\\lib\\taosws.lib %target_dir%\\driver > nul
|
||||
)
|
||||
if exist %binary_dir%\\build\\lib\\taosws.dll (
|
||||
copy %binary_dir%\\build\\lib\\taosws.dll %target_dir%\\driver > nul
|
||||
|
|
|
@ -3,8 +3,6 @@ IF (TD_WEBSOCKET)
|
|||
SET(websocket_lib_file "libtaosws.so")
|
||||
ELSEIF (TD_DARWIN)
|
||||
SET(websocket_lib_file "libtaosws.dylib")
|
||||
ELSEIF (TD_WINDOWS)
|
||||
SET(websocket_lib_file "{taosws.dll,taosws.dll.lib}")
|
||||
ENDIF ()
|
||||
MESSAGE("${Green} use libtaos-ws${ColourReset}")
|
||||
IF (TD_ALPINE)
|
||||
|
@ -26,6 +24,26 @@ IF (TD_WEBSOCKET)
|
|||
COMMAND cmake -E make_directory ${CMAKE_BINARY_DIR}/build/include
|
||||
COMMAND cmake -E copy target/release/taosws.h ${CMAKE_BINARY_DIR}/build/include
|
||||
)
|
||||
ELSEIF (TD_WINDOWS)
|
||||
include(ExternalProject)
|
||||
ExternalProject_Add(taosws-rs
|
||||
PREFIX "taosws-rs"
|
||||
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/taosws-rs
|
||||
BUILD_ALWAYS off
|
||||
DEPENDS taos
|
||||
BUILD_IN_SOURCE 1
|
||||
CONFIGURE_COMMAND cmake -E echo "taosws-rs no need cmake to config"
|
||||
PATCH_COMMAND
|
||||
COMMAND git clean -f -d
|
||||
BUILD_COMMAND
|
||||
COMMAND cargo update
|
||||
COMMAND cargo build --release -p taos-ws-sys --features native-tls-vendored
|
||||
INSTALL_COMMAND
|
||||
COMMAND cp target/release/taosws.dll ${CMAKE_BINARY_DIR}/build/lib
|
||||
COMMAND cp target/release/taosws.dll.lib ${CMAKE_BINARY_DIR}/build/lib/taosws.lib
|
||||
COMMAND cmake -E make_directory ${CMAKE_BINARY_DIR}/build/include
|
||||
COMMAND cmake -E copy target/release/taosws.h ${CMAKE_BINARY_DIR}/build/include
|
||||
)
|
||||
ELSE()
|
||||
include(ExternalProject)
|
||||
ExternalProject_Add(taosws-rs
|
||||
|
|
|
@ -20,7 +20,7 @@ ELSEIF (TD_DARWIN AND TD_WEBSOCKET)
|
|||
ADD_DEPENDENCIES(shell taosws-rs)
|
||||
ELSEIF (TD_WINDOWS AND TD_WEBSOCKET)
|
||||
ADD_DEFINITIONS(-DWEBSOCKET -I${CMAKE_BINARY_DIR}/build/include)
|
||||
SET(LINK_WEBSOCKET "${CMAKE_BINARY_DIR}/build/lib/taosws.dll.lib")
|
||||
SET(LINK_WEBSOCKET "${CMAKE_BINARY_DIR}/build/lib/taosws.lib")
|
||||
ADD_DEPENDENCIES(shell taosws-rs)
|
||||
ELSE ()
|
||||
SET(LINK_WEBSOCKET "")
|
||||
|
|
Loading…
Reference in New Issue