Commits

shl...@7081e830-ea04-0410-ae62-fb6148e2d9db  committed f886fe0

Fixed a bug in a previous Common.make and added another macro to check
for multiple functions.

  • Participants
  • Parent commits d4c9166
  • Branches conversion-to-cmake

Comments (0)

Files changed (2)

File src/wml_backend/p2_mp4h/CMakeLists.txt

 SET (REQUIRED_STDC_HEADERS float.h string.h stdlib.h stdarg.h)
 CHECK_INCLUDE_FILES("${REQUIRED_STDC_HEADERS}" STDC_HEADERS)
 
-CHECK_FUNCTION_EXISTS(tmpfile HAVE_TMPFILE)
-CHECK_FUNCTION_EXISTS(mkstemp HAVE_MKSTEMP)
-CHECK_FUNCTION_EXISTS(strerror HAVE_STRERROR)
-CHECK_FUNCTION_EXISTS(strerror HAVE_VPRINTF)
+SET (FUNCTIONS_TO_CHECK tmpfile mkstemp strerror vprintf)
+CHECK_MULTI_FUNCTIONS_EXISTS(${FUNCTIONS_TO_CHECK})
 
 SET (VERSION ${PACKAGE_VERSION})
 SET (PACKAGE_NAME ${PACKAGE})

File src/wml_backend/p2_mp4h/Common.cmake

 MACRO(CHECK_MULTI_INCLUDE_FILES)
   FOREACH(name ${ARGN})
     STRING(TOUPPER have_${name} SYMBOL_NAME)
-    STRING(REGEX REPLACE "." "_" SYMBOL_NAME ${SYMBOL_NAME})
+    STRING(REGEX REPLACE "\\." "_" SYMBOL_NAME ${SYMBOL_NAME})
     CHECK_INCLUDE_FILE(${name} ${SYMBOL_NAME})
   ENDFOREACH(name)
 ENDMACRO(CHECK_MULTI_INCLUDE_FILES)
+
+MACRO(CHECK_MULTI_FUNCTIONS_EXISTS)
+  FOREACH(name ${ARGN})
+    STRING(TOUPPER have_${name} SYMBOL_NAME)
+    CHECK_FUNCTION_EXISTS(${name} ${SYMBOL_NAME})
+  ENDFOREACH(name)
+ENDMACRO(CHECK_MULTI_FUNCTIONS_EXISTS)