CMAKE_MINIMUM_REQUIRED(VERSION 2.8...3.20) PROJECT(TDengine) IF (TD_WINDOWS) LIST(APPEND SRC iconv.c) LIST(APPEND SRC localcharset.c) INCLUDE_DIRECTORIES(.) SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /WX-") SET(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} /WX-") ADD_LIBRARY(iconv ${SRC}) ENDIF ()