Compare commits
No commits in common. "a51ddf2a06e2dffdcc4f7197db52a013ff17e22e" and "bea1da9c1517c18163ea67bb30ea9308fb1397da" have entirely different histories.
a51ddf2a06
...
bea1da9c15
@ -1 +1 @@
|
|||||||
Subproject commit 3e8511da714b7963cd7197dea83aad306d7c9f7b
|
Subproject commit 3c0fd214b9ad8bd9306aba18b37d7078319654b1
|
@ -27,8 +27,8 @@ add_pvs_check(${TRGT})
|
|||||||
# Создание цели для автоматического форматирования кода
|
# Создание цели для автоматического форматирования кода
|
||||||
add_format_sources(${TRGT} ${TRGT_cpp})
|
add_format_sources(${TRGT} ${TRGT_cpp})
|
||||||
|
|
||||||
add_dependencies(${TRGT} base_static)
|
add_dependencies(${TRGT} base)
|
||||||
add_dependencies(${TRGT} filesystem_static)
|
add_dependencies(${TRGT} filesystem)
|
||||||
|
|
||||||
target_include_directories(${TRGT} PRIVATE ${CMAKE_SOURCE_DIR}/src)
|
target_include_directories(${TRGT} PRIVATE ${CMAKE_SOURCE_DIR}/src)
|
||||||
target_include_directories(${TRGT} SYSTEM PUBLIC ${Qt5Core_INCLUDE_DIRS})
|
target_include_directories(${TRGT} SYSTEM PUBLIC ${Qt5Core_INCLUDE_DIRS})
|
||||||
@ -38,8 +38,9 @@ target_link_libraries(${TRGT} Qt5::Core)
|
|||||||
target_link_libraries(${TRGT} Threads::Threads)
|
target_link_libraries(${TRGT} Threads::Threads)
|
||||||
|
|
||||||
# Имя выходного файла для цели
|
# Имя выходного файла для цели
|
||||||
set_target_properties(${TRGT} PROPERTIES OUTPUT_NAME filesystem-minimal
|
set_target_properties(
|
||||||
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_BINDIR})
|
${TRGT} PROPERTIES OUTPUT_NAME filesystem-minimal RUNTIME_OUTPUT_DIRECTORY
|
||||||
|
${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_BINDIR})
|
||||||
|
|
||||||
add_sanitizers(${TRGT})
|
add_sanitizers(${TRGT})
|
||||||
|
|
||||||
|
@ -4,11 +4,7 @@ set(TRGT example-qt-translators)
|
|||||||
# Список файлов исходных текстов
|
# Список файлов исходных текстов
|
||||||
set(TRGT_cpp ${CMAKE_CURRENT_SOURCE_DIR}/translators.cpp)
|
set(TRGT_cpp ${CMAKE_CURRENT_SOURCE_DIR}/translators.cpp)
|
||||||
|
|
||||||
qt5_translation(
|
qt5_translation(TRGT_qrc OUTPUT_DIR ${CMAKE_SOURCE_DIR}/l10n BASE_NAME ${TRGT} LANGUAGES ru_RU)
|
||||||
TRGT_qrc
|
|
||||||
OUTPUT_DIR ${CMAKE_SOURCE_DIR}/l10n
|
|
||||||
BASE_NAME ${TRGT}
|
|
||||||
LANGUAGES ru_RU)
|
|
||||||
|
|
||||||
# Путь поиска библиотек внутри проекта
|
# Путь поиска библиотек внутри проекта
|
||||||
link_directories(${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR})
|
link_directories(${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR})
|
||||||
@ -33,8 +29,8 @@ add_pvs_check(${TRGT})
|
|||||||
# Создание цели для автоматического форматирования кода
|
# Создание цели для автоматического форматирования кода
|
||||||
add_format_sources(${TRGT} ${TRGT_cpp})
|
add_format_sources(${TRGT} ${TRGT_cpp})
|
||||||
|
|
||||||
add_dependencies(${TRGT} base_static)
|
add_dependencies(${TRGT} base)
|
||||||
add_dependencies(${TRGT} qt_static)
|
add_dependencies(${TRGT} qt)
|
||||||
|
|
||||||
# Qt5
|
# Qt5
|
||||||
target_include_directories(${TRGT} PRIVATE ${CMAKE_SOURCE_DIR}/src)
|
target_include_directories(${TRGT} PRIVATE ${CMAKE_SOURCE_DIR}/src)
|
||||||
@ -44,8 +40,9 @@ target_link_libraries(${TRGT} myx-qt)
|
|||||||
target_link_libraries(${TRGT} Qt5::Core)
|
target_link_libraries(${TRGT} Qt5::Core)
|
||||||
|
|
||||||
# Имя выходного файла для цели
|
# Имя выходного файла для цели
|
||||||
set_target_properties(${TRGT} PROPERTIES OUTPUT_NAME qt-translators
|
set_target_properties(
|
||||||
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_BINDIR})
|
${TRGT} PROPERTIES OUTPUT_NAME qt-translators RUNTIME_OUTPUT_DIRECTORY
|
||||||
|
${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_BINDIR})
|
||||||
|
|
||||||
add_sanitizers(${TRGT})
|
add_sanitizers(${TRGT})
|
||||||
|
|
||||||
|
@ -37,6 +37,9 @@ target_include_directories(${TRGT} SYSTEM PUBLIC ${Qt5Core_INCLUDE_DIRS})
|
|||||||
add_custom_target(${TRGT}-install-headers COMMAND "${CMAKE_COMMAND}" -DCMAKE_INSTALL_COMPONENT=DEV -P
|
add_custom_target(${TRGT}-install-headers COMMAND "${CMAKE_COMMAND}" -DCMAKE_INSTALL_COMPONENT=DEV -P
|
||||||
"${CMAKE_BINARY_DIR}/cmake_install.cmake")
|
"${CMAKE_BINARY_DIR}/cmake_install.cmake")
|
||||||
|
|
||||||
|
set_target_properties(${TRGT} PROPERTIES OUTPUT_NAME myx-base RUNTIME_OUTPUT_DIRECTORY
|
||||||
|
${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_BINDIR})
|
||||||
|
|
||||||
# Правила для установки
|
# Правила для установки
|
||||||
install(TARGETS ${TRGT}_static COMPONENT DEV ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
install(TARGETS ${TRGT}_static COMPONENT DEV ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||||
if(BUILD_SHARED_LIBS)
|
if(BUILD_SHARED_LIBS)
|
||||||
|
@ -41,6 +41,9 @@ target_include_directories(${TRGT} PRIVATE ${CMAKE_BINARY_DIR}/include)
|
|||||||
add_custom_target(${TRGT}-install-headers COMMAND "${CMAKE_COMMAND}" -DCMAKE_INSTALL_COMPONENT=DEV -P
|
add_custom_target(${TRGT}-install-headers COMMAND "${CMAKE_COMMAND}" -DCMAKE_INSTALL_COMPONENT=DEV -P
|
||||||
"${CMAKE_BINARY_DIR}/cmake_install.cmake")
|
"${CMAKE_BINARY_DIR}/cmake_install.cmake")
|
||||||
|
|
||||||
|
set_target_properties(${TRGT} PROPERTIES OUTPUT_NAME myx-filesystem
|
||||||
|
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_BINDIR})
|
||||||
|
|
||||||
# Правила для установки
|
# Правила для установки
|
||||||
install(TARGETS ${TRGT}_static COMPONENT DEV ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
install(TARGETS ${TRGT}_static COMPONENT DEV ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||||
if(BUILD_SHARED_LIBS)
|
if(BUILD_SHARED_LIBS)
|
||||||
|
@ -15,34 +15,9 @@ Paths::Paths() = default;
|
|||||||
|
|
||||||
Paths::HierarchyType Paths::getHierarchyType()
|
Paths::HierarchyType Paths::getHierarchyType()
|
||||||
{
|
{
|
||||||
QRegExp binUnityRegexp( "/s*bin/unity$" );
|
|
||||||
QRegExp binRegexp( "/s*bin$" );
|
QRegExp binRegexp( "/s*bin$" );
|
||||||
auto binaryDir = m_currentExecutable.m_canonicalFilePath.canonicalPath();
|
auto binaryDir = m_currentExecutable.m_canonicalFilePath.canonicalPath();
|
||||||
|
|
||||||
if ( binUnityRegexp.indexIn( binaryDir ) >= 0 )
|
|
||||||
{
|
|
||||||
binaryDir.remove( binUnityRegexp );
|
|
||||||
|
|
||||||
QFileInfo etcDirInfo { binaryDir + "/etc" };
|
|
||||||
if ( !etcDirInfo.isDir() || !etcDirInfo.isReadable() ) { return( HierarchyType::kFlat ); }
|
|
||||||
|
|
||||||
QFileInfo constDataDirInfo { binaryDir + "/files/data" };
|
|
||||||
if ( !constDataDirInfo.isDir() || !constDataDirInfo.isReadable() ) { return( HierarchyType::kFlat ); }
|
|
||||||
|
|
||||||
QFileInfo varDataDirInfo { binaryDir + "/files/lib" };
|
|
||||||
if ( !varDataDirInfo.isDir() || !varDataDirInfo.isWritable() ) { return( HierarchyType::kFlat ); }
|
|
||||||
|
|
||||||
QFileInfo logDirInfo { binaryDir + "/files/log" };
|
|
||||||
if ( !logDirInfo.isDir() || !logDirInfo.isWritable() ) { return( HierarchyType::kFlat ); }
|
|
||||||
|
|
||||||
m_systemConfigDirectory = etcDirInfo.canonicalFilePath();
|
|
||||||
m_systemConstDataDirectory = constDataDirInfo.canonicalFilePath();
|
|
||||||
m_systemVarDataDirectory = varDataDirInfo.canonicalFilePath();
|
|
||||||
m_systemLogDirectory = logDirInfo.canonicalFilePath();
|
|
||||||
|
|
||||||
return ( HierarchyType::kDevelopment );
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( binRegexp.indexIn( binaryDir ) == -1 )
|
if ( binRegexp.indexIn( binaryDir ) == -1 )
|
||||||
{
|
{
|
||||||
return ( HierarchyType::kFlat );
|
return ( HierarchyType::kFlat );
|
||||||
|
@ -50,6 +50,9 @@ target_include_directories(${TRGT} PRIVATE ${CMAKE_BINARY_DIR}/include)
|
|||||||
add_custom_target(${TRGT}-install-headers COMMAND "${CMAKE_COMMAND}" -DCMAKE_INSTALL_COMPONENT=DEV -P
|
add_custom_target(${TRGT}-install-headers COMMAND "${CMAKE_COMMAND}" -DCMAKE_INSTALL_COMPONENT=DEV -P
|
||||||
"${CMAKE_BINARY_DIR}/cmake_install.cmake")
|
"${CMAKE_BINARY_DIR}/cmake_install.cmake")
|
||||||
|
|
||||||
|
set_target_properties(${TRGT} PROPERTIES OUTPUT_NAME myx-math RUNTIME_OUTPUT_DIRECTORY
|
||||||
|
${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_BINDIR})
|
||||||
|
|
||||||
# Правила для установки
|
# Правила для установки
|
||||||
install(TARGETS ${TRGT}_static COMPONENT DEV ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
install(TARGETS ${TRGT}_static COMPONENT DEV ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||||
if(BUILD_SHARED_LIBS)
|
if(BUILD_SHARED_LIBS)
|
||||||
|
@ -45,6 +45,9 @@ target_include_directories(${TRGT} PRIVATE ${CMAKE_BINARY_DIR}/include)
|
|||||||
add_custom_target(${TRGT}-install-headers COMMAND ${CMAKE_COMMAND} -DCMAKE_INSTALL_COMPONENT=DEV -P
|
add_custom_target(${TRGT}-install-headers COMMAND ${CMAKE_COMMAND} -DCMAKE_INSTALL_COMPONENT=DEV -P
|
||||||
"${CMAKE_BINARY_DIR}/cmake_install.cmake")
|
"${CMAKE_BINARY_DIR}/cmake_install.cmake")
|
||||||
|
|
||||||
|
set_target_properties(${TRGT} PROPERTIES OUTPUT_NAME qxredis RUNTIME_OUTPUT_DIRECTORY
|
||||||
|
${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_BINDIR})
|
||||||
|
|
||||||
# Правила для установки
|
# Правила для установки
|
||||||
install(TARGETS ${TRGT}_static COMPONENT DEV ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
install(TARGETS ${TRGT}_static COMPONENT DEV ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||||
if(BUILD_SHARED_LIBS)
|
if(BUILD_SHARED_LIBS)
|
||||||
|
Loading…
Reference in New Issue
Block a user