include(FetchContent) find_package(PkgConfig REQUIRED) # rstd if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/rstd") add_subdirectory(rstd) else() FetchContent_Declare( rstd GIT_REPOSITORY https://github.com/hypengw/rstd.git GIT_TAG dacb8a9e7492c2b6231957c05b8f6fa4152d49cd GIT_SHALLOW 0 GIT_PROGRESS 1 EXCLUDE_FROM_ALL) FetchContent_MakeAvailable(rstd) endif() # asio add_library(asio INTERFACE) target_compile_definitions(asio INTERFACE ASIO_NO_DEPRECATED ASIO_NO_TYPEID ASIO_HAS_THREADS ${WIN_DEFS}) pkg_check_modules(ASIO QUIET asio>=1.30.2) if(NOT ASIO_FOUND) FetchContent_Declare( asio GIT_REPOSITORY https://github.com/chriskohlhoff/asio.git GIT_TAG asio-1-34-0 GIT_SHALLOW 1 GIT_PROGRESS 1 EXCLUDE_FROM_ALL) FetchContent_MakeAvailable(asio) target_include_directories(asio SYSTEM INTERFACE ${asio_SOURCE_DIR}/asio/include) message(STATUS "asio dir: ${asio_SOURCE_DIR}") else() target_include_directories(asio SYSTEM INTERFACE ${ASIO_INCLUDE_DIRS}) endif() # pegtl if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/pegtl") add_subdirectory(pegtl) else() FetchContent_Declare( pegtl GIT_REPOSITORY https://github.com/taocpp/PEGTL.git GIT_TAG 3.2.8 GIT_SHALLOW 1 GIT_PROGRESS 1 SYSTEM EXCLUDE_FROM_ALL FIND_PACKAGE_ARGS 3.2.7 QUIET GLOBAL) FetchContent_MakeAvailable(pegtl) endif() # ncrequest if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/ncrequest") add_subdirectory(ncrequest) else() FetchContent_Declare( ncrequest GIT_REPOSITORY https://github.com/hypengw/ncrequest.git GIT_TAG b919f0ad9a85dc006392ebf8802eb4c7df7584a2 GIT_SHALLOW 0 GIT_PROGRESS 1 EXCLUDE_FROM_ALL) FetchContent_MakeAvailable(ncrequest) endif() if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/kstore") add_subdirectory(kstore) else() FetchContent_Declare( kstore GIT_REPOSITORY https://github.com/hypengw/kstore.git GIT_TAG master GIT_SHALLOW 1 GIT_PROGRESS 1) FetchContent_MakeAvailable(kstore) endif() if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/qml_material") add_subdirectory(qml_material) else() FetchContent_Declare( qml_material GIT_REPOSITORY https://github.com/hypengw/QmlMaterial.git GIT_TAG main GIT_SHALLOW 1 GIT_PROGRESS 1 FIND_PACKAGE_ARGS GLOBAL) FetchContent_MakeAvailable(qml_material) endif() set(Random_BuildTests OFF) if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/random") add_subdirectory(random) else() FetchContent_Declare( random GIT_REPOSITORY https://github.com/ilqvya/random.git GIT_TAG 6983466aadd1173627b362ff1a297527d9842531 GIT_SHALLOW 0 GIT_PROGRESS 1 EXCLUDE_FROM_ALL) FetchContent_MakeAvailable(random) endif() add_library(random ALIAS effolkronium_random) # KDSingleApplication set(KDSingleApplication_QT6 ON) set(KDSingleApplication_STATIC ON) set(KDSingleApplication_TESTS OFF) set(KDSingleApplication_EXAMPLES OFF) set(KDSingleApplication_DOCS OFF) if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/KDSingleApplication") add_subdirectory(KDSingleApplication) else() FetchContent_Declare( KDSingleApplication GIT_REPOSITORY https://github.com/KDAB/KDSingleApplication.git GIT_TAG 631237acd4e20251c7f702db5e5434c83f0e336d GIT_SHALLOW 0 GIT_PROGRESS 1 SYSTEM EXCLUDE_FROM_ALL FIND_PACKAGE_ARGS QUIET GLOBAL) FetchContent_MakeAvailable(KDSingleApplication) endif() # cubeb set(BUILD_TESTS OFF) set(BUILD_TOOLS OFF) set(BUNDLE_SPEEX ON) set(USE_SANITIZERS OFF) set(USE_WINMM OFF) if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/cubeb") add_subdirectory(cubeb) else() FetchContent_Declare( cubeb GIT_REPOSITORY https://github.com/mozilla/cubeb.git GIT_TAG 78b2bce70e0d1c21d3c175b72f322c50801b2e94 GIT_SHALLOW 0 GIT_PROGRESS 1 SYSTEM EXCLUDE_FROM_ALL FIND_PACKAGE_ARGS GLOBAL) FetchContent_MakeAvailable(cubeb) endif() if(NOT TARGET cubeb::cubeb) add_library(cubeb::cubeb ALIAS cubeb) endif() add_subdirectory(qr_code)