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:
-rw-r--r--build_files/cmake/Modules/FindOpenCOLLADA.cmake2
-rw-r--r--build_files/cmake/Modules/FindXML2.cmake134
-rw-r--r--source/creator/CMakeLists.txt12
3 files changed, 65 insertions, 83 deletions
diff --git a/build_files/cmake/Modules/FindOpenCOLLADA.cmake b/build_files/cmake/Modules/FindOpenCOLLADA.cmake
index a9a1d544507..0c8d8c8d841 100644
--- a/build_files/cmake/Modules/FindOpenCOLLADA.cmake
+++ b/build_files/cmake/Modules/FindOpenCOLLADA.cmake
@@ -119,8 +119,8 @@ FOREACH(COMPONENT ${_opencollada_FIND_STATIC_COMPONENTS})
# Ubuntu ppa needs this.
lib64/opencollada lib/opencollada
)
+ MARK_AS_ADVANCED(OPENCOLLADA_${UPPERCOMPONENT}_LIBRARY)
IF(OPENCOLLADA_${UPPERCOMPONENT}_LIBRARY)
- MARK_AS_ADVANCED(OPENCOLLADA_${UPPERCOMPONENT}_LIBRARY)
LIST(APPEND _opencollada_LIBRARIES "${OPENCOLLADA_${UPPERCOMPONENT}_LIBRARY}")
ENDIF()
ENDFOREACH()
diff --git a/build_files/cmake/Modules/FindXML2.cmake b/build_files/cmake/Modules/FindXML2.cmake
index e9f9fb3ca74..40cc332fb88 100644
--- a/build_files/cmake/Modules/FindXML2.cmake
+++ b/build_files/cmake/Modules/FindXML2.cmake
@@ -1,88 +1,68 @@
-# - Try to find XML2
-# Once done this will define
+# - Find XML2 library
+# Find the native XML2 includes and library
+# This module defines
+# XML2_INCLUDE_DIRS, where to find xml2.h, Set when
+# XML2_INCLUDE_DIR is found.
+# XML2_LIBRARIES, libraries to link against to use XML2.
+# XML2_ROOT_DIR, The base directory to search for XML2.
+# This can also be an environment variable.
+# XML2_FOUND, If false, do not try to use XML2.
#
-# XML2_FOUND - system has XML2
-# XML2_INCLUDE_DIRS - the XML2 include directory
-# XML2_LIBRARIES - Link these to use XML2
-# XML2_DEFINITIONS - Compiler switches required for using XML2
-#
-# Copyright (c) 2008 Andreas Schneider <mail@cynapses.org>
+# also defined, but not for general use are
+# XML2_LIBRARY, where to find the XML2 library.
+
+#=============================================================================
+# Copyright 2011 Blender Foundation.
#
-# Redistribution and use is allowed according to the terms of the New
-# BSD license.
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# If XML2_ROOT_DIR was defined in the environment, use it.
+IF(NOT XML2_ROOT_DIR AND NOT $ENV{XML2_ROOT_DIR} STREQUAL "")
+ SET(XML2_ROOT_DIR $ENV{XML2_ROOT_DIR})
+ENDIF()
-if (XML2_LIBRARIES AND XML2_INCLUDE_DIRS)
- # in cache already
- set(XML2_FOUND TRUE)
-else (XML2_LIBRARIES AND XML2_INCLUDE_DIRS)
- # use pkg-config to get the directories and then use these values
- # in the FIND_PATH() and FIND_LIBRARY() calls
- if (${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} EQUAL 4)
- include(UsePkgConfig)
- pkgconfig(libxml-2.0 _XML2_INCLUDEDIR _XML2_LIBDIR _XML2_LDFLAGS _XML2_CFLAGS)
- else (${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} EQUAL 4)
- find_package(PkgConfig)
- if (PKG_CONFIG_FOUND)
- pkg_check_modules(_XML2 libxml-2.0)
- endif (PKG_CONFIG_FOUND)
- endif (${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} EQUAL 4)
- find_path(XML2_INCLUDE_DIR
- NAMES
- libxml/xpath.h
- PATHS
- ${_XML2_INCLUDEDIR}
- /usr/include
- /usr/local/include
- /opt/local/include
- /sw/include
- PATH_SUFFIXES
- libxml2
- )
-
- find_library(XML2_LIBRARY
- NAMES
- xml2
- PATHS
- ${_XML2_LIBDIR}
- /usr/lib
- /usr/local/lib
- /opt/local/lib
- /sw/lib
- )
+SET(_xml2_SEARCH_DIRS
+ ${XML2_ROOT_DIR}
+ /usr/local
+ /sw # Fink
+ /opt/local # DarwinPorts
+ /opt/csw # Blastwave
+)
- if (XML2_LIBRARY)
- set(XML2_FOUND TRUE)
- endif (XML2_LIBRARY)
+FIND_PATH(XML2_INCLUDE_DIR libxml2/libxml/xpath.h
+ HINTS
+ ${_xml2_SEARCH_DIRS}
+ PATH_SUFFIXES
+ include
+)
- set(XML2_INCLUDE_DIRS
- ${XML2_INCLUDE_DIR}
+FIND_LIBRARY(XML2_LIBRARY
+ NAMES
+ xml2
+ HINTS
+ ${_xml2_SEARCH_DIRS}
+ PATH_SUFFIXES
+ lib64 lib
)
- if (XML2_FOUND)
- set(XML2_LIBRARIES
- ${XML2_LIBRARIES}
- ${XML2_LIBRARY}
- )
- endif (XML2_FOUND)
-
- if (XML2_INCLUDE_DIRS AND XML2_LIBRARIES)
- set(XML2_FOUND TRUE)
- endif (XML2_INCLUDE_DIRS AND XML2_LIBRARIES)
-
- if (XML2_FOUND)
- if (NOT XML2_FIND_QUIETLY)
- message(STATUS "Found XML2: ${XML2_LIBRARIES}")
- endif (NOT XML2_FIND_QUIETLY)
- else (XML2_FOUND)
- if (XML2_FIND_REQUIRED)
- message(FATAL_ERROR "Could not find XML2")
- endif (XML2_FIND_REQUIRED)
- endif (XML2_FOUND)
-
- # show the XML2_INCLUDE_DIRS and XML2_LIBRARIES variables only in the advanced view
- mark_as_advanced(XML2_INCLUDE_DIRS XML2_LIBRARIES)
+# handle the QUIETLY and REQUIRED arguments and set XML2_FOUND to TRUE if
+# all listed variables are TRUE
+INCLUDE(FindPackageHandleStandardArgs)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(XML2 DEFAULT_MSG
+ XML2_LIBRARY XML2_INCLUDE_DIR)
-endif (XML2_LIBRARIES AND XML2_INCLUDE_DIRS)
+IF(XML2_FOUND)
+ SET(XML2_LIBRARIES ${XML2_LIBRARY})
+ SET(XML2_INCLUDE_DIRS ${XML2_INCLUDE_DIR})
+ENDIF(XML2_FOUND)
+MARK_AS_ADVANCED(
+ XML2_INCLUDE_DIR
+ XML2_LIBRARY
+)
diff --git a/source/creator/CMakeLists.txt b/source/creator/CMakeLists.txt
index 93236f93ceb..2d2e6f8ecf9 100644
--- a/source/creator/CMakeLists.txt
+++ b/source/creator/CMakeLists.txt
@@ -712,7 +712,12 @@ add_dependencies(blender makesdna)
get_property(BLENDER_LINK_LIBS GLOBAL PROPERTY BLENDER_LINK_LIBS)
-set(BLENDER_LINK_LIBS bf_nodes ${BLENDER_LINK_LIBS} bf_windowmanager bf_render)
+set(BLENDER_LINK_LIBS
+ bf_nodes
+ ${BLENDER_LINK_LIBS}
+ bf_windowmanager
+ bf_render
+)
if(WITH_MOD_FLUID)
list(APPEND BLENDER_LINK_LIBS bf_intern_elbeem)
@@ -797,8 +802,8 @@ endif()
bf_intern_smoke
extern_minilzo
extern_lzma
- extern_recastnavigation
ge_logic_ketsji
+ extern_recastnavigation
ge_phys_common
ge_logic
ge_rasterizer
@@ -806,7 +811,6 @@ endif()
ge_logic_expressions
ge_scenegraph
ge_logic_network
- bf_python # duplicate for BPY_driver_exec
ge_logic_ngnetwork
extern_bullet
ge_logic_loopbacknetwork
@@ -819,8 +823,6 @@ endif()
bf_blenfont
bf_intern_audaspace
bf_intern_mikktspace
- extern_recastnavigation
- bf_editor_util # --- BAD LEVEL CALL HERE --- XXX, this should be removed before release!
)
if(WITH_MOD_CLOTH_ELTOPO)