fix Windows packaging issue
This commit is contained in:
parent
1f7e5c07ca
commit
c033592b29
|
@ -56,8 +56,8 @@ copy %binary_dir%\\build\\bin\\taos.exe %target_dir% > nul
|
||||||
if exist %binary_dir%\\build\\bin\\taosBenchmark.exe (
|
if exist %binary_dir%\\build\\bin\\taosBenchmark.exe (
|
||||||
copy %binary_dir%\\build\\bin\\taosBenchmark.exe %target_dir% > nul
|
copy %binary_dir%\\build\\bin\\taosBenchmark.exe %target_dir% > nul
|
||||||
)
|
)
|
||||||
if exist %binary_dir%\\build\\lib\\taosws.dll.lib (
|
if exist %binary_dir%\\build\\lib\\taosws.lib (
|
||||||
copy %binary_dir%\\build\\lib\\taosws.dll.lib %target_dir%\\driver > nul
|
copy %binary_dir%\\build\\lib\\taosws.lib %target_dir%\\driver > nul
|
||||||
)
|
)
|
||||||
if exist %binary_dir%\\build\\lib\\taosws.dll (
|
if exist %binary_dir%\\build\\lib\\taosws.dll (
|
||||||
copy %binary_dir%\\build\\lib\\taosws.dll %target_dir%\\driver > nul
|
copy %binary_dir%\\build\\lib\\taosws.dll %target_dir%\\driver > nul
|
||||||
|
|
|
@ -3,8 +3,6 @@ IF (TD_WEBSOCKET)
|
||||||
SET(websocket_lib_file "libtaosws.so")
|
SET(websocket_lib_file "libtaosws.so")
|
||||||
ELSEIF (TD_DARWIN)
|
ELSEIF (TD_DARWIN)
|
||||||
SET(websocket_lib_file "libtaosws.dylib")
|
SET(websocket_lib_file "libtaosws.dylib")
|
||||||
ELSEIF (TD_WINDOWS)
|
|
||||||
SET(websocket_lib_file "{taosws.dll,taosws.dll.lib}")
|
|
||||||
ENDIF ()
|
ENDIF ()
|
||||||
MESSAGE("${Green} use libtaos-ws${ColourReset}")
|
MESSAGE("${Green} use libtaos-ws${ColourReset}")
|
||||||
IF (TD_ALPINE)
|
IF (TD_ALPINE)
|
||||||
|
@ -26,6 +24,26 @@ IF (TD_WEBSOCKET)
|
||||||
COMMAND cmake -E make_directory ${CMAKE_BINARY_DIR}/build/include
|
COMMAND cmake -E make_directory ${CMAKE_BINARY_DIR}/build/include
|
||||||
COMMAND cmake -E copy target/release/taosws.h ${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()
|
ELSE()
|
||||||
include(ExternalProject)
|
include(ExternalProject)
|
||||||
ExternalProject_Add(taosws-rs
|
ExternalProject_Add(taosws-rs
|
||||||
|
|
|
@ -20,7 +20,7 @@ ELSEIF (TD_DARWIN AND TD_WEBSOCKET)
|
||||||
ADD_DEPENDENCIES(shell taosws-rs)
|
ADD_DEPENDENCIES(shell taosws-rs)
|
||||||
ELSEIF (TD_WINDOWS AND TD_WEBSOCKET)
|
ELSEIF (TD_WINDOWS AND TD_WEBSOCKET)
|
||||||
ADD_DEFINITIONS(-DWEBSOCKET -I${CMAKE_BINARY_DIR}/build/include)
|
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)
|
ADD_DEPENDENCIES(shell taosws-rs)
|
||||||
ELSE ()
|
ELSE ()
|
||||||
SET(LINK_WEBSOCKET "")
|
SET(LINK_WEBSOCKET "")
|
||||||
|
|
Loading…
Reference in New Issue