Основа проекта разрастается
This commit is contained in:
@ -0,0 +1,37 @@
|
||||
# Название основной цели и имя библиотеки в текущем каталоге
|
||||
set(current_target filesystem)
|
||||
|
||||
# Список файлов исходных текстов
|
||||
set(current_target_sources
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/paths.cpp
|
||||
)
|
||||
|
||||
# Список заголовочных файлов (используется для установки)
|
||||
set(current_target_headers
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/paths.hpp
|
||||
)
|
||||
|
||||
add_common_library(TARGET ${current_target} SOURCES ${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})
|
||||
add_uncrustify_format(${current_target} ${current_target_sources} ${current_target_headers})
|
||||
|
||||
# Цель, используемая только для установки заголовочных файлов без компиляции проекта
|
||||
add_custom_target(${current_target}-install-headers
|
||||
COMMAND "${CMAKE_COMMAND}"
|
||||
-DCMAKE_INSTALL_COMPONENT=headers -P "${CMAKE_BINARY_DIR}/cmake_install.cmake"
|
||||
)
|
||||
|
||||
# Правила для установки
|
||||
install(TARGETS ${current_target}_static ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||
if(BUILD_SHARED_LIBS)
|
||||
install(TARGETS ${current_target}_shared LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||
endif()
|
||||
install(FILES ${current_target_headers}
|
||||
COMPONENT headers
|
||||
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${current_target})
|
||||
install(FILES ${CMAKE_BINARY_DIR}/${current_target}.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
|
||||
|
||||
|
9
src/filesystem/paths.cpp
Normal file
9
src/filesystem/paths.cpp
Normal file
@ -0,0 +1,9 @@
|
||||
#include "paths.hpp"
|
||||
|
||||
namespace MF = myx::filesystem;
|
||||
|
||||
|
||||
int32_t MF::init( int32_t i = 0 )
|
||||
{
|
||||
return( i );
|
||||
}
|
16
src/filesystem/paths.hpp
Normal file
16
src/filesystem/paths.hpp
Normal file
@ -0,0 +1,16 @@
|
||||
#ifndef MYX_FILESYSTEM_PATHS_HPP_
|
||||
#define MYX_FILESYSTEM_PATHS_HPP_
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
namespace myx {
|
||||
|
||||
namespace filesystem {
|
||||
|
||||
int32_t init( int32_t i );
|
||||
|
||||
} // namespace filesystem
|
||||
|
||||
} // namespace myx
|
||||
|
||||
#endif // MYX_FILESYSTEM_PATHS_HPP_
|
Reference in New Issue
Block a user