[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [37696] branches/cycles: Cycles: svn merge -r37333:37694 https://svn.blender.org/svnroot/bf-blender/trunk

Brecht Van Lommel brechtvanlommel at pandora.be
Tue Jun 21 17:47:18 CEST 2011


Revision: 37696
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=37696
Author:   blendix
Date:     2011-06-21 15:47:18 +0000 (Tue, 21 Jun 2011)
Log Message:
-----------
Cycles: svn merge -r37333:37694 https://svn.blender.org/svnroot/bf-blender/trunk

Revision Links:
--------------
    http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=37333

Modified Paths:
--------------
    branches/cycles/CMakeLists.txt
    branches/cycles/build_files/cmake/cmake_consistency_check.py
    branches/cycles/build_files/cmake/example_scripts/cmake_linux_install.sh
    branches/cycles/build_files/cmake/macros.cmake
    branches/cycles/build_files/scons/config/linux2-config.py
    branches/cycles/build_files/scons/config/win32-vc-config.py
    branches/cycles/build_files/scons/config/win64-vc-config.py
    branches/cycles/doc/blender_file_format/BlendFileDnaExporter_25.py
    branches/cycles/doc/blender_file_format/BlendFileReader.py
    branches/cycles/doc/python_api/blender-org/layout.html
    branches/cycles/doc/python_api/rst/bge.logic.rst
    branches/cycles/doc/python_api/rst/bge.types.rst
    branches/cycles/extern/libopenjpeg/CMakeLists.txt
    branches/cycles/intern/audaspace/CMakeLists.txt
    branches/cycles/intern/elbeem/extern/elbeem.h
    branches/cycles/intern/elbeem/intern/simulation_object.cpp
    branches/cycles/intern/elbeem/intern/solver_class.h
    branches/cycles/intern/elbeem/intern/solver_init.cpp
    branches/cycles/intern/elbeem/intern/solver_interface.h
    branches/cycles/intern/smoke/CMakeLists.txt
    branches/cycles/release/scripts/modules/bpy_extras/mesh_utils.py
    branches/cycles/release/scripts/modules/bpy_extras/view3d_utils.py
    branches/cycles/release/scripts/modules/bpy_types.py
    branches/cycles/release/scripts/modules/console/complete_namespace.py
    branches/cycles/release/scripts/modules/console/intellisense.py
    branches/cycles/release/scripts/modules/console_python.py
    branches/cycles/release/scripts/modules/rna_prop_ui.py
    branches/cycles/release/scripts/startup/bl_operators/mesh.py
    branches/cycles/release/scripts/startup/bl_operators/nla.py
    branches/cycles/release/scripts/startup/bl_operators/object_quick_effects.py
    branches/cycles/release/scripts/startup/bl_ui/properties_data_curve.py
    branches/cycles/release/scripts/startup/bl_ui/properties_data_metaball.py
    branches/cycles/release/scripts/startup/bl_ui/properties_data_modifier.py
    branches/cycles/release/scripts/startup/bl_ui/properties_physics_fluid.py
    branches/cycles/release/scripts/startup/bl_ui/properties_render.py
    branches/cycles/release/scripts/startup/bl_ui/space_info.py
    branches/cycles/release/scripts/startup/bl_ui/space_sequencer.py
    branches/cycles/release/scripts/startup/bl_ui/space_userpref.py
    branches/cycles/release/scripts/startup/bl_ui/space_view3d.py
    branches/cycles/release/text/GPL-license.txt
    branches/cycles/release/text/readme.html
    branches/cycles/source/blender/blenkernel/BKE_action.h
    branches/cycles/source/blender/blenkernel/BKE_depsgraph.h
    branches/cycles/source/blender/blenkernel/BKE_displist.h
    branches/cycles/source/blender/blenkernel/BKE_particle.h
    branches/cycles/source/blender/blenkernel/CMakeLists.txt
    branches/cycles/source/blender/blenkernel/depsgraph_private.h
    branches/cycles/source/blender/blenkernel/intern/action.c
    branches/cycles/source/blender/blenkernel/intern/anim.c
    branches/cycles/source/blender/blenkernel/intern/armature.c
    branches/cycles/source/blender/blenkernel/intern/blender.c
    branches/cycles/source/blender/blenkernel/intern/bvhutils.c
    branches/cycles/source/blender/blenkernel/intern/constraint.c
    branches/cycles/source/blender/blenkernel/intern/depsgraph.c
    branches/cycles/source/blender/blenkernel/intern/displist.c
    branches/cycles/source/blender/blenkernel/intern/multires.c
    branches/cycles/source/blender/blenkernel/intern/node.c
    branches/cycles/source/blender/blenkernel/intern/object.c
    branches/cycles/source/blender/blenkernel/intern/particle_system.c
    branches/cycles/source/blender/blenkernel/intern/sca.c
    branches/cycles/source/blender/blenkernel/intern/scene.c
    branches/cycles/source/blender/blenkernel/intern/seqeffects.c
    branches/cycles/source/blender/blenlib/CMakeLists.txt
    branches/cycles/source/blender/blenlib/intern/math_base_inline.c
    branches/cycles/source/blender/blenloader/intern/readfile.c
    branches/cycles/source/blender/blenpluginapi/CMakeLists.txt
    branches/cycles/source/blender/blenpluginapi/iff.h
    branches/cycles/source/blender/collada/AnimationImporter.cpp
    branches/cycles/source/blender/collada/ArmatureImporter.cpp
    branches/cycles/source/blender/collada/CMakeLists.txt
    branches/cycles/source/blender/collada/DocumentImporter.cpp
    branches/cycles/source/blender/collada/DocumentImporter.h
    branches/cycles/source/blender/collada/LightExporter.cpp
    branches/cycles/source/blender/collada/MeshImporter.cpp
    branches/cycles/source/blender/collada/SkinInfo.cpp
    branches/cycles/source/blender/collada/collada_internal.cpp
    branches/cycles/source/blender/editors/datafiles/startup.blend.c
    branches/cycles/source/blender/editors/include/UI_interface.h
    branches/cycles/source/blender/editors/interface/interface.c
    branches/cycles/source/blender/editors/interface/interface_layout.c
    branches/cycles/source/blender/editors/interface/interface_regions.c
    branches/cycles/source/blender/editors/interface/interface_templates.c
    branches/cycles/source/blender/editors/interface/interface_widgets.c
    branches/cycles/source/blender/editors/interface/resources.c
    branches/cycles/source/blender/editors/interface/view2d.c
    branches/cycles/source/blender/editors/mesh/editmesh_mods.c
    branches/cycles/source/blender/editors/mesh/editmesh_tools.c
    branches/cycles/source/blender/editors/mesh/mesh_data.c
    branches/cycles/source/blender/editors/object/object_add.c
    branches/cycles/source/blender/editors/object/object_bake.c
    branches/cycles/source/blender/editors/object/object_modifier.c
    branches/cycles/source/blender/editors/object/object_relations.c
    branches/cycles/source/blender/editors/physics/particle_edit.c
    branches/cycles/source/blender/editors/physics/physics_fluid.c
    branches/cycles/source/blender/editors/render/CMakeLists.txt
    branches/cycles/source/blender/editors/render/render_internal.c
    branches/cycles/source/blender/editors/screen/screen_ops.c
    branches/cycles/source/blender/editors/sculpt_paint/sculpt.c
    branches/cycles/source/blender/editors/space_buttons/buttons_intern.h
    branches/cycles/source/blender/editors/space_buttons/buttons_ops.c
    branches/cycles/source/blender/editors/space_buttons/space_buttons.c
    branches/cycles/source/blender/editors/space_console/console_draw.c
    branches/cycles/source/blender/editors/space_console/console_ops.c
    branches/cycles/source/blender/editors/space_file/file_draw.c
    branches/cycles/source/blender/editors/space_file/file_ops.c
    branches/cycles/source/blender/editors/space_file/filelist.c
    branches/cycles/source/blender/editors/space_file/filesel.c
    branches/cycles/source/blender/editors/space_image/image_buttons.c
    branches/cycles/source/blender/editors/space_logic/logic_window.c
    branches/cycles/source/blender/editors/space_node/node_draw.c
    branches/cycles/source/blender/editors/space_node/node_edit.c
    branches/cycles/source/blender/editors/space_node/node_intern.h
    branches/cycles/source/blender/editors/space_node/space_node.c
    branches/cycles/source/blender/editors/space_outliner/outliner.c
    branches/cycles/source/blender/editors/space_sequencer/sequencer_add.c
    branches/cycles/source/blender/editors/space_sequencer/sequencer_edit.c
    branches/cycles/source/blender/editors/space_view3d/drawanimviz.c
    branches/cycles/source/blender/editors/space_view3d/drawarmature.c
    branches/cycles/source/blender/editors/space_view3d/drawobject.c
    branches/cycles/source/blender/editors/space_view3d/view3d_draw.c
    branches/cycles/source/blender/editors/space_view3d/view3d_intern.h
    branches/cycles/source/blender/editors/space_view3d/view3d_view.c
    branches/cycles/source/blender/editors/transform/transform.h
    branches/cycles/source/blender/editors/transform/transform_conversions.c
    branches/cycles/source/blender/editors/transform/transform_generics.c
    branches/cycles/source/blender/editors/transform/transform_snap.c
    branches/cycles/source/blender/editors/util/ed_util.c
    branches/cycles/source/blender/editors/util/undo.c
    branches/cycles/source/blender/editors/uvedit/uvedit_unwrap_ops.c
    branches/cycles/source/blender/gpu/GPU_draw.h
    branches/cycles/source/blender/gpu/intern/gpu_draw.c
    branches/cycles/source/blender/gpu/intern/gpu_material.c
    branches/cycles/source/blender/imbuf/CMakeLists.txt
    branches/cycles/source/blender/imbuf/IMB_imbuf.h
    branches/cycles/source/blender/imbuf/intern/openexr/CMakeLists.txt
    branches/cycles/source/blender/imbuf/intern/openexr/openexr_api.cpp
    branches/cycles/source/blender/imbuf/intern/rectop.c
    branches/cycles/source/blender/imbuf/intern/util.c
    branches/cycles/source/blender/makesdna/DNA_actuator_types.h
    branches/cycles/source/blender/makesdna/DNA_object_fluidsim.h
    branches/cycles/source/blender/makesdna/DNA_object_types.h
    branches/cycles/source/blender/makesdna/DNA_scene_types.h
    branches/cycles/source/blender/makesdna/DNA_space_types.h
    branches/cycles/source/blender/makesdna/DNA_userdef_types.h
    branches/cycles/source/blender/makesdna/intern/makesdna.c
    branches/cycles/source/blender/makesrna/RNA_access.h
    branches/cycles/source/blender/makesrna/intern/CMakeLists.txt
    branches/cycles/source/blender/makesrna/intern/rna_access.c
    branches/cycles/source/blender/makesrna/intern/rna_actuator.c
    branches/cycles/source/blender/makesrna/intern/rna_camera.c
    branches/cycles/source/blender/makesrna/intern/rna_controller.c
    branches/cycles/source/blender/makesrna/intern/rna_fluidsim.c
    branches/cycles/source/blender/makesrna/intern/rna_group.c
    branches/cycles/source/blender/makesrna/intern/rna_internal_types.h
    branches/cycles/source/blender/makesrna/intern/rna_object.c
    branches/cycles/source/blender/makesrna/intern/rna_scene.c
    branches/cycles/source/blender/makesrna/intern/rna_texture.c
    branches/cycles/source/blender/makesrna/intern/rna_userdef.c
    branches/cycles/source/blender/modifiers/intern/MOD_explode.c
    branches/cycles/source/blender/modifiers/intern/MOD_fluidsim_util.c
    branches/cycles/source/blender/modifiers/intern/MOD_mask.c
    branches/cycles/source/blender/nodes/intern/CMP_nodes/CMP_math.c
    branches/cycles/source/blender/nodes/intern/SHD_nodes/SHD_material.c
    branches/cycles/source/blender/python/generic/IDProp.c
    branches/cycles/source/blender/python/generic/IDProp.h
    branches/cycles/source/blender/python/generic/mathutils_Vector.c
    branches/cycles/source/blender/python/generic/py_capi_utils.c
    branches/cycles/source/blender/python/generic/py_capi_utils.h
    branches/cycles/source/blender/python/intern/CMakeLists.txt
    branches/cycles/source/blender/python/intern/bpy_interface.c
    branches/cycles/source/blender/python/intern/bpy_props.c
    branches/cycles/source/blender/python/intern/bpy_rna.c
    branches/cycles/source/blender/python/intern/bpy_rna_array.c
    branches/cycles/source/blender/python/intern/bpy_util.c
    branches/cycles/source/blender/quicktime/CMakeLists.txt
    branches/cycles/source/blender/render/CMakeLists.txt
    branches/cycles/source/blender/render/extern/include/RE_pipeline.h
    branches/cycles/source/blender/render/extern/include/RE_shader_ext.h
    branches/cycles/source/blender/render/intern/include/rayobject.h
    branches/cycles/source/blender/render/intern/include/render_types.h
    branches/cycles/source/blender/render/intern/source/convertblender.c
    branches/cycles/source/blender/render/intern/source/envmap.c
    branches/cycles/source/blender/render/intern/source/imagetexture.c
    branches/cycles/source/blender/render/intern/source/pipeline.c
    branches/cycles/source/blender/render/intern/source/pixelshading.c
    branches/cycles/source/blender/render/intern/source/rayshade.c
    branches/cycles/source/blender/render/intern/source/render_texture.c
    branches/cycles/source/blender/render/intern/source/rendercore.c
    branches/cycles/source/blender/render/intern/source/renderdatabase.c
    branches/cycles/source/blender/render/intern/source/shadeinput.c
    branches/cycles/source/blender/render/intern/source/shadeoutput.c
    branches/cycles/source/blender/render/intern/source/strand.c
    branches/cycles/source/blender/render/intern/source/sunsky.c
    branches/cycles/source/blender/render/intern/source/zbuf.c
    branches/cycles/source/blender/windowmanager/CMakeLists.txt
    branches/cycles/source/blender/windowmanager/intern/wm_init_exit.c
    branches/cycles/source/blender/windowmanager/intern/wm_operators.c
    branches/cycles/source/blenderplayer/CMakeLists.txt
    branches/cycles/source/blenderplayer/bad_level_call_stubs/CMakeLists.txt
    branches/cycles/source/creator/CMakeLists.txt
    branches/cycles/source/creator/creator.c
    branches/cycles/source/gameengine/Converter/BL_ActionActuator.cpp
    branches/cycles/source/gameengine/Converter/KX_ConvertActuators.cpp
    branches/cycles/source/gameengine/GameLogic/SCA_2DFilterActuator.cpp
    branches/cycles/source/gameengine/GameLogic/SCA_2DFilterActuator.h
    branches/cycles/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp
    branches/cycles/source/gameengine/Ketsji/BL_Texture.cpp
    branches/cycles/source/gameengine/Ketsji/KX_Camera.cpp
    branches/cycles/source/gameengine/Ketsji/KX_CameraActuator.cpp
    branches/cycles/source/gameengine/Ketsji/KX_CameraActuator.h
    branches/cycles/source/gameengine/Physics/Bullet/CcdPhysicsController.h
    branches/cycles/source/gameengine/VideoTexture/CMakeLists.txt
    branches/cycles/source/tests/CMakeLists.txt
    branches/cycles/source/tests/bl_load_py_modules.py

Added Paths:
-----------
    branches/cycles/build_files/cmake/Modules/FindFftw3.cmake
    branches/cycles/build_files/cmake/Modules/FindJack.cmake
    branches/cycles/build_files/cmake/Modules/FindJeMalloc.cmake
    branches/cycles/build_files/cmake/Modules/FindOpenEXR.cmake
    branches/cycles/build_files/cmake/Modules/FindOpenJPEG.cmake
    branches/cycles/build_files/cmake/Modules/FindPythonLibsUnix.cmake
    branches/cycles/build_files/cmake/Modules/FindSamplerate.cmake
    branches/cycles/build_files/cmake/Modules/FindSndFile.cmake
    branches/cycles/doc/python_api/examples/bpy.props.4.py
    branches/cycles/source/blender/python/intern/bpy_intern_string.c
    branches/cycles/source/blender/python/intern/bpy_intern_string.h

Removed Paths:
-------------
    branches/cycles/build_files/cmake/FindPythonLibsUnix.cmake

Property Changed:
----------------
    branches/cycles/
    branches/cycles/source/blender/editors/datafiles/startup.blend.c
    branches/cycles/source/blender/editors/render/render_update.c
    branches/cycles/source/blender/editors/uvedit/uvedit_buttons.c
    branches/cycles/source/blender/python/intern/


Property changes on: branches/cycles
___________________________________________________________________
Modified: svn:mergeinfo
   - /trunk/blender:36353-37333
   + /trunk/blender:36353-37694

Modified: branches/cycles/CMakeLists.txt
===================================================================
--- branches/cycles/CMakeLists.txt	2011-06-21 15:28:13 UTC (rev 37695)
+++ branches/cycles/CMakeLists.txt	2011-06-21 15:47:18 UTC (rev 37696)
@@ -49,8 +49,13 @@
 
 cmake_minimum_required(VERSION 2.8)
 
+if(NOT EXECUTABLE_OUTPUT_PATH)
+	set(FIRST_RUN "TRUE")
+endif()
+
+
 # this starts out unset
-set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/build_files/cmake/Modules/")
+list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/build_files/cmake/Modules")
 
 # quiet output for Makefiles, 'make -s' helps too
 # set_property(GLOBAL PROPERTY RULE_MESSAGES OFF)
@@ -228,9 +233,6 @@
 	set(WITH_HEADLESS ON)
 endif()
 
-# remove old vars
-unset(WITH_INSTALL CACHE)
-
 TEST_SSE_SUPPORT()
 
 #-----------------------------------------------------------------------------
@@ -239,6 +241,9 @@
 # linux only, not cached
 set(WITH_BINRELOC OFF)
 
+# MAXOSX only, set to avoid uninitialized 
+set(EXETYPE "")
+
 # these are added to later on.
 set(C_WARNINGS "")
 set(CXX_WARNINGS "")
@@ -251,13 +256,12 @@
 # On Unix: 
 #   cmake ../blender \
 #         -D PYTHON_VERSION=3.2 \
-#         -D PYTHON_INCLUDE_DIRS=/opt/py32/include/python3.2d \
-#         -D PYTHON_LIBPATH=/opt/py32/lib \
-#         -D PYTHON_LIBRARY=python3.2d
+#         -D PYTHON_INCLUDE_DIR=/opt/py32/include/python3.2d \
+#         -D PYTHON_LIBRARY=/opt/py32/lib/libpython3.2d.so
 #
 # On Macs: 
 #   cmake ../blender \
-#         -D PYTHON_INCLUDE_DIRS=/System/Library/Frameworks/Python.framework/Versions/3.2/include/python3.2 \
+#         -D PYTHON_INCLUDE_DIR=/System/Library/Frameworks/Python.framework/Versions/3.2/include/python3.2 \
 #         -D PYTHON_LIBPATH=/System/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/config \
 #         -G Xcode
 #
@@ -273,65 +277,48 @@
 		set(CMAKE_LIBRARY_PATH "/usr/lib/x86_64-linux-gnu;${CMAKE_LIBRARY_PATH}")
 	endif()
 
-	if(WITH_OPENAL)
-		find_package(OpenAL)
-		if(NOT OPENAL_FOUND)
-			set(WITH_OPENAL OFF)
-		endif()
-	endif()
+	find_package(JPEG REQUIRED)
+	find_package(PNG REQUIRED)
+	find_package(ZLIB REQUIRED)
+	find_package(Freetype REQUIRED)
 
-	if(WITH_JACK)
-		set(JACK /usr)
-		set(JACK_INC ${JACK}/include/jack)
-		set(JACK_LIB jack)
-		set(JACK_LIBPATH ${JACK}/lib)
-	endif()
+	if(WITH_PYTHON)
+		# No way to set py32. remove for now.
+		# find_package(PythonLibs)
 
-	if(WITH_CODEC_SNDFILE)
-		set(SNDFILE /usr)
-		set(SNDFILE_INC ${SNDFILE}/include)
-		set(SNDFILE_LIB sndfile)
-		set(SNDFILE_LIBPATH ${SNDFILE}/lib)
+		# Use our own instead, since wothout py is such a rare case,
+		# require this package
+		find_package(PythonLibsUnix REQUIRED)
 	endif()
 
-	if(WITH_INTERNATIONAL)
-		find_library(INTL_LIBRARY
-			NAMES intl
-			PATHS
-			/sw/lib
-		)
 
-		find_library(ICONV_LIBRARY
-			NAMES iconv
-			PATHS
-			/sw/lib
-		)
-		mark_as_advanced(ICONV_LIBRARY)
-		mark_as_advanced(INTL_LIBRARY)
+	if(WITH_IMAGE_OPENEXR)
+		find_package(OpenEXR)  # our own module
+		if(NOT OPENEXR_FOUND)
+			set(WITH_IMAGE_OPENEXR OFF)
+		endif()
+	endif()
 
-		if(INTL_LIBRARY AND ICONV_LIBRARY)
-			set(GETTEXT_LIB ${INTL_LIBRARY} ${ICONV_LIBRARY})
+	if(WITH_IMAGE_OPENJPEG)
+		find_package(OpenJPEG)
+		if(NOT OPENJPEG_FOUND)
+			set(WITH_IMAGE_OPENJPEG OFF)
 		endif()
 	endif()
 
-	find_package(Freetype)
-	# unset(FREETYPE_INCLUDE_DIRS CACHE) # cant use
+	if(WITH_IMAGE_TIFF)
+		find_package(TIFF)
+		if(NOT TIFF_FOUND)
+			set(WITH_IMAGE_TIFF OFF)
+		endif()
+	endif()
 
-
-	if(WITH_PYTHON)
-		# No way to set py32. remove for now.
-		# find_package(PythonLibs)
-
-		# defines...
-		
-		#  PYTHON_VERSION
-		#  PYTHON_INCLUDE_DIRS
-		#  PYTHON_LIBRARY
-		#  PYTHON_LIBPATH
-		#  PYTHON_LINKFLAGS
-
-		include(build_files/cmake/FindPythonLibsUnix.cmake)
-
+	# Audio IO
+	if(WITH_OPENAL)
+		find_package(OpenAL)
+		if(NOT OPENAL_FOUND)
+			set(WITH_OPENAL OFF)
+		endif()
 	endif()
 
 	if(WITH_SDL)
@@ -346,71 +333,71 @@
 		endif()
 	endif()
 
-	if(WITH_IMAGE_OPENEXR)
-		set(OPENEXR /usr CACHE FILEPATH "OPENEXR Directory")
-		mark_as_advanced(OPENEXR)
-		find_path(OPENEXR_INC
-			ImfXdr.h
-			PATHS
-			${OPENEXR}/include/OpenEXR
-			/usr/local/include/OpenEXR
-			/sw/include/OpenEXR
-			/opt/local/include/OpenEXR
-			/opt/csw/include/OpenEXR
-			/opt/include/OpenEXR
-		)
-		mark_as_advanced(OPENEXR_INC)
-
-		set(OPENEXR_LIB Half IlmImf Iex Imath)
-		
-		if(NOT OPENEXR_INC)
-			set(WITH_IMAGE_OPENEXR OFF)
+	if(WITH_JACK)
+		find_package(Jack)
+		if(NOT JACK_FOUND)
+			set(WITH_JACK OFF)
 		endif()
 	endif()
 
-	if(WITH_IMAGE_TIFF)
-		find_package(TIFF)
-		if(NOT TIFF_FOUND)
-			set(WITH_IMAGE_TIFF OFF)
+	# Codecs
+	if(WITH_CODEC_SNDFILE)
+		find_package(SndFile)
+		if(NOT SNDFILE_FOUND)
+			set(WITH_CODEC_SNDFILE OFF)
 		endif()
 	endif()
 
-	find_package(JPEG REQUIRED)
-
-	find_package(PNG REQUIRED)
-
-	find_package(ZLIB REQUIRED)
-
 	if(WITH_CODEC_FFMPEG)
 		set(FFMPEG /usr CACHE FILEPATH "FFMPEG Directory")
 		mark_as_advanced(FFMPEG)
-		set(FFMPEG_INC ${FFMPEG}/include)
-		set(FFMPEG_LIB avformat avcodec avutil avdevice swscale CACHE STRING "FFMPEG Libraries")
-		mark_as_advanced(FFMPEG_LIB)
+		set(FFMPEG_INCLUDE_DIRS ${FFMPEG}/include)
+		set(FFMPEG_LIBRARIES avformat avcodec avutil avdevice swscale CACHE STRING "FFMPEG Libraries")
+		mark_as_advanced(FFMPEG_LIBRARIES)
 		set(FFMPEG_LIBPATH ${FFMPEG}/lib)
 		set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D__STDC_CONSTANT_MACROS")
 	endif()
 
+	if(WITH_INTERNATIONAL)
+		find_library(INTL_LIBRARY
+			NAMES intl
+			PATHS
+			/sw/lib
+		)
+
+		find_library(ICONV_LIBRARY
+			NAMES iconv
+			PATHS
+			/sw/lib
+		)
+		mark_as_advanced(ICONV_LIBRARY)
+		mark_as_advanced(INTL_LIBRARY)
+
+		if(INTL_LIBRARY AND ICONV_LIBRARY)
+			set(GETTEXT_LIB ${INTL_LIBRARY} ${ICONV_LIBRARY})
+		endif()
+	endif()
+
 	if(WITH_FFTW3)
-		set(FFTW3 /usr)
-		set(FFTW3_INC ${FFTW3}/include)
-		set(FFTW3_LIB fftw3)
-		set(FFTW3_LIBPATH ${FFTW3}/lib)
+		find_package(Fftw3)
+		if(NOT FFTW3_FOUND)
+			set(WITH_FFTW3 OFF)
+		endif()
 	endif()
 
 	if(WITH_SAMPLERATE)
-		set(LIBSAMPLERATE /usr)
-		set(LIBSAMPLERATE_INC ${LIBSAMPLERATE}/include)
-		set(LIBSAMPLERATE_LIB samplerate)
-		set(LIBSAMPLERATE_LIBPATH ${LIBSAMPLERATE}/lib)
+		find_package(Samplerate)
+		if(NOT SAMPLERATE_FOUND)
+			set(WITH_SAMPLERATE OFF)
+		endif()
 	endif()
 
 	if(WITH_OPENCOLLADA)
 		set(OPENCOLLADA /usr/local/opencollada CACHE FILEPATH "OpenCollada Directory")
 		mark_as_advanced(OPENCOLLADA)
 		set(OPENCOLLADA_LIBPATH ${OPENCOLLADA}/lib)
-		set(OPENCOLLADA_LIB OpenCOLLADAStreamWriter OpenCOLLADASaxFrameworkLoader OpenCOLLADAFramework OpenCOLLADABaseUtils GeneratedSaxParser UTF MathMLSolver pcre ftoa buffer xml2)
-		set(OPENCOLLADA_INC ${OPENCOLLADA})
+		set(OPENCOLLADA_LIBRARIES OpenCOLLADAStreamWriter OpenCOLLADASaxFrameworkLoader OpenCOLLADAFramework OpenCOLLADABaseUtils GeneratedSaxParser UTF MathMLSolver pcre ftoa buffer xml2)
+		set(OPENCOLLADA_INCLUDE_DIR ${OPENCOLLADA})
 
 		set(PCRE /usr CACHE FILEPATH "PCRE Directory")
 		mark_as_advanced(PCRE)
@@ -424,12 +411,10 @@
 	endif()
 
 	if(WITH_MEM_JEMALLOC)
-		set(JEMALLOC /usr)
-		set(JEMALLOC_LIBRARY jemalloc CACHE STRING "JeMalloc library")
-		set(JEMALLOC_LIBPATH ${JEMALLOC}/lib  CACHE FILEPATH "JeMalloc library path")
-		# no use for this yet.
-		# set(JEMALLOC_INCLUDE_DIR ${JEMALLOC}/include  CACHE FILEPATH "JeMalloc include path")
-		unset(JEMALLOC)
+		find_package(JeMalloc)
+		if(NOT JEMALLOC_FOUND)
+			set(WITH_MEM_JEMALLOC OFF)
+		endif()
 	endif()
 
 	# OpenSuse needs lutil, ArchLinux not, for now keep, can avoid by using --as-needed
@@ -451,10 +436,8 @@
 		if(NOT WITH_PYTHON_MODULE)
 			# BSD's dont use libdl.so
 			list(APPEND LLIBS -ldl)
-
 			# binreloc is linux only
-			set(BINRELOC ${CMAKE_SOURCE_DIR}/extern/binreloc)
-			set(BINRELOC_INC ${BINRELOC}/include)
+			set(BINRELOC_INCLUDE_DIRS ${CMAKE_SOURCE_DIR}/extern/binreloc/include)
 			set(WITH_BINRELOC ON)
 		endif()
 	endif()
@@ -507,16 +490,16 @@
 
 	if(WITH_INTERNATIONAL)
 		set(ICONV ${LIBDIR}/iconv)
-		set(ICONV_INC ${ICONV}/include)
-		set(ICONV_LIB iconv)
+		set(ICONV_INCLUDE_DIRS ${ICONV}/include)
+		set(ICONV_LIBRARIES iconv)
 		set(ICONV_LIBPATH ${ICONV}/lib)
 	endif()
 
 	if(WITH_SAMPLERATE)
-		set(LIBSAMPLERATE ${LIBDIR}/samplerate)
-		set(LIBSAMPLERATE_INC ${LIBSAMPLERATE}/include)
-		set(LIBSAMPLERATE_LIB libsamplerate)
-		set(LIBSAMPLERATE_LIBPATH ${LIBSAMPLERATE}/lib)
+		set(SAMPLERATE ${LIBDIR}/samplerate)
+		set(SAMPLERATE_INCLUDE_DIRS ${SAMPLERATE}/include)
+		set(SAMPLERATE_LIBRARIES libsamplerate)
+		set(SAMPLERATE_LIBPATH ${SAMPLERATE}/lib)
 	endif()
 
 	set(PNG "${LIBDIR}/png")
@@ -538,9 +521,9 @@
 
 	if(WITH_CODEC_SNDFILE)
 		set(SNDFILE ${LIBDIR}/sndfile)
-		set(SNDFILE_INC ${SNDFILE}/include)
-		set(SNDFILE_LIB libsndfile-1)
-		set(SNDFILE_LIBPATH ${SNDFILE}/lib)
+		set(SNDFILE_INCLUDE_DIRS ${SNDFILE}/include)
+		set(SNDFILE_LIBRARIES libsndfile-1)
+		set(SNDFILE_LIBPATH ${SNDFILE}/lib) # TODO, deprecate
 	endif()
 
 	if(WITH_SDL)
@@ -552,8 +535,8 @@
 
 	if(WITH_CODEC_QUICKTIME)
 		set(QUICKTIME ${LIBDIR}/QTDevWin)
-		set(QUICKTIME_INC ${QUICKTIME}/CIncludes)
-		set(QUICKTIME_LIB qtmlClient)
+		set(QUICKTIME_INCLUDE_DIRS ${QUICKTIME}/CIncludes)
+		set(QUICKTIME_LIBRARIES qtmlClient)
 		set(QUICKTIME_LIBPATH ${QUICKTIME}/Libraries)
 	endif()
 
@@ -616,9 +599,9 @@
 		endif()
 
 		set(PTHREADS ${LIBDIR}/pthreads)
-		set(PTHREADS_INC ${PTHREADS}/include)
+		set(PTHREADS_INCLUDE_DIRS ${PTHREADS}/include)
 		set(PTHREADS_LIBPATH ${PTHREADS}/lib)
-		set(PTHREADS_LIB pthreadVC2)
+		set(PTHREADS_LIBRARIES pthreadVC2)
 		
 		set(FREETYPE ${LIBDIR}/freetype)
 		set(FREETYPE_INCLUDE_DIRS ${FREETYPE}/include ${FREETYPE}/include/freetype2)
@@ -627,31 +610,41 @@
 
 		if(WITH_FFTW3)
 			set(FFTW3 ${LIBDIR}/fftw3)
-			set(FFTW3_LIB libfftw)
-			set(FFTW3_INC ${FFTW3}/include)
+			set(FFTW3_LIBRARIES libfftw)
+			set(FFTW3_INCLUDE_DIRS ${FFTW3}/include)
 			set(FFTW3_LIBPATH ${FFTW3}/lib)
 		endif()
 
 		if(WITH_OPENCOLLADA)
-			set(OPENCOLLADA ${LIBDIR}/opencollada)
-			set(OPENCOLLADA_INC ${OPENCOLLADA}/include)
-			set(OPENCOLLADA_LIBPATH ${OPENCOLLADA}/lib)
-			set(OPENCOLLADA_LIB OpenCOLLADASaxFrameworkLoader OpenCOLLADAFramework OpenCOLLADABaseUtils OpenCOLLADAStreamWriter MathMLSolver GeneratedSaxParser xml2 buffer ftoa UTF)
-			set(PCRE_LIB pcre)
+			set(OPENCOLLADA_INCLUDE_DIR
+				${LIBDIR}/opencollada/include
+			)

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list