diff --git a/cmake/version.inc b/cmake/version.inc new file mode 100644 index 0000000000000000000000000000000000000000..8c025201421e285ea54a895225d90205680f1e84 --- /dev/null +++ b/cmake/version.inc @@ -0,0 +1,42 @@ +CMAKE_MINIMUM_REQUIRED(VERSION 2.8) +PROJECT(TDengine) + +SET(TD_VER_1 "2") +SET(TD_VER_2 "0") +SET(TD_VER_3 "2") +SET(TD_VER_4 "3") +SET(TD_VER_GIT "d711657139620f6c50f362597020705b8ad26bd2") +SET(TD_VER_GIT_INTERNAL "1d74ae24c541ffbb280e8630883c0236cd45f8c7") + +SET(TD_VER_VERTYPE "stable") +SET(TD_VER_CPUTYPE "x64") +SET(TD_VER_OSTYPE "Linux") + +SET(TD_VER_COMPATIBLE "2.0.0.0") +STRING(TIMESTAMP TD_VER_DATE "%Y-%m-%d %H:%M:%S") + +IF (TD_LINUX_64) + SET(TD_VER_CPUTYPE "x64") +ENDIF () + +IF (TD_LINUX_32) + SET(TD_VER_CPUTYPE "x86") +ENDIF () + +IF (TD_ARM_64) + SET(TD_VER_CPUTYPE "aarch64") +ENDIF () + +IF (TD_ARM_32) + SET(TD_VER_CPUTYPE "aarch32") +ENDIF () + +IF (TD_WINDOWS_64) + SET(TD_VER_CPUTYPE "x64") +ENDIF () + +IF (TD_WINDOWS_32) + SET(TD_VER_CPUTYPE "x86") +ENDIF () + +CONFIGURE_FILE("${TD_COMMUNITY_DIR}/src/util/src/version.c.in" "${TD_COMMUNITY_DIR}/src/util/src/version.c") diff --git a/src/client/CMakeLists.txt b/src/client/CMakeLists.txt index d5cbf3cab6d408914303e3c06230930bb59f734d..5b5fb3435d6c1261c2372bddcd85a0bcd3a110f9 100644 --- a/src/client/CMakeLists.txt +++ b/src/client/CMakeLists.txt @@ -35,12 +35,14 @@ IF (TD_LINUX) ELSEIF (TD_WINDOWS) INCLUDE_DIRECTORIES(${TD_COMMUNITY_DIR}/deps/jni/windows) INCLUDE_DIRECTORIES(${TD_COMMUNITY_DIR}/deps/jni/windows/win32) - + + CONFIGURE_FILE("${TD_COMMUNITY_DIR}/src/client/src/taos.rc.in" "${TD_COMMUNITY_DIR}/src/client/src/taos.rc") + ADD_LIBRARY(taos_static STATIC ${SRC}) TARGET_LINK_LIBRARIES(taos_static trpc tutil query) # generate dynamic library (*.dll) - ADD_LIBRARY(taos SHARED ${SRC}) + ADD_LIBRARY(taos SHARED ${SRC} ${TD_COMMUNITY_DIR}/src/client/src/taos.rc) IF (NOT TD_GODLL) SET_TARGET_PROPERTIES(taos PROPERTIES LINK_FLAGS /DEF:${TD_COMMUNITY_DIR}/src/client/src/taos.def) ENDIF () diff --git a/src/client/src/taos.rc.in b/src/client/src/taos.rc.in new file mode 100644 index 0000000000000000000000000000000000000000..05dbd9bb7d0557999cba6a7fe24a52b94f70c54e --- /dev/null +++ b/src/client/src/taos.rc.in @@ -0,0 +1,31 @@ +1 VERSIONINFO + FILEVERSION ${TD_VER_1}, ${TD_VER_2}, ${TD_VER_3} + PRODUCTVERSION ${TD_VER_1}, ${TD_VER_2}, ${TD_VER_3} + FILEFLAGSMASK 0x17L +#ifdef _DEBUG + FILEFLAGS 0x1L +#else + FILEFLAGS 0x0L +#endif + FILEOS 0x4L + FILETYPE 0x0L + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "FileDescription", "Native C Driver for TDengine" + VALUE "FileVersion", "${TD_VER_1}, ${TD_VER_2}, ${TD_VER_3}" + VALUE "InternalName", "taos.dll(${TD_VER_CPUTYPE})" + VALUE "LegalCopyright", "Copyright (C) 2020 TAOS Data" + VALUE "OriginalFilename", "" + VALUE "ProductName", "taos.dll(${TD_VER_CPUTYPE})" + VALUE "ProductVersion", "${TD_VER_1}.${TD_VER_2}.${TD_VER_3}.${TD_VER_4}" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END \ No newline at end of file diff --git a/src/util/src/version.c b/src/util/src/version.c deleted file mode 100644 index 6f7b29ebb9596435e9b7e34da3ec5d97740ac38e..0000000000000000000000000000000000000000 --- a/src/util/src/version.c +++ /dev/null @@ -1,7 +0,0 @@ -char version[12] = "2.0.2.0"; -char compatible_version[12] = "2.0.0.0"; -char gitinfo[48] = "d711657139620f6c50f362597020705b8ad26bd2"; -char gitinfoOfInternal[48] = "1d74ae24c541ffbb280e8630883c0236cd45f8c7"; -char buildinfo[64] = "Built by root at 2020-08-24 16:31"; - -void libtaos_2_0_2_0_Linux_x64_beta() {}; diff --git a/src/util/src/version.c.in b/src/util/src/version.c.in new file mode 100644 index 0000000000000000000000000000000000000000..c7aea2afb1fb40ea3ce1902cd47b8d2b76fee650 --- /dev/null +++ b/src/util/src/version.c.in @@ -0,0 +1,7 @@ +char version[12] = "${TD_VER_1}.${TD_VER_2}.${TD_VER_3}.${TD_VER_4}"; +char compatible_version[12] = "${TD_VER_COMPATIBLE}"; +char gitinfo[48] = "${TD_VER_GIT}"; +char gitinfoOfInternal[48] = "${TD_VER_GIT_INTERNAL}"; +char buildinfo[64] = "Built at ${TD_VER_DATE}"; + +void libtaos_${TD_VER_1}_${TD_VER_2}_${TD_VER_3}_${TD_VER_4}_${TD_VER_OSTYPE}_${TD_VER_CPUTYPE}_${TD_VER_VERTYPE}() {};