include ffmpeg_compat header in cmake source list.
authorCampbell Barton <ideasman42@gmail.com>
Sat, 28 May 2011 04:53:17 +0000 (04:53 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Sat, 28 May 2011 04:53:17 +0000 (04:53 +0000)
build_files/cmake/macros.cmake
source/blender/editors/gpencil/gpencil_edit.c
source/blender/imbuf/CMakeLists.txt

index 45dc67f9ce607cf9d1dad81c0ddd8e946917b80a..6e4aaa51a4959a568010f689372edde5be30df06 100644 (file)
@@ -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)
index 42ffefa6bd4ef2121607be26b844c2ff7d0903db..2860d467cef42b561bb4e1db41f891fc4d32d7ea 100644 (file)
@@ -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;
                }
index 2522bcfed92cd830dbeb91f4c149c0d50f9d74c8..ed4508053b832ded2c1959cc8bf9b192914213e6 100644 (file)
@@ -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)