1IF (CARES_BUILD_TOOLS) 2 # Transform Makefile.inc 3 transform_makefile_inc("Makefile.inc" "${PROJECT_BINARY_DIR}/src/tools/Makefile.inc.cmake") 4 include(${PROJECT_BINARY_DIR}/src/tools/Makefile.inc.cmake) 5 6 # Build ahost 7 ADD_EXECUTABLE (ahost ahost.c ${SAMPLESOURCES}) 8 TARGET_INCLUDE_DIRECTORIES (ahost 9 PUBLIC "$<BUILD_INTERFACE:${PROJECT_BINARY_DIR}>" 10 "$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}>" 11 "$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/src/lib>" 12 "$<BUILD_INTERFACE:${CARES_TOPLEVEL_DIR}/include>" 13 "$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>" 14 PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}" 15 ) 16 TARGET_COMPILE_DEFINITIONS (ahost PRIVATE HAVE_CONFIG_H=1) 17 TARGET_LINK_LIBRARIES (ahost PRIVATE ${PROJECT_NAME}) 18 IF (CARES_INSTALL) 19 INSTALL (TARGETS ahost COMPONENT Tools ${TARGETS_INST_DEST}) 20 ENDIF () 21 22 23 # Build adig 24 ADD_EXECUTABLE (adig adig.c ${SAMPLESOURCES}) 25 TARGET_INCLUDE_DIRECTORIES (adig 26 PUBLIC "$<BUILD_INTERFACE:${PROJECT_BINARY_DIR}>" 27 "$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}>" 28 "$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/src/lib>" 29 "$<BUILD_INTERFACE:${CARES_TOPLEVEL_DIR}/include>" 30 "$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>" 31 PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}" 32 ) 33 TARGET_COMPILE_DEFINITIONS (adig PRIVATE HAVE_CONFIG_H=1) 34 TARGET_LINK_LIBRARIES (adig PRIVATE ${PROJECT_NAME}) 35 IF (CARES_INSTALL) 36 INSTALL (TARGETS adig COMPONENT Tools ${TARGETS_INST_DEST}) 37 ENDIF () 38 39 40 # Build acountry 41 ADD_EXECUTABLE (acountry acountry.c ${SAMPLESOURCES}) 42 TARGET_INCLUDE_DIRECTORIES (acountry 43 PUBLIC "$<BUILD_INTERFACE:${PROJECT_BINARY_DIR}>" 44 "$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}>" 45 "$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/src/lib>" 46 "$<BUILD_INTERFACE:${CARES_TOPLEVEL_DIR}/include>" 47 "$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>" 48 PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}" 49 ) 50 TARGET_COMPILE_DEFINITIONS (acountry PRIVATE HAVE_CONFIG_H=1) 51 TARGET_LINK_LIBRARIES (acountry PRIVATE ${PROJECT_NAME}) 52 IF (CARES_INSTALL) 53 INSTALL (TARGETS acountry COMPONENT Tools ${TARGETS_INST_DEST}) 54 ENDIF () 55ENDIF () 56