diff --git a/cmake/FindLibClang.cmake b/cmake/FindLibClang.cmake index bd8076599..c33d93036 100644 --- a/cmake/FindLibClang.cmake +++ b/cmake/FindLibClang.cmake @@ -50,10 +50,12 @@ include(FindPackageHandleStandardArgs) # Find Clang C API Library _libclang_generate_search_paths("/usr/lib/llvm-VERSION/lib/" LibClang_LIBRARY_PATHS) -find_library(LibClang_LIBRARY - NAMES clang - PATHS ${LibClang_LIBRARY_PATHS} /usr/lib # Use this path as a fallback -) +if(NOT LibClang_LIBRARY) + find_library(LibClang_LIBRARY + NAMES clang + PATHS ${LibClang_LIBRARY_PATHS} /usr/lib # Use this path as a fallback + ) +endif() # Find Clang C API Headers _libclang_generate_search_paths("/usr/lib/llvm-VERSION/include/clang-c" LibClang_INCLUDE_PATHS) @@ -68,10 +70,12 @@ set(LibClang_INCLUDE_HEADERS Platform.h ) -find_path(LibClang_INCLUDE_DIR - NAMES ${LibClang_INCLUDE_HEADERS} - PATHS ${LibClang_INCLUDE_PATHS} /usr/include/clang-c # Use this path as a fallback -) +if(NOT LibClang_INCLUDE_DIR) + find_path(LibClang_INCLUDE_DIR + NAMES ${LibClang_INCLUDE_HEADERS} + PATHS ${LibClang_INCLUDE_PATHS} /usr/include/clang-c # Use this path as a fallback + ) +endif() get_filename_component(LibClang_INCLUDE_DIR ${LibClang_INCLUDE_DIR} DIRECTORY) diff --git a/source/format/include/format/format_specifier.h b/source/format/include/format/format_specifier.h index 62c83a2e7..8a83081c9 100644 --- a/source/format/include/format/format_specifier.h +++ b/source/format/include/format/format_specifier.h @@ -101,7 +101,7 @@ extern "C" { #define FORMAT_PREFIX "z" #elif defined(FORMAT_64BIT) #if (defined(__APPLE__) && defined(__MACH__)) || defined(__MACOSX__) - #define FORMAT_PREFIX "ll" + #define FORMAT_PREFIX "l" #else #define FORMAT_PREFIX #endif