yyc12345
f870d4dde3
- add documentation CMake build script. re-organise document layout for future changes. - move LIBCMO_EXPORT to BMap and rename it to BMAP_EXPORT because only BMap need to use this macro. - fully refactor VTEncoding to make it more like Python - Now language name is platform independent. - Hide implementation detail as possible as I can. - Language mapping are still work in progress. - add code gen for new added universal encoding feature to generate language name mapping in Windows and Iconv respectively. - remove old code of CMake build script. - update VTUtils for new requirement. - remove useless functions. - create LibCmo specific custom exception classes.
58 lines
1.0 KiB
CMake
58 lines
1.0 KiB
CMake
# Create shared library
|
|
add_library(BMap SHARED "")
|
|
# Setup sources
|
|
target_sources(BMap
|
|
PRIVATE
|
|
BMap.cpp
|
|
BMExports.cpp
|
|
)
|
|
# Setup headers
|
|
target_sources(BMap
|
|
PRIVATE
|
|
FILE_SET HEADERS
|
|
FILES
|
|
BMap.hpp
|
|
BMExports.hpp
|
|
)
|
|
# Setup header infomation
|
|
target_include_directories(BMap
|
|
PRIVATE
|
|
"${CMAKE_CURRENT_LIST_DIR}"
|
|
YYCC::YYCCommonplace
|
|
LibCmo
|
|
)
|
|
# Setup linked library infomation
|
|
target_link_libraries(BMap
|
|
PRIVATE
|
|
YYCC::YYCCommonplace
|
|
LibCmo
|
|
)
|
|
# Setup C++ standard
|
|
set_target_properties(BMap
|
|
PROPERTIES
|
|
CXX_STANDARD 20
|
|
CXX_STANDARD_REQUIRED 20
|
|
CXX_EXTENSION OFF
|
|
)
|
|
# Setup project macros
|
|
target_compile_definitions(BMap
|
|
# Enable export macro
|
|
PRIVATE
|
|
BMAP_EXPORTING
|
|
# Order Unicode charset for private using
|
|
PRIVATE
|
|
$<$<CXX_COMPILER_ID:MSVC>:UNICODE>
|
|
$<$<CXX_COMPILER_ID:MSVC>:_UNICODE>
|
|
)
|
|
# Order build as UTF-8 in MSVC
|
|
target_compile_options(BMap
|
|
PRIVATE
|
|
$<$<CXX_COMPILER_ID:MSVC>:/utf-8>
|
|
)
|
|
|
|
# Install BMap only on Release mode
|
|
install(TARGETS BMap
|
|
CONFIGURATIONS Release
|
|
RUNTIME DESTINATION ${YYCC_INSTALL_BIN_PATH}
|
|
)
|