227 lines
9.1 KiB
CMake
227 lines
9.1 KiB
CMake
include_guard(GLOBAL)
|
|
include("${CMAKE_CURRENT_LIST_DIR}/base.cmake")
|
|
block()
|
|
set(tinyxml2_opts
|
|
-Dtinyxml2_BUILD_TESTING=OFF
|
|
-Dtinyxml2_INSTALL_PKGCONFIG=OFF
|
|
-Dtinyxml2_SHARED_LIBS=OFF
|
|
-Dtinyxml2_INSTALL_CMAKEDIR=lib/cmake/tinyxml2
|
|
)
|
|
_register_git_cmake_library(global::tinyxml2
|
|
"https://github.com/leethomason/tinyxml2.git"
|
|
"11.0.0"
|
|
)
|
|
rcl_get_effective_install_dir(global::tinyxml2 TINYXML2_ROOT)
|
|
set(TINYXML2_CONFIG_DIR "${TINYXML2_ROOT}/lib/cmake/tinyxml2")
|
|
rcl_cmake_library_set_cmake_options(global::tinyxml2 ${tinyxml2_opts})
|
|
rcl_cmake_library_set_other_use_opt(global::tinyxml2
|
|
"-Dtinyxml2_DIR=\"${TINYXML2_CONFIG_DIR}\""
|
|
)
|
|
rcl_cmake_library_set_init_script(global::tinyxml2
|
|
"set(tinyxml2_DIR \"${TINYXML2_CONFIG_DIR}\")"
|
|
)
|
|
rcl_cmake_library_set_clear_script(global::tinyxml2
|
|
"unset(tinyxml2_DIR)"
|
|
)
|
|
rcl_cmake_library_set_cmake_options(global::tinyxml2 ${tinyxml2_opts})
|
|
set(jsoncpp_opts ${base_options})
|
|
list(APPEND jsoncpp_opts
|
|
"-DJSONCPP_WITH_TESTS=OFF"
|
|
"-DJSONCPP_WITH_POST_BUILD_UNITTEST=OFF"
|
|
"-DJSONCPP_WITH_EXAMPLE=OFF"
|
|
"-DJSONCPP_WITH_DOC=OFF"
|
|
)
|
|
_register_git_cmake_library(global::jsoncpp
|
|
https://github.com/open-source-parsers/jsoncpp.git
|
|
"1.9.6"
|
|
)
|
|
rcl_get_effective_install_dir(global::jsoncpp _jsoncpp_install_dir)
|
|
set(JSONCPP_ROOT ${_jsoncpp_install_dir})
|
|
set(JSONCPP_INCLUDE_DIRS ${JSONCPP_ROOT}/include)
|
|
if (MSVC)
|
|
set(JSONCPP_LIBRARIES ${JSONCPP_ROOT}/lib/jsoncpp_static.lib)
|
|
else ()
|
|
set(JSONCPP_LIBRARIES ${JSONCPP_ROOT}/lib/libjsoncpp.a)
|
|
endif ()
|
|
rcl_cmake_library_set_cmake_options(global::jsoncpp ${jsoncpp_opts})
|
|
rcl_cmake_library_set_other_use_opt(global::jsoncpp
|
|
"-DJSONCPP_INCLUDE_DIRS=\"${JSONCPP_INCLUDE_DIRS}\""
|
|
"-DJSONCPP_LIBRARIES=\"${JSONCPP_LIBRARIES}\""
|
|
)
|
|
rcl_cmake_library_set_init_script(global::jsoncpp
|
|
"set(JSONCPP_ROOT \"${JSONCPP_ROOT}\")"
|
|
"set(JSONCPP_INCLUDE_DIRS \"${JSONCPP_INCLUDE_DIRS}\")"
|
|
"set(JSONCPP_LIBRARIES \"${JSONCPP_LIBRARIES}\")"
|
|
)
|
|
rcl_cmake_library_set_clear_script(global::jsoncpp
|
|
"unset(JSONCPP_ROOT)"
|
|
"unset(JSONCPP_INCLUDE_DIRS)"
|
|
"unset(JSONCPP_LIBRARIES)"
|
|
)
|
|
# 闈瀋make浠撳簱
|
|
#set(asio_opts ${base_options})
|
|
#_register_git_cmake_library_opt(
|
|
# asio
|
|
# https://github.com/chriskohlhoff/asio.git
|
|
# "asio-1-38-0"
|
|
# asio_opts
|
|
#)
|
|
set(fmt_option ${base_options})
|
|
_register_git_cmake_library(global::fmt
|
|
"https://github.com/fmtlib/fmt.git"
|
|
"12.1.0"
|
|
)
|
|
rcl_cmake_library_set_cmake_options(global::fmt ${fmt_option})
|
|
#set(imgui_option ${base_options})
|
|
#_register_git_cmake_library_opt(
|
|
# imgui
|
|
# "https://github.com/ocornut/imgui.git"
|
|
# "v1.92.8"
|
|
# imgui_option
|
|
#)
|
|
# https://github.com/google/benchmark
|
|
#BENCHMARK_USE_BUNDLED_GTEST
|
|
set(benchmark_opt ${base_options})
|
|
list(APPEND benchmark_opt "-DBENCHMARK_DOWNLOAD_DEPENDENCIES=ON")
|
|
_register_git_cmake_library(global::benchmark
|
|
"https://github.com/google/benchmark.git"
|
|
"v1.9.5"
|
|
)
|
|
rcl_cmake_library_set_cmake_options(global::benchmark ${benchmark_opt})
|
|
set(mbedtls_opts ${base_options})
|
|
_register_git_cmake_library(global::mbedtls
|
|
"https://github.com/Mbed-TLS/mbedtls.git"
|
|
"v3.6.4"
|
|
)
|
|
rcl_cmake_library_set_cmake_options(global::mbedtls ${mbedtls_opts})
|
|
set(libxml2_opts ${base_options})
|
|
_register_git_cmake_library(global::libxml2
|
|
"https://github.com/GNOME/libxml2.git"
|
|
"v2.15.1"
|
|
)
|
|
rcl_cmake_library_set_cmake_options(global::libxml2 ${libxml2_opts})
|
|
set(websocketpp_opts ${base_options})
|
|
_register_git_cmake_library(global::websocketpp
|
|
"https://github.com/zaphoyd/websocketpp.git"
|
|
"0.8.2"
|
|
)
|
|
rcl_cmake_library_set_cmake_options(global::websocketpp ${websocketpp_opts})
|
|
set(trantor_opts ${base_options})
|
|
_register_git_cmake_library(global::trantor
|
|
"https://github.com/an-tao/trantor.git"
|
|
"v1.5.28"
|
|
)
|
|
rcl_cmake_library_set_cmake_options(global::trantor ${trantor_opts})
|
|
rcl_get_effective_install_dir(global::trantor _trantor_install_dir)
|
|
rcl_cmake_library_set_other_use_opt(global::trantor
|
|
"-DTrantor_DIR=${_trantor_install_dir}/lib/cmake/Trantor"
|
|
)
|
|
#find_path()
|
|
set(drogon_opts ${base_options})
|
|
list(APPEND drogon_opts "-DBUILD_CTL=OFF")
|
|
list(APPEND drogon_opts "-DBUILD_EXAMPLES=OFF")
|
|
list(APPEND drogon_opts "-DBUILD_ORM=OFF")
|
|
list(APPEND drogon_opts "-DCOZ_PROFILING=OFF")
|
|
list(APPEND drogon_opts "-DBUILD_SHARED_LIBS=OFF")
|
|
list(APPEND drogon_opts "-DBUILD_DOC=OFF")
|
|
list(APPEND drogon_opts "-DBUILD_BROTLI=OFF")
|
|
list(APPEND drogon_opts "-DBUILD_YAML_CONFIG=ON")
|
|
list(APPEND drogon_opts "-DUSE_SUBMODULE=OFF")
|
|
list(APPEND drogon_opts "-DUSE_STATIC_LIBS_ONLY=ON")
|
|
_register_git_cmake_library(global::drogon
|
|
"https://github.com/drogonframework/drogon.git"
|
|
"v1.9.13"
|
|
)
|
|
rcl_cmake_library_set_cmake_options(global::drogon ${drogon_opts})
|
|
rcl_cmake_library_set_deps(global::drogon libzip trantor jsoncpp zlib)
|
|
rcl_cmake_library_set_init_script(global::drogon
|
|
"if (NOT TARGET std::filesystem)"
|
|
" add_library(std::filesystem INTERFACE IMPORTED GLOBAL)"
|
|
" set_property(TARGET std::filesystem APPEND PROPERTY INTERFACE_COMPILE_FEATURES cxx_std_17)"
|
|
"endif ()"
|
|
"set(Filesystem_FOUND TRUE)"
|
|
"set(Filesystem_Final_FOUND TRUE)"
|
|
"message(drogon 加载filesystem!)"
|
|
)
|
|
set(ghc_filesystem_opts ${base_options})
|
|
_register_git_cmake_library(global::ghc_filesystem
|
|
"https://github.com/gulrak/filesystem.git"
|
|
"v1.5.14"
|
|
)
|
|
rcl_cmake_library_set_cmake_options(global::ghc_filesystem ${ghc_filesystem_opts})
|
|
set(cppzmq_opts ${base_options})
|
|
_register_git_cmake_library(global::cppzmq
|
|
"https://github.com/zeromq/cppzmq.git"
|
|
"v4.11.0"
|
|
)
|
|
rcl_cmake_library_set_cmake_options(global::cppzmq ${cppzmq_opts})
|
|
set(eigen_opts ${base_options})
|
|
_register_git_cmake_library(global::eigen
|
|
"https://github.com/eigenteam/eigen-git-mirror.git"
|
|
"3.3.7"
|
|
)
|
|
rcl_cmake_library_set_cmake_options(global::eigen ${eigen_opts})
|
|
set(libzmq_opts ${base_options})
|
|
_register_git_cmake_library(global::libzmq
|
|
"https://github.com/zeromq/libzmq.git"
|
|
"v4.3.5"
|
|
)
|
|
rcl_cmake_library_set_cmake_options(global::libzmq ${libzmq_opts})
|
|
set(protobuf_opts ${base_options})
|
|
list(APPEND protobuf_opts "-Dprotobuf_BUILD_TESTS=OFF")
|
|
list(APPEND protobuf_opts "-Dprotobuf_BUILD_SHARED_LIBS=OFF")
|
|
_register_git_cmake_library(global::protobuf
|
|
"https://github.com/protocolbuffers/protobuf.git"
|
|
"v33.2"
|
|
)
|
|
rcl_cmake_library_set_cmake_options(global::protobuf ${protobuf_opts})
|
|
set(gflags_opts ${base_options})
|
|
_register_git_cmake_library(global::gflags
|
|
"https://github.com/gflags/gflags.git"
|
|
"v2.3.0"
|
|
)
|
|
rcl_cmake_library_set_cmake_options(global::gflags ${gflags_opts})
|
|
set(brpc_opts ${base_options})
|
|
_register_git_cmake_library(global::brpc
|
|
"https://github.com/apache/brpc.git"
|
|
"1.15.0"
|
|
)
|
|
rcl_cmake_library_set_cmake_options(global::brpc ${brpc_opts})
|
|
_register_git_cmake_library(global::cmocka
|
|
"https://github.com/clibs/cmocka.git"
|
|
"cmocka-1.1.5"
|
|
)
|
|
rcl_cmake_library_set_cmake_options(global::cmocka ${cmocka_opts})
|
|
_register_git_cmake_library(global::expected
|
|
"https://github.com/palacaze/sigslot.git"
|
|
"v1.3.1"
|
|
)
|
|
rcl_cmake_library_set_cmake_options(global::expected ${expected_opts})
|
|
set(sigslot_opts ${base_options})
|
|
_register_git_cmake_library(global::sigslot
|
|
"https://github.com/palacaze/sigslot.git"
|
|
"v1.2.3"
|
|
)
|
|
rcl_cmake_library_set_cmake_options(global::sigslot ${sigslot_opts})
|
|
#add_compile_options("$<$<C_COMPILER_ID:MSVC>:/utf-8>")
|
|
#add_compile_options("$<$<CXX_COMPILER_ID:MSVC>:/utf-8>")
|
|
set(SQLiteCpp_opts ${base_options})
|
|
list(APPEND SQLiteCpp_opts "-DSQLITECPP_RUN_CPPCHECK=OFF")
|
|
_register_git_cmake_library(global::SQLiteCpp
|
|
"https://github.com/SRombauts/SQLiteCpp.git"
|
|
"3.3.3"
|
|
)
|
|
rcl_cmake_library_set_cmake_options(global::SQLiteCpp ${SQLiteCpp_opts})
|
|
_register_git_cmake_library(global::pybind11
|
|
"https://github.com/pybind/pybind11.git"
|
|
"v3.0.4"
|
|
)
|
|
rcl_cmake_library_set_cmake_options(global::pybind11 ${SQLiteCpp_opts})
|
|
#set(boost_locale_opts ${base_options})
|
|
#_register_git_cmake_library_opt(
|
|
# "boost_locale"
|
|
# "https://github.com/boostorg/locale.git"
|
|
# "boost-1.91.0"
|
|
# boost_locale_opts
|
|
#)
|
|
endblock() |