install.inc 2.4 KB
Newer Older
1
IF (TD_LINUX)
S
[TD-58]  
slguan 已提交
2 3 4
  SET(TD_MAKE_INSTALL_SH "${TD_COMMUNITY_DIR}/packaging/tools/make_install.sh")
  INSTALL(CODE "MESSAGE(\"make install script: ${TD_MAKE_INSTALL_SH}\")")
  INSTALL(CODE "execute_process(COMMAND chmod 777 ${TD_MAKE_INSTALL_SH})")
H
Hui Li 已提交
5
  INSTALL(CODE "execute_process(COMMAND ${TD_MAKE_INSTALL_SH} ${TD_COMMUNITY_DIR} ${PROJECT_BINARY_DIR} Linux ${TD_VER_NUMBER})")
6
ELSEIF (TD_WINDOWS)
H
Hui Li 已提交
7
  IF (TD_POWER)
H
Hui Li 已提交
8 9 10 11
    SET(CMAKE_INSTALL_PREFIX C:/PowerDB)
  ELSE ()
    SET(CMAKE_INSTALL_PREFIX C:/TDengine)
  ENDIF ()
12

H
Hui Li 已提交
13 14 15 16 17 18
  INSTALL(DIRECTORY ${TD_COMMUNITY_DIR}/src/connector/go     DESTINATION connector)
  INSTALL(DIRECTORY ${TD_COMMUNITY_DIR}/src/connector/nodejs DESTINATION connector)
  INSTALL(DIRECTORY ${TD_COMMUNITY_DIR}/src/connector/python DESTINATION connector)
  INSTALL(DIRECTORY ${TD_COMMUNITY_DIR}/tests/examples DESTINATION .)
  INSTALL(DIRECTORY ${TD_COMMUNITY_DIR}/packaging/cfg DESTINATION .)
  INSTALL(FILES ${TD_COMMUNITY_DIR}/src/inc/taos.h DESTINATION include)
H
Hui Li 已提交
19
  INSTALL(FILES ${TD_COMMUNITY_DIR}/src/inc/taoserror.h DESTINATION include)
H
Hui Li 已提交
20 21
  INSTALL(FILES ${LIBRARY_OUTPUT_PATH}/taos.lib DESTINATION driver)
  INSTALL(FILES ${LIBRARY_OUTPUT_PATH}/taos.exp DESTINATION driver)
22
  INSTALL(FILES ${LIBRARY_OUTPUT_PATH}/taos.dll DESTINATION driver)
23 24 25 26 27
  if(FLEX_FOUND)
    INSTALL(FILES ${LIBRARY_OUTPUT_PATH}/todbc.lib DESTINATION driver)
    INSTALL(FILES ${LIBRARY_OUTPUT_PATH}/todbc.exp DESTINATION driver)
    INSTALL(FILES ${LIBRARY_OUTPUT_PATH}/todbc.dll DESTINATION driver)
  endif ()
28

H
Hui Li 已提交
29 30
  IF (TD_POWER)
    INSTALL(FILES ${EXECUTABLE_OUTPUT_PATH}/power.exe DESTINATION .)
31 32
  ELSE ()
    INSTALL(FILES ${EXECUTABLE_OUTPUT_PATH}/taos.exe DESTINATION .)
H
Hui Li 已提交
33
    INSTALL(FILES ${EXECUTABLE_OUTPUT_PATH}/taosdemo.exe DESTINATION .)
34 35 36
    if(FLEX_FOUND)
      INSTALL(FILES ${EXECUTABLE_OUTPUT_PATH}/todbcinst.exe DESTINATION .)
    endif ()
H
Hui Li 已提交
37
  ENDIF ()
H
Hui Li 已提交
38

H
Hui Li 已提交
39 40 41
  #INSTALL(TARGETS taos RUNTIME DESTINATION driver)
  #INSTALL(TARGETS shell RUNTIME DESTINATION .)
  IF (TD_MVN_INSTALLED)
Z
zyyang 已提交
42
    INSTALL(FILES ${LIBRARY_OUTPUT_PATH}/taos-jdbcdriver-2.0.8-dist.jar DESTINATION connector/jdbc)
S
[TD-58]  
slguan 已提交
43
  ENDIF ()
44
ELSEIF (TD_DARWIN)
S
[TD-58]  
slguan 已提交
45 46 47
  SET(TD_MAKE_INSTALL_SH "${TD_COMMUNITY_DIR}/packaging/tools/make_install.sh")
  INSTALL(CODE "MESSAGE(\"make install script: ${TD_MAKE_INSTALL_SH}\")")
  INSTALL(CODE "execute_process(COMMAND chmod 777 ${TD_MAKE_INSTALL_SH})")
H
Hui Li 已提交
48
  INSTALL(CODE "execute_process(COMMAND ${TD_MAKE_INSTALL_SH} ${TD_COMMUNITY_DIR} ${PROJECT_BINARY_DIR} Darwin ${TD_VER_NUMBER})")
H
Hui Li 已提交
49
ENDIF ()