mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-02-19 03:39:58 +00:00
Use spaces only for identation in CMakeLists.txt
This commit is contained in:
parent
eca26e8b18
commit
8031b9a16c
@ -237,10 +237,10 @@ find_package(LZ4 REQUIRED)
|
|||||||
|
|
||||||
if (USE_QT)
|
if (USE_QT)
|
||||||
find_package(QT REQUIRED COMPONENTS Core NAMES Qt6 Qt5)
|
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)
|
find_package(Qt5 5.15 COMPONENTS Core Widgets Network OpenGL REQUIRED)
|
||||||
else()
|
else()
|
||||||
find_package(Qt6 COMPONENTS Core Widgets Network OpenGL REQUIRED)
|
find_package(Qt6 COMPONENTS Core Widgets Network OpenGL REQUIRED)
|
||||||
endif()
|
endif()
|
||||||
message(STATUS "Using Qt${QT_VERSION}")
|
message(STATUS "Using Qt${QT_VERSION}")
|
||||||
endif()
|
endif()
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
set(BSATOOL
|
set(BSATOOL
|
||||||
bsatool.cpp
|
bsatool.cpp
|
||||||
)
|
)
|
||||||
source_group(apps\\bsatool FILES ${BSATOOL})
|
source_group(apps\\bsatool FILES ${BSATOOL})
|
||||||
|
|
||||||
# Main executable
|
# Main executable
|
||||||
openmw_add_executable(bsatool
|
openmw_add_executable(bsatool
|
||||||
${BSATOOL}
|
${BSATOOL}
|
||||||
)
|
)
|
||||||
|
|
||||||
target_link_libraries(bsatool
|
target_link_libraries(bsatool
|
||||||
|
@ -112,64 +112,64 @@ endmacro (opencs_hdrs)
|
|||||||
include(CMakeParseArguments)
|
include(CMakeParseArguments)
|
||||||
|
|
||||||
macro (openmw_add_executable target)
|
macro (openmw_add_executable target)
|
||||||
set(OMW_ADD_EXE_OPTIONS WIN32 MACOSX_BUNDLE EXCLUDE_FROM_ALL)
|
set(OMW_ADD_EXE_OPTIONS WIN32 MACOSX_BUNDLE EXCLUDE_FROM_ALL)
|
||||||
set(OMW_ADD_EXE_VALUES)
|
set(OMW_ADD_EXE_VALUES)
|
||||||
set(OMW_ADD_EXE_MULTI_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})
|
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)
|
if (OMW_ADD_EXE_WIN32)
|
||||||
set(OMW_ADD_EXE_WIN32_VALUE WIN32)
|
set(OMW_ADD_EXE_WIN32_VALUE WIN32)
|
||||||
endif (OMW_ADD_EXE_WIN32)
|
endif (OMW_ADD_EXE_WIN32)
|
||||||
|
|
||||||
if (OMW_ADD_EXE_MACOSX_BUNDLE)
|
if (OMW_ADD_EXE_MACOSX_BUNDLE)
|
||||||
set(OMW_ADD_EXE_MACOSX_BUNDLE_VALUE MACOSX_BUNDLE)
|
set(OMW_ADD_EXE_MACOSX_BUNDLE_VALUE MACOSX_BUNDLE)
|
||||||
endif (OMW_ADD_EXE_MACOSX_BUNDLE)
|
endif (OMW_ADD_EXE_MACOSX_BUNDLE)
|
||||||
|
|
||||||
if (OMW_ADD_EXE_EXCLUDE_FROM_ALL)
|
if (OMW_ADD_EXE_EXCLUDE_FROM_ALL)
|
||||||
set(OMW_ADD_EXE_EXCLUDE_FROM_ALL_VALUE EXCLUDE_FROM_ALL)
|
set(OMW_ADD_EXE_EXCLUDE_FROM_ALL_VALUE EXCLUDE_FROM_ALL)
|
||||||
endif (OMW_ADD_EXE_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})
|
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 (MSVC)
|
||||||
if (CMAKE_VERSION VERSION_GREATER 3.8 OR CMAKE_VERSION VERSION_EQUAL 3.8)
|
if (CMAKE_VERSION VERSION_GREATER 3.8 OR CMAKE_VERSION VERSION_EQUAL 3.8)
|
||||||
set_target_properties(${target} PROPERTIES VS_DEBUGGER_WORKING_DIRECTORY "$<TARGET_FILE_DIR:${target}>")
|
set_target_properties(${target} PROPERTIES VS_DEBUGGER_WORKING_DIRECTORY "$<TARGET_FILE_DIR:${target}>")
|
||||||
endif (CMAKE_VERSION VERSION_GREATER 3.8 OR CMAKE_VERSION VERSION_EQUAL 3.8)
|
endif (CMAKE_VERSION VERSION_GREATER 3.8 OR CMAKE_VERSION VERSION_EQUAL 3.8)
|
||||||
endif (MSVC)
|
endif (MSVC)
|
||||||
endmacro (openmw_add_executable)
|
endmacro (openmw_add_executable)
|
||||||
|
|
||||||
macro (get_generator_is_multi_config VALUE)
|
macro (get_generator_is_multi_config VALUE)
|
||||||
if (DEFINED generator_is_multi_config_var)
|
if (DEFINED generator_is_multi_config_var)
|
||||||
set(${VALUE} ${generator_is_multi_config_var})
|
set(${VALUE} ${generator_is_multi_config_var})
|
||||||
else (DEFINED 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)
|
if (CMAKE_VERSION VERSION_GREATER 3.9 OR CMAKE_VERSION VERSION_EQUAL 3.9)
|
||||||
get_cmake_property(${VALUE} GENERATOR_IS_MULTI_CONFIG)
|
get_cmake_property(${VALUE} GENERATOR_IS_MULTI_CONFIG)
|
||||||
else (CMAKE_VERSION VERSION_GREATER 3.9 OR CMAKE_VERSION VERSION_EQUAL 3.9)
|
else (CMAKE_VERSION VERSION_GREATER 3.9 OR CMAKE_VERSION VERSION_EQUAL 3.9)
|
||||||
list(LENGTH CMAKE_CONFIGURATION_TYPES ${VALUE})
|
list(LENGTH CMAKE_CONFIGURATION_TYPES ${VALUE})
|
||||||
endif (CMAKE_VERSION VERSION_GREATER 3.9 OR CMAKE_VERSION VERSION_EQUAL 3.9)
|
endif (CMAKE_VERSION VERSION_GREATER 3.9 OR CMAKE_VERSION VERSION_EQUAL 3.9)
|
||||||
endif (DEFINED generator_is_multi_config_var)
|
endif (DEFINED generator_is_multi_config_var)
|
||||||
endmacro (get_generator_is_multi_config)
|
endmacro (get_generator_is_multi_config)
|
||||||
|
|
||||||
macro (copy_resource_file source_path destination_dir_base dest_path_relative)
|
macro (copy_resource_file source_path destination_dir_base dest_path_relative)
|
||||||
get_generator_is_multi_config(multi_config)
|
get_generator_is_multi_config(multi_config)
|
||||||
if (multi_config)
|
if (multi_config)
|
||||||
foreach(cfgtype ${CMAKE_CONFIGURATION_TYPES})
|
foreach(cfgtype ${CMAKE_CONFIGURATION_TYPES})
|
||||||
configure_file(${source_path} "${destination_dir_base}/${cfgtype}/${dest_path_relative}" COPYONLY)
|
configure_file(${source_path} "${destination_dir_base}/${cfgtype}/${dest_path_relative}" COPYONLY)
|
||||||
endforeach(cfgtype)
|
endforeach(cfgtype)
|
||||||
else (multi_config)
|
else (multi_config)
|
||||||
configure_file(${source_path} "${destination_dir_base}/${dest_path_relative}" COPYONLY)
|
configure_file(${source_path} "${destination_dir_base}/${dest_path_relative}" COPYONLY)
|
||||||
endif (multi_config)
|
endif (multi_config)
|
||||||
endmacro (copy_resource_file)
|
endmacro (copy_resource_file)
|
||||||
|
|
||||||
macro (configure_resource_file source_path destination_dir_base dest_path_relative)
|
macro (configure_resource_file source_path destination_dir_base dest_path_relative)
|
||||||
get_generator_is_multi_config(multi_config)
|
get_generator_is_multi_config(multi_config)
|
||||||
if (multi_config)
|
if (multi_config)
|
||||||
foreach(cfgtype ${CMAKE_CONFIGURATION_TYPES})
|
foreach(cfgtype ${CMAKE_CONFIGURATION_TYPES})
|
||||||
configure_file(${source_path} "${destination_dir_base}/${cfgtype}/${dest_path_relative}")
|
configure_file(${source_path} "${destination_dir_base}/${cfgtype}/${dest_path_relative}")
|
||||||
endforeach(cfgtype)
|
endforeach(cfgtype)
|
||||||
else (multi_config)
|
else (multi_config)
|
||||||
configure_file(${source_path} "${destination_dir_base}/${dest_path_relative}")
|
configure_file(${source_path} "${destination_dir_base}/${dest_path_relative}")
|
||||||
endif (multi_config)
|
endif (multi_config)
|
||||||
endmacro (configure_resource_file)
|
endmacro (configure_resource_file)
|
||||||
|
|
||||||
macro (pack_resource_file source_path destination_dir_base dest_path_relative)
|
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)
|
endmacro (pack_resource_file)
|
||||||
|
|
||||||
macro (copy_all_resource_files source_dir destination_dir_base destination_dir_relative files)
|
macro (copy_all_resource_files source_dir destination_dir_base destination_dir_relative files)
|
||||||
foreach (f ${files})
|
foreach (f ${files})
|
||||||
get_filename_component(filename ${f} NAME)
|
get_filename_component(filename ${f} NAME)
|
||||||
copy_resource_file("${source_dir}/${f}" "${destination_dir_base}" "${destination_dir_relative}/${f}")
|
copy_resource_file("${source_dir}/${f}" "${destination_dir_base}" "${destination_dir_relative}/${f}")
|
||||||
endforeach (f)
|
endforeach (f)
|
||||||
endmacro (copy_all_resource_files)
|
endmacro (copy_all_resource_files)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user