代码拉取完成,页面将自动刷新
同步操作将从 totravel/minidocx 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
cmake_minimum_required(VERSION 3.21)
project(myproj VERSION 0.3.0 LANGUAGES C CXX) # C needed by zip.c
option(BUILD_EXAMPLES "Build examples" ON)
option(WITH_STATIC_CRT "Use static C Runtime library" OFF)
set(THIRD_PARTY_DIR "${CMAKE_CURRENT_SOURCE_DIR}/3rdparty" CACHE PATH "3rdparty")
set(ZIP_DIR "${THIRD_PARTY_DIR}/zip-0.2.1" CACHE PATH "zip")
set(PUGIXML_DIR "${THIRD_PARTY_DIR}/pugixml-1.12.1" CACHE PATH "pugixml")
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_DEBUG_POSTFIX d)
add_library(zip INTERFACE)
set_target_properties(zip PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${ZIP_DIR}/src"
INTERFACE_SOURCES "${ZIP_DIR}/src/zip.c"
)
add_library(pugixml INTERFACE)
set_target_properties(pugixml PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${PUGIXML_DIR}/src"
INTERFACE_SOURCES "${PUGIXML_DIR}/src/pugixml.cpp"
)
add_library(minidocx STATIC)
target_sources(minidocx PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/src/minidocx.cpp")
target_include_directories(minidocx PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/src")
target_include_directories(minidocx PUBLIC "${PUGIXML_DIR}/src")
target_link_libraries(minidocx PRIVATE zip pugixml)
if(WITH_STATIC_CRT)
set_target_properties(minidocx
PROPERTIES
MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
endif()
if(BUILD_EXAMPLES)
link_libraries(minidocx)
add_executable(basic examples/basic.cpp)
add_executable(traverse examples/traverse.cpp)
add_executable(breaks examples/breaks.cpp)
add_executable(spacing_indent examples/spacing_indent.cpp)
add_executable(paragraph examples/paragraph.cpp)
add_executable(section examples/section.cpp)
add_executable(run examples/run.cpp)
add_executable(read examples/read.cpp)
add_executable(table examples/table.cpp)
add_executable(table_advanced examples/table_advanced.cpp)
add_executable(text_frame examples/text_frame.cpp)
endif()
install(TARGETS minidocx)
install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/src/minidocx.hpp" TYPE INCLUDE)
install(FILES "${PUGIXML_DIR}/src/pugixml.hpp" TYPE INCLUDE)
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。