diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-05-31 05:15:44 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-05-31 05:15:44 +0400 |
commit | 09da9d43931a09e3786343e724a3de7217285d0d (patch) | |
tree | 4c48fbd4404687fd04254d071d535499a1ae4058 /build_files/cmake | |
parent | dcd55cef86270f076cf827c5ae7a6cc76db4f9ad (diff) |
cmake maintenance
blender_add_lib now takes a separate include argument to suppress warnings in system includes (mostly ffmpeg & python).
also only build wm_apple.c on apple+carbon configuration.
Diffstat (limited to 'build_files/cmake')
-rw-r--r-- | build_files/cmake/macros.cmake | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/build_files/cmake/macros.cmake b/build_files/cmake/macros.cmake index 6e4aaa51a49..265d5072205 100644 --- a/build_files/cmake/macros.cmake +++ b/build_files/cmake/macros.cmake @@ -13,6 +13,15 @@ macro(blender_include_dirs include_directories(${all_incs}) endmacro() +macro(blender_include_dirs_sys + includes) + + foreach(inc ${ARGV}) + get_filename_component(abs_inc ${inc} ABSOLUTE) + list(APPEND all_incs ${abs_inc}) + endforeach() + include_directories(SYSTEM ${all_incs}) +endmacro() macro(blender_source_group sources) @@ -35,12 +44,15 @@ endmacro() macro(blender_add_lib_nolist name sources - includes) + includes + includes_sys) # message(STATUS "Configuring library ${name}") # include_directories(${includes}) + # include_directories(SYSTEM ${includes_sys}) blender_include_dirs("${includes}") + blender_include_dirs_sys("${includes_sys}") add_library(${name} ${sources}) @@ -54,9 +66,10 @@ endmacro() macro(blender_add_lib name sources - includes) + includes + includes_sys) - blender_add_lib_nolist(${name} "${sources}" "${includes}") + blender_add_lib_nolist(${name} "${sources}" "${includes}" "${includes_sys}") set_property(GLOBAL APPEND PROPERTY BLENDER_LINK_LIBS ${name}) endmacro() |