Changeset View
Changeset View
Standalone View
Standalone View
build_files/cmake/macros.cmake
| Show First 20 Lines • Show All 216 Lines • ▼ Show 20 Lines | |||||
| # only MSVC uses SOURCE_GROUP | # only MSVC uses SOURCE_GROUP | ||||
| function(blender_add_lib__impl | function(blender_add_lib__impl | ||||
| name | name | ||||
| sources | sources | ||||
| includes | includes | ||||
| includes_sys | includes_sys | ||||
| libraries | library_dependencies | ||||
| ) | ) | ||||
| # message(STATUS "Configuring library ${name}") | # message(STATUS "Configuring library ${name}") | ||||
| # include_directories(${includes}) | # include_directories(${includes}) | ||||
| # include_directories(SYSTEM ${includes_sys}) | # include_directories(SYSTEM ${includes_sys}) | ||||
| blender_include_dirs("${includes}") | blender_include_dirs("${includes}") | ||||
| blender_include_dirs_sys("${includes_sys}") | blender_include_dirs_sys("${includes_sys}") | ||||
| add_library(${name} ${sources}) | add_library(${name} ${sources}) | ||||
| # Use for testing 'BLENDER_SORTED_LIBS' removal. | # Use for testing 'BLENDER_SORTED_LIBS' removal. | ||||
| if(DEFINED WITHOUT_SORTED_LIBS AND WITHOUT_SORTED_LIBS) | if(DEFINED WITHOUT_SORTED_LIBS AND WITHOUT_SORTED_LIBS) | ||||
| if (NOT "${libraries}" STREQUAL "") | if (NOT "${library_dependencies}" STREQUAL "") | ||||
| target_link_libraries(${name} "${libraries}") | target_link_libraries(${name} "${library_dependencies}") | ||||
| endif() | endif() | ||||
| endif() | endif() | ||||
| # works fine without having the includes | # works fine without having the includes | ||||
| # listed is helpful for IDE's (QtCreator/MSVC) | # listed is helpful for IDE's (QtCreator/MSVC) | ||||
| blender_source_group("${sources}") | blender_source_group("${sources}") | ||||
| #if enabled, set the FOLDER property for visual studio projects | #if enabled, set the FOLDER property for visual studio projects | ||||
| Show All 11 Lines | |||||
| endfunction() | endfunction() | ||||
| function(blender_add_lib_nolist | function(blender_add_lib_nolist | ||||
| name | name | ||||
| sources | sources | ||||
| includes | includes | ||||
| includes_sys | includes_sys | ||||
| libraries | library_dependencies | ||||
| ) | ) | ||||
| add_cc_flags_custom_test(${name} PARENT_SCOPE) | add_cc_flags_custom_test(${name} PARENT_SCOPE) | ||||
| blender_add_lib__impl(${name} "${sources}" "${includes}" "${includes_sys}" "${libraries}") | blender_add_lib__impl(${name} "${sources}" "${includes}" "${includes_sys}" "${library_dependencies}") | ||||
| endfunction() | endfunction() | ||||
| function(blender_add_lib | function(blender_add_lib | ||||
| name | name | ||||
| sources | sources | ||||
| includes | includes | ||||
| includes_sys | includes_sys | ||||
| libraries | library_dependencies | ||||
| ) | ) | ||||
| add_cc_flags_custom_test(${name} PARENT_SCOPE) | add_cc_flags_custom_test(${name} PARENT_SCOPE) | ||||
| blender_add_lib__impl(${name} "${sources}" "${includes}" "${includes_sys}" "${libraries}") | blender_add_lib__impl(${name} "${sources}" "${includes}" "${includes_sys}" "${library_dependencies}") | ||||
| set_property(GLOBAL APPEND PROPERTY BLENDER_LINK_LIBS ${name}) | set_property(GLOBAL APPEND PROPERTY BLENDER_LINK_LIBS ${name}) | ||||
| endfunction() | endfunction() | ||||
| function(SETUP_LIBDIRS) | function(SETUP_LIBDIRS) | ||||
| # NOTE: For all new libraries, use absolute library paths. | # NOTE: For all new libraries, use absolute library paths. | ||||
| ▲ Show 20 Lines • Show All 1,179 Lines • Show Last 20 Lines | |||||