forked from bartvdbraak/blender
- removed some duplicate library links from cmake (which were needed because of bad level calls)
- FindXML2 we had copied from another project was always running and not using cached value, rewrote based on template used for most of our other find modules which makes use of 'FindPackageHandleStandardArgs' - mark statuc collada libs as advanced.
This commit is contained in:
parent
1741269d30
commit
21253def7c
@ -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()
|
||||
|
@ -1,88 +1,68 @@
|
||||
# - Try to find XML2
|
||||
# Once done this will define
|
||||
#
|
||||
# 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>
|
||||
#
|
||||
# Redistribution and use is allowed according to the terms of the New
|
||||
# BSD license.
|
||||
# - 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.
|
||||
#
|
||||
# also defined, but not for general use are
|
||||
# XML2_LIBRARY, where to find the XML2 library.
|
||||
|
||||
#=============================================================================
|
||||
# Copyright 2011 Blender Foundation.
|
||||
#
|
||||
# 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_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
|
||||
# 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()
|
||||
|
||||
SET(_xml2_SEARCH_DIRS
|
||||
${XML2_ROOT_DIR}
|
||||
/usr/local
|
||||
/sw # Fink
|
||||
/opt/local # DarwinPorts
|
||||
/opt/csw # Blastwave
|
||||
)
|
||||
|
||||
FIND_PATH(XML2_INCLUDE_DIR libxml2/libxml/xpath.h
|
||||
HINTS
|
||||
${_xml2_SEARCH_DIRS}
|
||||
PATH_SUFFIXES
|
||||
include
|
||||
)
|
||||
|
||||
FIND_LIBRARY(XML2_LIBRARY
|
||||
NAMES
|
||||
xml2
|
||||
HINTS
|
||||
${_xml2_SEARCH_DIRS}
|
||||
PATH_SUFFIXES
|
||||
lib64 lib
|
||||
)
|
||||
|
||||
find_library(XML2_LIBRARY
|
||||
NAMES
|
||||
xml2
|
||||
PATHS
|
||||
${_XML2_LIBDIR}
|
||||
/usr/lib
|
||||
/usr/local/lib
|
||||
/opt/local/lib
|
||||
/sw/lib
|
||||
)
|
||||
# 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)
|
||||
|
||||
if (XML2_LIBRARY)
|
||||
set(XML2_FOUND TRUE)
|
||||
endif (XML2_LIBRARY)
|
||||
|
||||
set(XML2_INCLUDE_DIRS
|
||||
${XML2_INCLUDE_DIR}
|
||||
)
|
||||
|
||||
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)
|
||||
|
||||
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
|
||||
)
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user