From 8031b9a16c2d7186e3ddbe5bdd96ce0cf51e95d1 Mon Sep 17 00:00:00 2001 From: elsid Date: Fri, 10 Mar 2023 14:42:43 +0100 Subject: [PATCH] Use spaces only for identation in CMakeLists.txt --- CMakeLists.txt | 6 +- apps/bsatool/CMakeLists.txt | 4 +- cmake/OpenMWMacros.cmake | 106 ++++++++++++++++++------------------ 3 files changed, 58 insertions(+), 58 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e2d538ae6c..cff1960db9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -237,10 +237,10 @@ find_package(LZ4 REQUIRED) if (USE_QT) find_package(QT REQUIRED COMPONENTS Core NAMES Qt6 Qt5) - if (QT_VERSION_MAJOR VERSION_EQUAL 5) + if (QT_VERSION_MAJOR VERSION_EQUAL 5) find_package(Qt5 5.15 COMPONENTS Core Widgets Network OpenGL REQUIRED) - else() - find_package(Qt6 COMPONENTS Core Widgets Network OpenGL REQUIRED) + else() + find_package(Qt6 COMPONENTS Core Widgets Network OpenGL REQUIRED) endif() message(STATUS "Using Qt${QT_VERSION}") endif() diff --git a/apps/bsatool/CMakeLists.txt b/apps/bsatool/CMakeLists.txt index 6312c33aaf..058519bba5 100644 --- a/apps/bsatool/CMakeLists.txt +++ b/apps/bsatool/CMakeLists.txt @@ -1,11 +1,11 @@ set(BSATOOL - bsatool.cpp + bsatool.cpp ) source_group(apps\\bsatool FILES ${BSATOOL}) # Main executable openmw_add_executable(bsatool - ${BSATOOL} + ${BSATOOL} ) target_link_libraries(bsatool diff --git a/cmake/OpenMWMacros.cmake b/cmake/OpenMWMacros.cmake index 2cb7e6eec8..991125526d 100644 --- a/cmake/OpenMWMacros.cmake +++ b/cmake/OpenMWMacros.cmake @@ -112,64 +112,64 @@ endmacro (opencs_hdrs) include(CMakeParseArguments) macro (openmw_add_executable target) - set(OMW_ADD_EXE_OPTIONS WIN32 MACOSX_BUNDLE EXCLUDE_FROM_ALL) - set(OMW_ADD_EXE_VALUES) - set(OMW_ADD_EXE_MULTI_VALUES) - cmake_parse_arguments(OMW_ADD_EXE "${OMW_ADD_EXE_OPTIONS}" "${OMW_ADD_EXE_VALUES}" "${OMW_ADD_EXE_MULTI_VALUES}" ${ARGN}) - - if (OMW_ADD_EXE_WIN32) - set(OMW_ADD_EXE_WIN32_VALUE WIN32) - endif (OMW_ADD_EXE_WIN32) - - if (OMW_ADD_EXE_MACOSX_BUNDLE) - set(OMW_ADD_EXE_MACOSX_BUNDLE_VALUE MACOSX_BUNDLE) - endif (OMW_ADD_EXE_MACOSX_BUNDLE) - - if (OMW_ADD_EXE_EXCLUDE_FROM_ALL) - set(OMW_ADD_EXE_EXCLUDE_FROM_ALL_VALUE EXCLUDE_FROM_ALL) - endif (OMW_ADD_EXE_EXCLUDE_FROM_ALL) - - add_executable(${target} ${OMW_ADD_EXE_WIN32_VALUE} ${OMW_ADD_EXE_MACOSX_BUNDLE_VALUE} ${OMW_ADD_EXE_EXCLUDE_FROM_ALL_VALUE} ${OMW_ADD_EXE_UNPARSED_ARGUMENTS}) - - if (MSVC) - if (CMAKE_VERSION VERSION_GREATER 3.8 OR CMAKE_VERSION VERSION_EQUAL 3.8) - set_target_properties(${target} PROPERTIES VS_DEBUGGER_WORKING_DIRECTORY "$") - endif (CMAKE_VERSION VERSION_GREATER 3.8 OR CMAKE_VERSION VERSION_EQUAL 3.8) - endif (MSVC) + set(OMW_ADD_EXE_OPTIONS WIN32 MACOSX_BUNDLE EXCLUDE_FROM_ALL) + set(OMW_ADD_EXE_VALUES) + set(OMW_ADD_EXE_MULTI_VALUES) + cmake_parse_arguments(OMW_ADD_EXE "${OMW_ADD_EXE_OPTIONS}" "${OMW_ADD_EXE_VALUES}" "${OMW_ADD_EXE_MULTI_VALUES}" ${ARGN}) + + if (OMW_ADD_EXE_WIN32) + set(OMW_ADD_EXE_WIN32_VALUE WIN32) + endif (OMW_ADD_EXE_WIN32) + + if (OMW_ADD_EXE_MACOSX_BUNDLE) + set(OMW_ADD_EXE_MACOSX_BUNDLE_VALUE MACOSX_BUNDLE) + endif (OMW_ADD_EXE_MACOSX_BUNDLE) + + if (OMW_ADD_EXE_EXCLUDE_FROM_ALL) + set(OMW_ADD_EXE_EXCLUDE_FROM_ALL_VALUE EXCLUDE_FROM_ALL) + endif (OMW_ADD_EXE_EXCLUDE_FROM_ALL) + + add_executable(${target} ${OMW_ADD_EXE_WIN32_VALUE} ${OMW_ADD_EXE_MACOSX_BUNDLE_VALUE} ${OMW_ADD_EXE_EXCLUDE_FROM_ALL_VALUE} ${OMW_ADD_EXE_UNPARSED_ARGUMENTS}) + + if (MSVC) + if (CMAKE_VERSION VERSION_GREATER 3.8 OR CMAKE_VERSION VERSION_EQUAL 3.8) + set_target_properties(${target} PROPERTIES VS_DEBUGGER_WORKING_DIRECTORY "$") + endif (CMAKE_VERSION VERSION_GREATER 3.8 OR CMAKE_VERSION VERSION_EQUAL 3.8) + endif (MSVC) endmacro (openmw_add_executable) macro (get_generator_is_multi_config VALUE) - if (DEFINED generator_is_multi_config_var) - set(${VALUE} ${generator_is_multi_config_var}) - else (DEFINED generator_is_multi_config_var) - if (CMAKE_VERSION VERSION_GREATER 3.9 OR CMAKE_VERSION VERSION_EQUAL 3.9) - get_cmake_property(${VALUE} GENERATOR_IS_MULTI_CONFIG) - else (CMAKE_VERSION VERSION_GREATER 3.9 OR CMAKE_VERSION VERSION_EQUAL 3.9) - list(LENGTH CMAKE_CONFIGURATION_TYPES ${VALUE}) - endif (CMAKE_VERSION VERSION_GREATER 3.9 OR CMAKE_VERSION VERSION_EQUAL 3.9) - endif (DEFINED generator_is_multi_config_var) + if (DEFINED generator_is_multi_config_var) + set(${VALUE} ${generator_is_multi_config_var}) + else (DEFINED generator_is_multi_config_var) + if (CMAKE_VERSION VERSION_GREATER 3.9 OR CMAKE_VERSION VERSION_EQUAL 3.9) + get_cmake_property(${VALUE} GENERATOR_IS_MULTI_CONFIG) + else (CMAKE_VERSION VERSION_GREATER 3.9 OR CMAKE_VERSION VERSION_EQUAL 3.9) + list(LENGTH CMAKE_CONFIGURATION_TYPES ${VALUE}) + endif (CMAKE_VERSION VERSION_GREATER 3.9 OR CMAKE_VERSION VERSION_EQUAL 3.9) + endif (DEFINED generator_is_multi_config_var) endmacro (get_generator_is_multi_config) macro (copy_resource_file source_path destination_dir_base dest_path_relative) - get_generator_is_multi_config(multi_config) - if (multi_config) - foreach(cfgtype ${CMAKE_CONFIGURATION_TYPES}) - configure_file(${source_path} "${destination_dir_base}/${cfgtype}/${dest_path_relative}" COPYONLY) - endforeach(cfgtype) - else (multi_config) - configure_file(${source_path} "${destination_dir_base}/${dest_path_relative}" COPYONLY) - endif (multi_config) + get_generator_is_multi_config(multi_config) + if (multi_config) + foreach(cfgtype ${CMAKE_CONFIGURATION_TYPES}) + configure_file(${source_path} "${destination_dir_base}/${cfgtype}/${dest_path_relative}" COPYONLY) + endforeach(cfgtype) + else (multi_config) + configure_file(${source_path} "${destination_dir_base}/${dest_path_relative}" COPYONLY) + endif (multi_config) endmacro (copy_resource_file) macro (configure_resource_file source_path destination_dir_base dest_path_relative) - get_generator_is_multi_config(multi_config) - if (multi_config) - foreach(cfgtype ${CMAKE_CONFIGURATION_TYPES}) - configure_file(${source_path} "${destination_dir_base}/${cfgtype}/${dest_path_relative}") - endforeach(cfgtype) - else (multi_config) - configure_file(${source_path} "${destination_dir_base}/${dest_path_relative}") - endif (multi_config) + get_generator_is_multi_config(multi_config) + if (multi_config) + foreach(cfgtype ${CMAKE_CONFIGURATION_TYPES}) + configure_file(${source_path} "${destination_dir_base}/${cfgtype}/${dest_path_relative}") + endforeach(cfgtype) + else (multi_config) + configure_file(${source_path} "${destination_dir_base}/${dest_path_relative}") + endif (multi_config) endmacro (configure_resource_file) macro (pack_resource_file source_path destination_dir_base dest_path_relative) @@ -185,8 +185,8 @@ macro (pack_resource_file source_path destination_dir_base dest_path_relative) endmacro (pack_resource_file) macro (copy_all_resource_files source_dir destination_dir_base destination_dir_relative files) - foreach (f ${files}) - get_filename_component(filename ${f} NAME) - copy_resource_file("${source_dir}/${f}" "${destination_dir_base}" "${destination_dir_relative}/${f}") - endforeach (f) + foreach (f ${files}) + get_filename_component(filename ${f} NAME) + copy_resource_file("${source_dir}/${f}" "${destination_dir_base}" "${destination_dir_relative}/${f}") + endforeach (f) endmacro (copy_all_resource_files)