Переписан код для формирования путей к стандартным каталогам
This commit is contained in:
@ -32,6 +32,8 @@ target_compile_options(${current_target} PUBLIC "${Qt5Core_EXECUTABLE_COMPILE_FL
|
||||
|
||||
target_link_libraries(${current_target} myx-filesystem)
|
||||
target_link_libraries(${current_target} Qt5::Core)
|
||||
target_link_libraries(${current_target} Threads::Threads)
|
||||
|
||||
|
||||
# Имя выходного файла для цели
|
||||
set_target_properties(${current_target}
|
||||
|
@ -1,3 +1,5 @@
|
||||
#include "cmlib_private_config.hpp"
|
||||
|
||||
#include <myx/base/config.hpp>
|
||||
|
||||
#include <myx/filesystem/paths.hpp>
|
||||
@ -6,17 +8,20 @@
|
||||
|
||||
namespace MF = myx::filesystem;
|
||||
|
||||
// Переменные для защиты экземпляра класса MF::Paths
|
||||
std::atomic< MF::Paths* > MF::Paths::m_instance;
|
||||
std::mutex MF::Paths::m_mutex;
|
||||
|
||||
int main( int argc, char** argv )
|
||||
{
|
||||
(void)argc;
|
||||
(void)argv;
|
||||
QCoreApplication::setApplicationName( PROJECT_NAME );
|
||||
MF::Paths paths;
|
||||
QCoreApplication::setApplicationName( CMLIB_PROJECT_NAME );
|
||||
MF::Paths* paths = MF::Paths::getInstance();
|
||||
|
||||
paths.updatePaths();
|
||||
paths.makeDefaultDirectories();
|
||||
paths.findConfigFile( "test" );
|
||||
paths->init( CMLIB_PROJECT_NAME, "conf" );
|
||||
paths->makeDefaultDirectories();
|
||||
paths->findConfigFile( "test" );
|
||||
|
||||
return( 0 );
|
||||
}
|
||||
|
Reference in New Issue
Block a user