From 20ae95422e9af2c1d3f927d932a20459f2387cac Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sat, 28 May 2011 04:53:17 +0000 Subject: include ffmpeg_compat header in cmake source list. --- build_files/cmake/macros.cmake | 44 +++++++++++++++------------ source/blender/editors/gpencil/gpencil_edit.c | 2 +- source/blender/imbuf/CMakeLists.txt | 3 ++ 3 files changed, 28 insertions(+), 21 deletions(-) diff --git a/build_files/cmake/macros.cmake b/build_files/cmake/macros.cmake index 45dc67f9ce6..6e4aaa51a49 100644 --- a/build_files/cmake/macros.cmake +++ b/build_files/cmake/macros.cmake @@ -13,19 +13,13 @@ macro(blender_include_dirs include_directories(${all_incs}) endmacro() -# only MSVC uses SOURCE_GROUP -macro(blender_add_lib_nolist - name - sources - includes) - - # message(STATUS "Configuring library ${name}") - blender_include_dirs("${includes}") - add_library(${name} ${sources}) +macro(blender_source_group + sources) # Group by location on disk source_group("Source Files" FILES CMakeLists.txt) + foreach(SRC ${sources}) get_filename_component(SRC_EXT ${SRC} EXT) if(${SRC_EXT} MATCHES ".h" OR ${SRC_EXT} MATCHES ".hpp") @@ -36,16 +30,26 @@ macro(blender_add_lib_nolist endforeach() endmacro() -# # works fine but having the includes listed is helpful for IDE's (QtCreator/MSVC) -# macro(blender_add_lib_nolist -# name -# sources -# includes) -# -# message(STATUS "Configuring library ${name}") -# include_directories(${includes}) -# add_library(${name} ${sources}) -# endmacro() + +# only MSVC uses SOURCE_GROUP +macro(blender_add_lib_nolist + name + sources + includes) + + # message(STATUS "Configuring library ${name}") + + # include_directories(${includes}) + blender_include_dirs("${includes}") + + add_library(${name} ${sources}) + + # works fine without having the includes + # listed is helpful for IDE's (QtCreator/MSVC) + blender_source_group("${sources}") + +endmacro() + macro(blender_add_lib name @@ -55,9 +59,9 @@ macro(blender_add_lib blender_add_lib_nolist(${name} "${sources}" "${includes}") set_property(GLOBAL APPEND PROPERTY BLENDER_LINK_LIBS ${name}) - endmacro() + macro(SETUP_LIBDIRS) # see "cmake --help-policy CMP0003" if(COMMAND cmake_policy) diff --git a/source/blender/editors/gpencil/gpencil_edit.c b/source/blender/editors/gpencil/gpencil_edit.c index 42ffefa6bd4..2860d467cef 100644 --- a/source/blender/editors/gpencil/gpencil_edit.c +++ b/source/blender/editors/gpencil/gpencil_edit.c @@ -444,7 +444,6 @@ static void gp_stroke_to_path (bContext *C, bGPDlayer *gpl, bGPDstroke *gps, Cur static int gp_camera_view_subrect(bContext *C, rctf *subrect) { - Scene *scene= CTX_data_scene(C); View3D *v3d= CTX_wm_view3d(C); ARegion *ar= CTX_wm_region(C); @@ -453,6 +452,7 @@ static int gp_camera_view_subrect(bContext *C, rctf *subrect) /* for camera view set the subrect */ if (rv3d->persp == RV3D_CAMOB) { + Scene *scene= CTX_data_scene(C); ED_view3d_calc_camera_border(scene, ar, v3d, rv3d, subrect, -1); /* negative shift */ return 1; } diff --git a/source/blender/imbuf/CMakeLists.txt b/source/blender/imbuf/CMakeLists.txt index 2522bcfed92..ed4508053b8 100644 --- a/source/blender/imbuf/CMakeLists.txt +++ b/source/blender/imbuf/CMakeLists.txt @@ -101,6 +101,9 @@ set(SRC intern/md5.h intern/openexr/openexr_api.h intern/openexr/openexr_multi.h + + # orphan include + ../../../intern/ffmpeg/ffmpeg_compat.h ) if(WITH_IMAGE_OPENEXR) -- cgit v1.2.3