refactor: cleanup project. ready for refactor.

- remove all old code
- build directory hierarchy, add basic cmake scripts.
This commit is contained in:
2024-07-23 21:37:56 +08:00
parent 4503b5cefc
commit ecebc42603
84 changed files with 298 additions and 6961 deletions

30
CMakeLists.txt Normal file
View File

@@ -0,0 +1,30 @@
cmake_minimum_required(VERSION 3.23)
project(VirtoolsSchematicWeaver
VERSION 2.0.0
LANGUAGES CXX
)
# Provide options
option(VSW_BUILD_MATERIALIZER "Build Materializer part of Virtools Schematic Weaver." ON)
option(VSW_BUILD_DECORATOR "Build Decorator part of Virtools Schematic Weaver" ON)
# Setup install path
include(GNUInstallDirs)
set(VSW_INSTALL_BIN_PATH ${CMAKE_INSTALL_BINDIR} CACHE PATH
"Binary install path relative to CMAKE_INSTALL_PREFIX unless set to an absolute path.")
# Import shared library and essential library
if (VSW_BUILD_MATERIALIZER OR VSW_BUILD_DECORATOR)
# Import YYCC and sqlite because all project use them
include(${CMAKE_CURRENT_LIST_DIR}/cmake/custom_import_yycc.cmake)
include(${CMAKE_CURRENT_LIST_DIR}/cmake/custom_import_sqlite.cmake)
# Import shared library
add_subdirectory(shared)
endif ()
# Import build targets
if (VSW_BUILD_MATERIALIZER)
add_subdirectory(materializer)
endif ()
if (VSW_BUILD_DECORATOR)
add_subdirectory(decorator)
endif ()