From 0ae2d389da9432767cc4cd69bf3a6a5d333d7472 Mon Sep 17 00:00:00 2001 From: Carter Li Date: Sun, 26 May 2024 07:50:30 +0800 Subject: [PATCH] CMake: we support FreeBSD only, not OpenBSD nor NetBSD --- CMakeLists.txt | 4 +- CMakeLists.txt.user.1c33b3b | 221 ++++++++++++++++++++++++++++++++++++ CMakeLists.txt.user.ab02f0a | 221 ++++++++++++++++++++++++++++++++++++ 3 files changed, 444 insertions(+), 2 deletions(-) create mode 100644 CMakeLists.txt.user.1c33b3b create mode 100644 CMakeLists.txt.user.ab02f0a diff --git a/CMakeLists.txt b/CMakeLists.txt index d79e99111..e531d2b87 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -14,9 +14,9 @@ set(PROJECT_LICENSE "MIT license") ################### if(ANDROID) set(LINUX FALSE) -elseif("${CMAKE_SYSTEM_NAME}" MATCHES ".*[Ll]inux.*") +elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux") set(LINUX TRUE CACHE BOOL "..." FORCE) # LINUX means GNU/Linux, not just the kernel -elseif("${CMAKE_SYSTEM_NAME}" MATCHES ".*[Bb][Ss][Dd].*") +elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "FreeBSD") set(BSD TRUE CACHE BOOL "..." FORCE) elseif(NOT APPLE AND NOT WIN32) message(FATAL_ERROR "Unsupported platform: ${CMAKE_SYSTEM_NAME}") diff --git a/CMakeLists.txt.user.1c33b3b b/CMakeLists.txt.user.1c33b3b new file mode 100644 index 000000000..6273a4137 --- /dev/null +++ b/CMakeLists.txt.user.1c33b3b @@ -0,0 +1,221 @@ + + + + + + EnvironmentId + {1c33b3b7-12c5-4868-b708-53ab11120412} + + + ProjectExplorer.Project.ActiveTarget + 0 + + + ProjectExplorer.Project.EditorSettings + + true + false + true + + Cpp + + CppGlobal + + + + QmlJS + + QmlJSGlobal + + + 2 + UTF-8 + false + 4 + false + 80 + true + true + 1 + 0 + false + true + false + 0 + true + true + 0 + 8 + true + false + 1 + true + true + true + *.md, *.MD, Makefile + false + true + true + + + + ProjectExplorer.Project.PluginSettings + + + true + false + true + true + true + true + + + 0 + true + + true + true + Builtin.DefaultTidyAndClazy + 2 + true + + + + true + + + + + ProjectExplorer.Project.Target.0 + + Desktop + Desktop + Desktop + {04d792c0-c702-4b96-887d-a5782122ecfc} + 0 + 0 + 0 + + Debug + 2 + false + + -DCMAKE_GENERATOR:STRING=Ninja +-DCMAKE_BUILD_TYPE:STRING=Build +-DCMAKE_PROJECT_INCLUDE_BEFORE:FILEPATH=%{BuildConfig:BuildDirectory:NativeFilePath}/.qtc/package-manager/auto-setup.cmake +-DQT_QMAKE_EXECUTABLE:FILEPATH=%{Qt:qmakeExecutable} +-DCMAKE_PREFIX_PATH:PATH=%{Qt:QT_INSTALL_PREFIX} +-DCMAKE_C_COMPILER:FILEPATH=%{Compiler:Executable:C} +-DCMAKE_CXX_COMPILER:FILEPATH=%{Compiler:Executable:Cxx} +-DCMAKE_CXX_FLAGS_INIT:STRING=%{Qt:QML_DEBUG_FLAG} + /home/carter/fastfetch + /home/carter/fastfetch/build + + + + + all + + false + + true + 构建 + CMakeProjectManager.MakeStep + + 1 + 构建 + 构建 + ProjectExplorer.BuildSteps.Build + + + + + + clean + + false + + true + 构建 + CMakeProjectManager.MakeStep + + 1 + 清除 + 清除 + ProjectExplorer.BuildSteps.Clean + + 2 + false + + false + + Build + CMakeProjectManager.CMakeBuildConfiguration + + 1 + + + 0 + 部署 + 部署 + ProjectExplorer.BuildSteps.Deploy + + 1 + + false + ProjectExplorer.DefaultDeployConfiguration + + 1 + + true + true + 0 + true + + 2 + + false + fastfetch + CMakeProjectManager.CMakeRunConfiguration.fastfetch + fastfetch + true + -s cpu + true + true + true + /home/carter/fastfetch/build + + + true + true + 0 + true + + 2 + + false + flashfetch + CMakeProjectManager.CMakeRunConfiguration.flashfetch + flashfetch + false + true + true + true + /home/carter/fastfetch/build + + 2 + + + + ProjectExplorer.Project.TargetCount + 1 + + + ProjectExplorer.Project.Updater.FileVersion + 22 + + + Version + 22 + + diff --git a/CMakeLists.txt.user.ab02f0a b/CMakeLists.txt.user.ab02f0a new file mode 100644 index 000000000..78c9d551a --- /dev/null +++ b/CMakeLists.txt.user.ab02f0a @@ -0,0 +1,221 @@ + + + + + + EnvironmentId + {ab02f0a8-bfe7-458b-bc72-6d840bfbeff0} + + + ProjectExplorer.Project.ActiveTarget + 0 + + + ProjectExplorer.Project.EditorSettings + + true + false + true + + Cpp + + CppGlobal + + + + QmlJS + + QmlJSGlobal + + + 2 + UTF-8 + false + 4 + false + 80 + true + true + 1 + 0 + false + true + false + 0 + true + true + 0 + 8 + true + false + 1 + true + true + true + *.md, *.MD, Makefile + false + true + true + + + + ProjectExplorer.Project.PluginSettings + + + true + false + true + true + true + true + + + 0 + true + + true + true + Builtin.DefaultTidyAndClazy + 2 + true + + + + true + + + + + ProjectExplorer.Project.Target.0 + + Desktop + 桌面 + 桌面 + {d30f125a-8978-4942-aa35-4fd6bd122abe} + 0 + 0 + 0 + + Debug + 2 + false + + -DCMAKE_GENERATOR:STRING=Ninja +-DCMAKE_BUILD_TYPE:STRING=Debug +-DCMAKE_PROJECT_INCLUDE_BEFORE:FILEPATH=%{BuildConfig:BuildDirectory:NativeFilePath}/.qtc/package-manager/auto-setup.cmake +-DQT_QMAKE_EXECUTABLE:FILEPATH=%{Qt:qmakeExecutable} +-DCMAKE_PREFIX_PATH:PATH=%{Qt:QT_INSTALL_PREFIX} +-DCMAKE_C_COMPILER:FILEPATH=%{Compiler:Executable:C} +-DCMAKE_CXX_COMPILER:FILEPATH=%{Compiler:Executable:Cxx} +-DCMAKE_CXX_FLAGS_INIT:STRING=%{Qt:QML_DEBUG_FLAG} + /home/carter/fastfetch + /home/carter/fastfetch/build + + + + + all + + false + + true + 构建 + CMakeProjectManager.MakeStep + + 1 + 构建 + 构建 + ProjectExplorer.BuildSteps.Build + + + + + + clean + + false + + true + 构建 + CMakeProjectManager.MakeStep + + 1 + 清除 + 清除 + ProjectExplorer.BuildSteps.Clean + + 2 + false + + false + + Debug + CMakeProjectManager.CMakeBuildConfiguration + + 1 + + + 0 + 部署 + 部署 + ProjectExplorer.BuildSteps.Deploy + + 1 + + false + ProjectExplorer.DefaultDeployConfiguration + + 1 + + true + true + 0 + true + + 2 + + false + fastfetch + CMakeProjectManager.CMakeRunConfiguration.fastfetch + fastfetch + true + -s physicalmemory + true + true + true + /home/carter/fastfetch/build + + + true + true + 0 + true + + 2 + + false + flashfetch + CMakeProjectManager.CMakeRunConfiguration.flashfetch + flashfetch + false + true + true + true + /home/carter/fastfetch/build + + 2 + + + + ProjectExplorer.Project.TargetCount + 1 + + + ProjectExplorer.Project.Updater.FileVersion + 22 + + + Version + 22 + +