2019-10-04 09:48:12 +00:00
|
|
|
# Название основной цели в текущем каталоге
|
|
|
|
set(current_target example-filesystem-minimal)
|
|
|
|
|
|
|
|
# Список файлов исходных текстов
|
2020-04-11 07:13:25 +00:00
|
|
|
set(current_target_sources ${CMAKE_CURRENT_SOURCE_DIR}/minimal.cpp)
|
2019-10-04 09:48:12 +00:00
|
|
|
|
|
|
|
# Путь поиска библиотек внутри проекта
|
2019-10-05 10:21:42 +00:00
|
|
|
link_directories(${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR})
|
2019-10-09 03:01:16 +00:00
|
|
|
link_directories(${CMAKE_BINARY_DIR}/src/myx/filesystem/lib)
|
2019-10-04 09:48:12 +00:00
|
|
|
|
|
|
|
# Цель для создания исполняемого файла
|
|
|
|
add_executable(${current_target} ${current_target_sources})
|
|
|
|
common_target_properties(${current_target})
|
|
|
|
add_clang_tidy_check(${current_target} ${current_target_sources})
|
|
|
|
add_clang_analyze_check(${current_target} ${current_target_sources})
|
|
|
|
add_clazy_check(${current_target} ${current_target_sources})
|
|
|
|
add_pvs_check(${current_target})
|
|
|
|
|
2019-11-21 09:01:58 +00:00
|
|
|
# Форматирование исходников
|
|
|
|
add_format_sources(${current_target} ${current_target_sources} ${current_target_headers})
|
|
|
|
|
2019-10-04 12:33:49 +00:00
|
|
|
add_dependencies(${current_target} base)
|
|
|
|
add_dependencies(${current_target} filesystem)
|
|
|
|
|
2020-04-11 07:13:25 +00:00
|
|
|
# Qt5 qt_translation(TARGET ${current_target} TS_DIR ${CMAKE_SOURCE_DIR}/l10n
|
|
|
|
# LANGUAGES ru_RU)
|
2019-10-04 09:48:12 +00:00
|
|
|
target_include_directories(${current_target} PRIVATE ${CMAKE_SOURCE_DIR}/src)
|
|
|
|
target_include_directories(${current_target} SYSTEM PUBLIC ${Qt5Core_INCLUDE_DIRS})
|
|
|
|
target_compile_options(${current_target} PUBLIC "${Qt5Core_EXECUTABLE_COMPILE_FLAGS}")
|
|
|
|
|
2019-10-04 12:33:49 +00:00
|
|
|
target_link_libraries(${current_target} myx-filesystem)
|
2019-10-04 09:48:12 +00:00
|
|
|
target_link_libraries(${current_target} Qt5::Core)
|
2020-04-03 21:04:02 +00:00
|
|
|
target_link_libraries(${current_target} Threads::Threads)
|
|
|
|
|
2019-10-04 09:48:12 +00:00
|
|
|
# Имя выходного файла для цели
|
2020-04-11 07:13:25 +00:00
|
|
|
set_target_properties(
|
|
|
|
${current_target} PROPERTIES OUTPUT_NAME filesystem-minimal RUNTIME_OUTPUT_DIRECTORY
|
|
|
|
${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_BINDIR})
|
2019-10-04 09:48:12 +00:00
|
|
|
|
|
|
|
add_sanitizers(${current_target})
|
|
|
|
|
|
|
|
# cotire(${current_target})
|
|
|
|
|
2020-04-03 21:33:06 +00:00
|
|
|
add_dependencies(${current_target} create_auxilary_symlinks)
|
|
|
|
|
2019-10-04 09:48:12 +00:00
|
|
|
# Правила для установки
|
2020-04-11 07:13:25 +00:00
|
|
|
install(TARGETS ${current_target} COMPONENT EXAMPLES RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
|