|
|
|
@ -483,6 +483,24 @@ set(FFmpeg_COMPONENTS |
|
|
|
avutil |
|
|
|
swscale) |
|
|
|
|
|
|
|
# This function should be passed a list of all files in a target. It will automatically generate |
|
|
|
# file groups following the directory hierarchy, so that the layout of the files in IDEs matches the |
|
|
|
# one in the filesystem. |
|
|
|
function(create_target_directory_groups target_name) |
|
|
|
# Place any files that aren't in the source list in a separate group so that they don't get in |
|
|
|
# the way. |
|
|
|
source_group("Other Files" REGULAR_EXPRESSION ".") |
|
|
|
|
|
|
|
get_target_property(target_sources "${target_name}" SOURCES) |
|
|
|
|
|
|
|
foreach(file_name IN LISTS target_sources) |
|
|
|
get_filename_component(dir_name "${file_name}" PATH) |
|
|
|
# Group names use '\' as a separator even though the entire rest of CMake uses '/'... |
|
|
|
string(REPLACE "/" "\\" group_name "${dir_name}") |
|
|
|
source_group("${group_name}" FILES "${file_name}") |
|
|
|
endforeach() |
|
|
|
endfunction() |
|
|
|
|
|
|
|
add_subdirectory(externals) |
|
|
|
|
|
|
|
if (ENABLE_QT) |
|
|
|
@ -656,24 +674,6 @@ endif() |
|
|
|
# Include source code |
|
|
|
# =================== |
|
|
|
|
|
|
|
# This function should be passed a list of all files in a target. It will automatically generate |
|
|
|
# file groups following the directory hierarchy, so that the layout of the files in IDEs matches the |
|
|
|
# one in the filesystem. |
|
|
|
function(create_target_directory_groups target_name) |
|
|
|
# Place any files that aren't in the source list in a separate group so that they don't get in |
|
|
|
# the way. |
|
|
|
source_group("Other Files" REGULAR_EXPRESSION ".") |
|
|
|
|
|
|
|
get_target_property(target_sources "${target_name}" SOURCES) |
|
|
|
|
|
|
|
foreach(file_name IN LISTS target_sources) |
|
|
|
get_filename_component(dir_name "${file_name}" PATH) |
|
|
|
# Group names use '\' as a separator even though the entire rest of CMake uses '/'... |
|
|
|
string(REPLACE "/" "\\" group_name "${dir_name}") |
|
|
|
source_group("${group_name}" FILES "${file_name}") |
|
|
|
endforeach() |
|
|
|
endfunction() |
|
|
|
|
|
|
|
# Adjustments for MSVC + Ninja |
|
|
|
if (MSVC AND CMAKE_GENERATOR STREQUAL "Ninja") |
|
|
|
add_compile_options( |
|
|
|
|