cmake.patch 1.2 KB

123456789101112131415161718192021222324252627282930313233
  1. --- CMakeLists.txt.orig 2020-11-03 14:54:48.786455348 -0800
  2. +++ CMakeLists.txt 2020-11-03 15:00:16.067445503 -0800
  3. @@ -197,7 +197,7 @@
  4. check_symbol_exists(strlcpy "string.h" HAVE_STRLCPY)
  5. check_symbol_exists(program_invocation_name "errno.h" HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME)
  6. if (HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME)
  7. - add_compile_definitions($<$<OR:$<COMPILE_LANGUAGE:C>,$<COMPILE_LANGUAGE:CXX>>:_GNU_SOURCE=1>)
  8. + add_definitions(-D_GNU_SOURCE=1)
  9. endif()
  10. check_symbol_exists(__printflike "bsd/sys/cdefs.h" HAVE_PRINTFLIKE)
  11. @@ -217,9 +217,9 @@
  12. endif()
  13. if(dtrace_EXECUTABLE)
  14. - add_compile_definitions($<$<OR:$<COMPILE_LANGUAGE:C>,$<COMPILE_LANGUAGE:CXX>>:DISPATCH_USE_DTRACE=1>)
  15. + add_definitions(-DDISPATCH_USE_DTRACE=1)
  16. else()
  17. - add_compile_definitions($<$<OR:$<COMPILE_LANGUAGE:C>,$<COMPILE_LANGUAGE:CXX>>:DISPATCH_USE_DTRACE=0>)
  18. + add_definitions(-DDISPATCH_USE_DTRACE=0)
  19. endif()
  20. find_program(leaks_EXECUTABLE leaks)
  21. @@ -252,7 +252,7 @@
  22. configure_file("${PROJECT_SOURCE_DIR}/cmake/config.h.in"
  23. "${PROJECT_BINARY_DIR}/config/config_ac.h")
  24. -add_compile_definitions($<$<OR:$<COMPILE_LANGUAGE:C>,$<COMPILE_LANGUAGE:CXX>>:HAVE_CONFIG_H>)
  25. +add_definitions(-DHAVE_CONFIG_H)
  26. if(ENABLE_SWIFT)