Fix missing LLVM include directories on macOS
authorBrecht Van Lommel <brechtvanlommel@gmail.com>
Sat, 7 Sep 2019 16:08:33 +0000 (18:08 +0200)
committerBrecht Van Lommel <brechtvanlommel@gmail.com>
Sat, 7 Sep 2019 16:09:41 +0000 (18:09 +0200)
These are not used in master yet, but they are needed for the functions branch.

build_files/cmake/platform/platform_apple.cmake

index e79359e9f3bdee8fce9dcaf3762d67b9789ca799..249546dd21619c4972665e3364502d0e75342300 100644 (file)
@@ -322,7 +322,6 @@ endif()
 
 if(WITH_LLVM)
   set(LLVM_ROOT_DIR ${LIBDIR}/llvm)
-  set(LLVM_VERSION 3.4)
   if(EXISTS "${LLVM_ROOT_DIR}/bin/llvm-config")
     set(LLVM_CONFIG "${LLVM_ROOT_DIR}/bin/llvm-config")
   else()
@@ -334,6 +333,9 @@ if(WITH_LLVM)
   execute_process(COMMAND ${LLVM_CONFIG} --prefix
       OUTPUT_VARIABLE LLVM_ROOT_DIR
       OUTPUT_STRIP_TRAILING_WHITESPACE)
+  execute_process(COMMAND ${LLVM_CONFIG} --includedir
+      OUTPUT_VARIABLE LLVM_INCLUDE_DIRS
+      OUTPUT_STRIP_TRAILING_WHITESPACE)
   execute_process(COMMAND ${LLVM_CONFIG} --libdir
       OUTPUT_VARIABLE LLVM_LIBPATH
       OUTPUT_STRIP_TRAILING_WHITESPACE)