From c0cec9d83b1ec8333a665dabefe4bd1461c393a4 Mon Sep 17 00:00:00 2001 From: Vadim Troshchinskiy Shmelev Date: Thu, 19 Oct 2023 12:46:31 +0200 Subject: [PATCH] Add CMake files --- CMakePresets.json | 17 ++++++++++++++++ qtermwidget/CMakePresets.json | 17 ++++++++++++++++ .../cmake/qtermwidget6-config.cmake.in | 20 +++++++++++++++++++ 3 files changed, 54 insertions(+) create mode 100644 CMakePresets.json create mode 100644 qtermwidget/CMakePresets.json create mode 100644 qtermwidget/cmake/qtermwidget6-config.cmake.in diff --git a/CMakePresets.json b/CMakePresets.json new file mode 100644 index 0000000..f5371d5 --- /dev/null +++ b/CMakePresets.json @@ -0,0 +1,17 @@ +{ + "version": 2, + "configurePresets": [ + { + "name": "Default", + "displayName": "Configure preset using toolchain file", + "description": "Sets Ninja generator, build and install directory", + "generator": "Ninja", + "binaryDir": "${sourceDir}/out/build/${presetName}", + "cacheVariables": { + "CMAKE_BUILD_TYPE": "Debug", + "CMAKE_TOOLCHAIN_FILE": "", + "CMAKE_INSTALL_PREFIX": "${sourceDir}/out/install/${presetName}" + } + } + ] +} \ No newline at end of file diff --git a/qtermwidget/CMakePresets.json b/qtermwidget/CMakePresets.json new file mode 100644 index 0000000..f5371d5 --- /dev/null +++ b/qtermwidget/CMakePresets.json @@ -0,0 +1,17 @@ +{ + "version": 2, + "configurePresets": [ + { + "name": "Default", + "displayName": "Configure preset using toolchain file", + "description": "Sets Ninja generator, build and install directory", + "generator": "Ninja", + "binaryDir": "${sourceDir}/out/build/${presetName}", + "cacheVariables": { + "CMAKE_BUILD_TYPE": "Debug", + "CMAKE_TOOLCHAIN_FILE": "", + "CMAKE_INSTALL_PREFIX": "${sourceDir}/out/install/${presetName}" + } + } + ] +} \ No newline at end of file diff --git a/qtermwidget/cmake/qtermwidget6-config.cmake.in b/qtermwidget/cmake/qtermwidget6-config.cmake.in new file mode 100644 index 0000000..db62356 --- /dev/null +++ b/qtermwidget/cmake/qtermwidget6-config.cmake.in @@ -0,0 +1,20 @@ +# - Find the QTermWidget include and library +# +# Typical usage: +# find_package(QTermWidget5 REQUIRED) +# +# add_executable(foo main.cpp) +# target_link_libraries(foo qtermwidget5) + +@PACKAGE_INIT@ + +if (CMAKE_VERSION VERSION_LESS 3.0.2) + message(FATAL_ERROR \"qtermwidget requires at least CMake version 3.0.2\") +endif() + +if (NOT TARGET @QTERMWIDGET_LIBRARY_NAME@) + if (POLICY CMP0024) + cmake_policy(SET CMP0024 NEW) + endif() + include("${CMAKE_CURRENT_LIST_DIR}/@QTERMWIDGET_LIBRARY_NAME@-targets.cmake") +endif()