CMakeLists.txt 783 字节
Newer Older
1 2
PROJECT(TDengine)

F
freemine 已提交
3 4 5 6
ADD_EXECUTABLE(todbcinst main.c)
ADD_EXECUTABLE(tconv     tconv.c)

IF (TD_LINUX OR TD_DARWIN)
7
  target_include_directories(todbcinst PRIVATE . ${ODBC_INCLUDE_DIRECTORY} ${ODBCINST_INCLUDE_DIRECTORY})
8 9 10 11 12
  IF (CMAKE_VERSION VERSION_LESS 3.13)
      link_directories(AFTER ${ODBC_LIBRARY_DIRECTORY})
  ELSE ()
      target_link_directories(todbcinst PUBLIC ${ODBC_LIBRARY_DIRECTORY} ${ODBCINST_LIBRARY_DIRECTORY})
  ENDIF ()
13
  TARGET_LINK_LIBRARIES(todbcinst odbc odbcinst)
14 15
ENDIF ()

F
freemine 已提交
16 17 18 19
IF (TD_DARWIN)
  TARGET_LINK_LIBRARIES(tconv iconv)
ENDIF ()

20 21
IF (TD_WINDOWS_64)
  TARGET_LINK_LIBRARIES(todbcinst odbc32 odbccp32 user32 legacy_stdio_definitions os)
F
freemine 已提交
22
  TARGET_LINK_LIBRARIES(tconv taos)
23
  INSTALL(FILES ${EXECUTABLE_OUTPUT_PATH}/todbcinst.exe DESTINATION .)
24
ENDIF ()
F
freemine 已提交
25