@ -533,17 +533,17 @@ CONFIGURE_FILE (ares_config.h.cmake ${PROJECT_BINARY_DIR}/ares_config.h)
# a r e s _ _ r e a d _ l i n e . c
# . . .
function ( TRANSFORM_MAKEFILE_INC INPUT_FILE OUTPUT_FILE )
file ( READ ${ INPUT_FILE } MAKEFILE_INC_TEXT )
string ( REPLACE "$(top_srcdir)" "\${PROJECT_SOURCE_DIR}" MAKEFILE_INC_TEXT ${ MAKEFILE_INC_TEXT } )
string ( REPLACE "$(top_builddir)" "\${PROJECT_BINARY_DIR}" MAKEFILE_INC_TEXT ${ MAKEFILE_INC_TEXT } )
file ( READ ${ INPUT_FILE } MAKEFILE_INC_TEXT )
string ( REPLACE "$(top_srcdir)" "\${PROJECT_SOURCE_DIR}" MAKEFILE_INC_TEXT ${ MAKEFILE_INC_TEXT } )
string ( REPLACE "$(top_builddir)" "\${PROJECT_BINARY_DIR}" MAKEFILE_INC_TEXT ${ MAKEFILE_INC_TEXT } )
string ( REGEX REPLACE "\\\\\n" "ß!ß" MAKEFILE_INC_TEXT ${ MAKEFILE_INC_TEXT } )
string ( REGEX REPLACE "([a-zA-Z_][a-zA-Z0-9_]*)[\t ]*=[\t ]*([^\n]*)" "SET(\\1 \\2)" MAKEFILE_INC_TEXT ${ MAKEFILE_INC_TEXT } )
string ( REPLACE "ß!ß" "\n" MAKEFILE_INC_TEXT ${ MAKEFILE_INC_TEXT } )
string ( REGEX REPLACE "\\\\\n" "ß!ß" MAKEFILE_INC_TEXT ${ MAKEFILE_INC_TEXT } )
string ( REGEX REPLACE "([a-zA-Z_][a-zA-Z0-9_]*)[\t ]*=[\t ]*([^\n]*)" "SET(\\1 \\2)" MAKEFILE_INC_TEXT ${ MAKEFILE_INC_TEXT } )
string ( REPLACE "ß!ß" "\n" MAKEFILE_INC_TEXT ${ MAKEFILE_INC_TEXT } )
string ( REGEX REPLACE "\\$\\(([a-zA-Z_][a-zA-Z0-9_]*)\\)" "\${\\1}" MAKEFILE_INC_TEXT ${ MAKEFILE_INC_TEXT } ) # R e p l a c e $ ( ) w i t h $ { }
string ( REGEX REPLACE "@([a-zA-Z_][a-zA-Z0-9_]*)@" "\${\\1}" MAKEFILE_INC_TEXT ${ MAKEFILE_INC_TEXT } ) # R e p l a c e @ @ w i t h $ { } , e v e n i f t h a t m a y n o t b e r e a d b y C M a k e s c r i p t s .
file ( WRITE ${ OUTPUT_FILE } ${ MAKEFILE_INC_TEXT } )
string ( REGEX REPLACE "\\$\\(([a-zA-Z_][a-zA-Z0-9_]*)\\)" "\${\\1}" MAKEFILE_INC_TEXT ${ MAKEFILE_INC_TEXT } ) # R e p l a c e $ ( ) w i t h $ { }
string ( REGEX REPLACE "@([a-zA-Z_][a-zA-Z0-9_]*)@" "\${\\1}" MAKEFILE_INC_TEXT ${ MAKEFILE_INC_TEXT } ) # R e p l a c e @ @ w i t h $ { } , e v e n i f t h a t m a y n o t b e r e a d b y C M a k e s c r i p t s .
file ( WRITE ${ OUTPUT_FILE } ${ MAKEFILE_INC_TEXT } )
endfunction ( )
# r u n t h e f u n c t i o n . . .
@ -551,7 +551,6 @@ transform_makefile_inc("Makefile.inc" "${PROJECT_BINARY_DIR}/Makefile.inc.cmake"
include ( ${ PROJECT_BINARY_DIR } /Makefile.inc.cmake )
# B u i l d t h e d y n a m i c / s h a r e d l i b r a r y
IF ( CARES_SHARED )
ADD_LIBRARY ( ${ PROJECT_NAME } SHARED ${ CSOURCES } )