1# Copyright (C) The c-ares project and its contributors 2# SPDX-License-Identifier: MIT 3IF (CARES_BUILD_TOOLS) 4 # Transform Makefile.inc 5 transform_makefile_inc("Makefile.inc" "${PROJECT_BINARY_DIR}/src/tools/Makefile.inc.cmake") 6 include(${PROJECT_BINARY_DIR}/src/tools/Makefile.inc.cmake) 7 8 # Build ahost 9 ADD_EXECUTABLE (ahost ahost.c ${SAMPLESOURCES}) 10 TARGET_INCLUDE_DIRECTORIES (ahost 11 PUBLIC "$<BUILD_INTERFACE:${PROJECT_BINARY_DIR}>" 12 "$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}>" 13 "$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/src/lib>" 14 "$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include>" 15 "$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>" 16 PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}" 17 ) 18 SET_TARGET_PROPERTIES (ahost PROPERTIES 19 C_STANDARD 90 20 ) 21 22 TARGET_COMPILE_DEFINITIONS (ahost PRIVATE HAVE_CONFIG_H=1) 23 TARGET_LINK_LIBRARIES (ahost PRIVATE ${PROJECT_NAME}) 24 IF (CARES_INSTALL) 25 INSTALL (TARGETS ahost COMPONENT Tools ${TARGETS_INST_DEST}) 26 ENDIF () 27 28 29 # Build adig 30 ADD_EXECUTABLE (adig adig.c ${SAMPLESOURCES}) 31 TARGET_INCLUDE_DIRECTORIES (adig 32 PUBLIC "$<BUILD_INTERFACE:${PROJECT_BINARY_DIR}>" 33 "$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}>" 34 "$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/src/lib>" 35 "$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include>" 36 "$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>" 37 PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}" 38 ) 39 SET_TARGET_PROPERTIES (adig PROPERTIES 40 C_STANDARD 90 41 ) 42 43 TARGET_COMPILE_DEFINITIONS (adig PRIVATE HAVE_CONFIG_H=1) 44 TARGET_LINK_LIBRARIES (adig PRIVATE ${PROJECT_NAME}) 45 IF (CARES_INSTALL) 46 INSTALL (TARGETS adig COMPONENT Tools ${TARGETS_INST_DEST}) 47 ENDIF () 48ENDIF () 49