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:
Diffstat (limited to 'build_files/cmake/platform/platform_unix.cmake')
-rw-r--r--build_files/cmake/platform/platform_unix.cmake49
1 files changed, 29 insertions, 20 deletions
diff --git a/build_files/cmake/platform/platform_unix.cmake b/build_files/cmake/platform/platform_unix.cmake
index b2105a58a0a..97bd4981c22 100644
--- a/build_files/cmake/platform/platform_unix.cmake
+++ b/build_files/cmake/platform/platform_unix.cmake
@@ -73,7 +73,7 @@ if(EXISTS ${LIBDIR})
endif()
if(WITH_STATIC_LIBS)
- set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static-libstdc++")
+ string(APPEND CMAKE_EXE_LINKER_FLAGS " -static-libstdc++")
endif()
# Wrapper to prefer static libraries
@@ -264,6 +264,7 @@ endif()
if(WITH_OPENVDB)
find_package_wrapper(OpenVDB)
find_package_wrapper(Blosc)
+
if(NOT OPENVDB_FOUND)
set(WITH_OPENVDB OFF)
set(WITH_OPENVDB_BLOSC OFF)
@@ -274,6 +275,15 @@ if(WITH_OPENVDB)
endif()
endif()
+if(WITH_NANOVDB)
+ find_package_wrapper(NanoVDB)
+
+ if(NOT NANOVDB_FOUND)
+ set(WITH_NANOVDB OFF)
+ message(STATUS "NanoVDB not found, disabling it")
+ endif()
+endif()
+
if(WITH_ALEMBIC)
find_package_wrapper(Alembic)
@@ -434,15 +444,6 @@ if(WITH_TBB)
find_package_wrapper(TBB)
endif()
-if(WITH_GMP)
- find_package(GMP)
-
- if(NOT GMP_FOUND)
- set(WITH_GMP OFF)
- message(STATUS "GMP not found")
- endif()
-endif()
-
if(WITH_XR_OPENXR)
find_package(XR_OpenXR_SDK)
if(NOT XR_OPENXR_SDK_FOUND)
@@ -459,6 +460,14 @@ if(WITH_GMP)
endif()
endif()
+if(WITH_POTRACE)
+ find_package_wrapper(Potrace)
+ if(NOT POTRACE_FOUND)
+ message(WARNING "potrace not found, disabling WITH_POTRACE")
+ set(WITH_POTRACE OFF)
+ endif()
+endif()
+
if(EXISTS ${LIBDIR})
without_system_libs_end()
endif()
@@ -611,7 +620,7 @@ if(CMAKE_COMPILER_IS_GNUCC)
set(CMAKE_C_FLAGS_RELEASE "${GCC_EXTRA_FLAGS_RELEASE} ${CMAKE_C_FLAGS_RELEASE}")
set(CMAKE_C_FLAGS_RELWITHDEBINFO "${GCC_EXTRA_FLAGS_RELEASE} ${CMAKE_C_FLAGS_RELWITHDEBINFO}")
set(CMAKE_CXX_FLAGS_RELEASE "${GCC_EXTRA_FLAGS_RELEASE} ${CMAKE_CXX_FLAGS_RELEASE}")
- set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${GCC_EXTRA_FLAGS_RELEASE} ${CMAKE_CXX_FLAGS_RELWITHDEBINFO}")
+ string(PREPEND CMAKE_CXX_FLAGS_RELWITHDEBINFO "${GCC_EXTRA_FLAGS_RELEASE} ")
unset(GCC_EXTRA_FLAGS_RELEASE)
if(WITH_LINKER_GOLD)
@@ -619,8 +628,8 @@ if(CMAKE_COMPILER_IS_GNUCC)
COMMAND ${CMAKE_C_COMPILER} -fuse-ld=gold -Wl,--version
ERROR_QUIET OUTPUT_VARIABLE LD_VERSION)
if("${LD_VERSION}" MATCHES "GNU gold")
- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fuse-ld=gold")
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fuse-ld=gold")
+ string(APPEND CMAKE_C_FLAGS " -fuse-ld=gold")
+ string(APPEND CMAKE_CXX_FLAGS " -fuse-ld=gold")
else()
message(STATUS "GNU gold linker isn't available, using the default system linker.")
endif()
@@ -632,8 +641,8 @@ if(CMAKE_COMPILER_IS_GNUCC)
COMMAND ${CMAKE_C_COMPILER} -fuse-ld=lld -Wl,--version
ERROR_QUIET OUTPUT_VARIABLE LD_VERSION)
if("${LD_VERSION}" MATCHES "LLD")
- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fuse-ld=lld")
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fuse-ld=lld")
+ string(APPEND CMAKE_C_FLAGS " -fuse-ld=lld")
+ string(APPEND CMAKE_CXX_FLAGS " -fuse-ld=lld")
else()
message(STATUS "LLD linker isn't available, using the default system linker.")
endif()
@@ -658,12 +667,12 @@ elseif(CMAKE_C_COMPILER_ID MATCHES "Intel")
endif()
mark_as_advanced(XILD)
- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fp-model precise -prec_div -parallel")
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fp-model precise -prec_div -parallel")
+ string(APPEND CMAKE_C_FLAGS " -fp-model precise -prec_div -parallel")
+ string(APPEND CMAKE_CXX_FLAGS " -fp-model precise -prec_div -parallel")
- # set(PLATFORM_CFLAGS "${PLATFORM_CFLAGS} -diag-enable sc3")
+ # string(APPEND PLATFORM_CFLAGS " -diag-enable sc3")
set(PLATFORM_CFLAGS "-pipe -fPIC -funsigned-char -fno-strict-aliasing")
- set(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} -static-intel")
+ string(APPEND PLATFORM_LINKFLAGS " -static-intel")
endif()
# Avoid conflicts with Mesa llvmpipe, Luxrender, and other plug-ins that may
@@ -676,5 +685,5 @@ set(PLATFORM_LINKFLAGS
# browsers can't properly detect blender as an executable then. Still enabled
# for non-portable installs as typically used by Linux distributions.
if(WITH_INSTALL_PORTABLE)
- set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -no-pie")
+ string(APPEND CMAKE_EXE_LINKER_FLAGS " -no-pie")
endif()