Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens Verwiebe <info@jensverwiebe.de>2014-08-06 14:48:06 +0400
committerJens Verwiebe <info@jensverwiebe.de>2014-08-06 14:48:06 +0400
commit7ae187c5e42dd5de6dda59aae8d87f48df308195 (patch)
tree06ff7d9d5ac27903830feb1fbf03e43e869e7674 /CMakeLists.txt
parent9ece95de48cc89f6b4bae5fe0ebd2cbba6f134ff (diff)
OSX/cmake: allow for llvm dynamic builds too, but prefer static
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt9
1 files changed, 7 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4349105929d..98115e08d60 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -283,7 +283,11 @@ unset(PLATFORM_DEFAULT)
# LLVM
option(WITH_LLVM "Use LLVM" OFF)
-option(LLVM_STATIC "Link with LLVM static libraries" OFF)
+if(APPLE)
+ option(LLVM_STATIC "Link with LLVM static libraries" ON) # we prefer static llvm build on Apple, dyn build possible though
+else()
+ option(LLVM_STATIC "Link with LLVM static libraries" OFF)
+endif()
mark_as_advanced(LLVM_STATIC)
# disable for now, but plan to support on all platforms eventually
@@ -1862,7 +1866,6 @@ elseif(APPLE)
endif()
if(WITH_LLVM)
- set(LLVM_STATIC ON CACHE BOOL "ON" FORCE) # we use always the static libs default, else gives linking errors
set(LLVM_DIRECTORY ${LIBDIR}/llvm CACHE PATH "Path to the LLVM installation")
set(LLVM_VERSION "3.4" CACHE STRING "Version of LLVM to use")
if(EXISTS "${LLVM_DIRECTORY}/bin/llvm-config")
@@ -1892,6 +1895,8 @@ elseif(APPLE)
OUTPUT_VARIABLE LLVM_LIBRARY
OUTPUT_STRIP_TRAILING_WHITESPACE)
string(REPLACE " " ";" LLVM_LIBRARY ${LLVM_LIBRARY})
+ else()
+ set(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} -lLLVM-3.4")
endif()
else()
message(FATAL_ERROR "LLVM not found.")