CMake: check for LLVM static library by default
authorCampbell Barton <ideasman42@gmail.com>
Tue, 19 Jan 2016 01:37:26 +0000 (12:37 +1100)
committerCampbell Barton <ideasman42@gmail.com>
Tue, 19 Jan 2016 01:37:26 +0000 (12:37 +1100)
Even when static option isn't enabled, use the static library path if the dynamic library isn't found.

build_files/cmake/Modules/FindLLVM.cmake

index 43791c8df8c5655f42fe27bc0f1837ff1c880d1a..f5f3db3fc71e8e2a195d09f266bbdc9f9b871cfe 100644 (file)
@@ -64,7 +64,9 @@ if(LLVM_STATIC)
                     PATHS ${LLVM_LIBPATH})
 else()
        find_library(LLVM_LIBRARY
-                    NAMES LLVM-${LLVM_VERSION}
+                    NAMES
+                      LLVM-${LLVM_VERSION}
+                      LLVMAnalysis  # check for the static library as a fall-back
                     PATHS ${LLVM_LIBPATH})
 endif()