[Bf-blender-cvs] [786dd666aab] pcre: CMake

Brecht Van Lommel noreply at git.blender.org
Fri Mar 27 14:25:03 CET 2020


Commit: 786dd666aab0475ca4b99c188fae4c0c496ab089
Author: Brecht Van Lommel
Date:   Fri Mar 27 14:24:52 2020 +0100
Branches: pcre
https://developer.blender.org/rB786dd666aab0475ca4b99c188fae4c0c496ab089

CMake

===================================================================

M	build_files/buildbot/config/blender_linux.cmake
M	build_files/cmake/platform/platform_apple.cmake
M	build_files/cmake/platform/platform_unix.cmake

===================================================================

diff --git a/build_files/buildbot/config/blender_linux.cmake b/build_files/buildbot/config/blender_linux.cmake
index c970ae4c9c1..29004654807 100644
--- a/build_files/buildbot/config/blender_linux.cmake
+++ b/build_files/buildbot/config/blender_linux.cmake
@@ -7,9 +7,6 @@ message(STATUS "Building in CentOS 7 64bit environment")
 set(LIBDIR_NAME "linux_centos7_x86_64")
 set(WITH_CXX11_ABI           OFF CACHE BOOL "" FORCE)
 
-# Default to only build Blender
-set(WITH_BLENDER             ON  CACHE BOOL "" FORCE)
-
 # ######## Linux-specific build options ########
 # Options which are specific to Linux-only platforms
 
@@ -20,12 +17,6 @@ set(WITH_DOC_MANPAGE         OFF CACHE BOOL "" FORCE)
 
 set(WITH_JACK_DYNLOAD        ON  CACHE BOOL "" FORCE)
 set(WITH_SDL_DYNLOAD         ON  CACHE BOOL "" FORCE)
-set(WITH_SYSTEM_GLEW         OFF CACHE BOOL "" FORCE)
-
-set(WITH_OPENMP_STATIC       ON  CACHE BOOL "" FORCE)
-
-set(WITH_PYTHON_INSTALL_NUMPY    ON CACHE BOOL "" FORCE)
-set(WITH_PYTHON_INSTALL_REQUESTS ON CACHE BOOL "" FORCE)
 
 # ######## Release environment specific settings ########
 
@@ -33,13 +24,5 @@ set(LIBDIR "${CMAKE_CURRENT_LIST_DIR}/../../../../lib/${LIBDIR_NAME}" CACHE STRI
 
 # Platform specific configuration, to ensure static linking against everything.
 
-set(Boost_USE_STATIC_LIBS    ON CACHE BOOL "" FORCE)
-
-# We need to link OpenCOLLADA against PCRE library. Even though it is not installed
-# on /usr, we do not really care -- all we care is PCRE_FOUND be TRUE and its
-# library pointing to a valid one.
-set(PCRE_INCLUDE_DIR          "/usr/include"                        CACHE STRING "" FORCE)
-set(PCRE_LIBRARY              "${LIBDIR}/opencollada/lib/libpcre.a" CACHE STRING "" FORCE)
-
 # Additional linking libraries
 set(CMAKE_EXE_LINKER_FLAGS   "-lrt -static-libstdc++ -no-pie"  CACHE STRING "" FORCE)
diff --git a/build_files/cmake/platform/platform_apple.cmake b/build_files/cmake/platform/platform_apple.cmake
index 11889fc7a87..eb35ab4e134 100644
--- a/build_files/cmake/platform/platform_apple.cmake
+++ b/build_files/cmake/platform/platform_apple.cmake
@@ -222,12 +222,10 @@ if(WITH_OPENCOLLADA)
     -lMathMLSolver
     -lGeneratedSaxParser
     -lbuffer -lftoa -lUTF
-    ${OPENCOLLADA_LIBPATH}/libxml2.a
   )
-  # PCRE is bundled with openCollada
-  # set(PCRE ${LIBDIR}/pcre)
-  # set(PCRE_LIBPATH ${PCRE}/lib)
+  # PCRE and XML2 are bundled with OpenCollada.
   set(PCRE_LIBRARIES pcre)
+  set(XML2_LIBRARIES xml2)
 endif()
 
 if(WITH_SDL)
diff --git a/build_files/cmake/platform/platform_unix.cmake b/build_files/cmake/platform/platform_unix.cmake
index dcb6b9d34f9..399d87c5ac2 100644
--- a/build_files/cmake/platform/platform_unix.cmake
+++ b/build_files/cmake/platform/platform_unix.cmake
@@ -195,8 +195,14 @@ endif()
 if(WITH_OPENCOLLADA)
   find_package_wrapper(OpenCOLLADA)
   if(OPENCOLLADA_FOUND)
-    find_package_wrapper(XML2)
-    find_package_wrapper(PCRE)
+    if(WITH_STATIC_LIBS)
+      # PCRE and XML2 are bundled with OpenCollada.
+      set(PCRE_LIBRARIES pcre)
+      set(XML2_LIBRARIES xml2)
+    else()
+      find_package_wrapper(XML2)
+      find_package_wrapper(PCRE)
+    endif()
   else()
     set(WITH_OPENCOLLADA OFF)
   endif()



More information about the Bf-blender-cvs mailing list