refactor: cleanup project. ready for refactor.
- remove all old code - build directory hierarchy, add basic cmake scripts.
This commit is contained in:
24
cmake/check_materializer_env.cmake
Normal file
24
cmake/check_materializer_env.cmake
Normal file
@@ -0,0 +1,24 @@
|
||||
# Check Windows platform
|
||||
if (NOT WIN32)
|
||||
message(FATAL_ERROR "VirtoolsSchematicWeaver::Materializer only supports Windows platform.")
|
||||
endif ()
|
||||
# Check MSVC toolchain
|
||||
if (NOT MSVC)
|
||||
message(FATAL_ERROR "VirtoolsSchematicWeaver::Materializer only supports MSVC build toolchain.")
|
||||
endif ()
|
||||
# Check architecture
|
||||
if (NOT CMAKE_SIZEOF_VOID_P EQUAL 4)
|
||||
message(FATAL_ERROR "VirtoolsSchematicWeaver::Materializer only supports 32-bit platform.")
|
||||
endif ()
|
||||
# Check build type
|
||||
set(VSW_MATERIALIZER_BUILD_TYPES
|
||||
"plugin" "standalone"
|
||||
)
|
||||
if (VSW_MATERIALIZER_BUILD_TYPE IN_LIST VSW_MATERIALIZER_BUILD_TYPES)
|
||||
message( "VirtoolsSchematicWeaver::Materializer build type: ${VSW_MATERIALIZER_BUILD_TYPE}")
|
||||
else ()
|
||||
message(FATAL_ERROR
|
||||
"VirtoolsSchematicWeaver::Materializer do not have correct type."
|
||||
"Please assign a legal value (\"plugin\" or \"standalone\") to VSW_MATERIALIZER_BUILD_TYPE."
|
||||
)
|
||||
endif ()
|
||||
0
cmake/custom_import_sqlite.cmake
Normal file
0
cmake/custom_import_sqlite.cmake
Normal file
35
cmake/custom_import_virtools.cmake
Normal file
35
cmake/custom_import_virtools.cmake
Normal file
@@ -0,0 +1,35 @@
|
||||
# ========== Check Variables ==========
|
||||
# Check Virtools version variable
|
||||
set(SPECIAL_VIRTOOLS_VERSIONS
|
||||
"21"
|
||||
)
|
||||
set(LEGACY_VIRTOOLS_VERSIONS
|
||||
"25"
|
||||
"30"
|
||||
"35"
|
||||
"40"
|
||||
"50"
|
||||
)
|
||||
if (VIRTOOLS_VERSION IN_LIST SPECIAL_VIRTOOLS_VERSIONS)
|
||||
message(
|
||||
"Specified Virtools version: ${VIRTOOLS_VERSION}."
|
||||
"Please note in this verions, your provided Virtools root path must be the root of GitHub repository: doyaGu/Virtools-SDK-2.1"
|
||||
)
|
||||
elseif (VIRTOOLS_VERSION IN_LIST LEGACY_VIRTOOLS_VERSIONS)
|
||||
message("Specified Virtools version: ${VIRTOOLS_VERSION}.")
|
||||
else ()
|
||||
message(FATAL_ERROR
|
||||
"You must set VIRTOOLS_VERSION variable to specify the version of your target Virtools before configurating this project."
|
||||
"The valid Virtools version are 21, 25, 30, 35, 40, 50."
|
||||
)
|
||||
endif ()
|
||||
|
||||
# Check Virtools path variable
|
||||
if (NOT DEFINED VIRTOOLS_PATH)
|
||||
message(FATAL_ERROR
|
||||
"You must set VIRTOOLS_PATH variable to specify the root folder of Virtools before configurating this project."
|
||||
"Please note this path is different when you picking Virtools 2.1 version."
|
||||
)
|
||||
endif()
|
||||
|
||||
# ========== Import library ==========
|
||||
10
cmake/custom_import_yycc.cmake
Normal file
10
cmake/custom_import_yycc.cmake
Normal file
@@ -0,0 +1,10 @@
|
||||
|
||||
# Check YYCC path variable
|
||||
if (NOT DEFINED YYCC_PATH)
|
||||
message(FATAL_ERROR "You must set YYCC_PATH variable to one of CMake distribution of YYCC installation path.")
|
||||
endif()
|
||||
|
||||
# Find YYCC library
|
||||
find_package(YYCCommonplace REQUIRED
|
||||
HINTS ${YYCC_PATH} NO_DEFAULT_PATH
|
||||
)
|
||||
Reference in New Issue
Block a user