I don't need it currently for my projects and it gets accidentally set to the mingw-w64 include path which is wrong for a MSVC build.
302 lines
16 KiB
JSON
302 lines
16 KiB
JSON
{
|
|
"version": 5,
|
|
"cmakeMinimumRequired": {"major": 3, "minor": 23, "patch": 0},
|
|
"configurePresets": [
|
|
{
|
|
"name": "default",
|
|
"displayName": "Default config using Ninja",
|
|
"description": "Keeps defaults, uses Ninja, base for any of the other presets",
|
|
"generator": "Ninja",
|
|
"binaryDir": "$env{BUILD_DIR}/${sourceDirName}/default",
|
|
"cacheVariables": {},
|
|
"environment": {"TEST_FILE_PATH": "${sourceDir}/testfiles"}
|
|
},
|
|
{
|
|
"name": "no-webview",
|
|
"inherits": "default",
|
|
"displayName": "Disables web view",
|
|
"description": "Same as default but disables web view",
|
|
"binaryDir": "$env{BUILD_DIR}/${sourceDirName}/default-no-webview",
|
|
"cacheVariables": {
|
|
"WEBVIEW_PROVIDER": {"type": "STRING", "value": "none"}
|
|
}
|
|
},
|
|
{
|
|
"name": "no-kde",
|
|
"inherits": "default",
|
|
"displayName": "Disables KDE integrations",
|
|
"description": "Same as default but disables KDE integrations",
|
|
"binaryDir": "$env{BUILD_DIR}/${sourceDirName}/default-no-kde",
|
|
"cacheVariables": {
|
|
"NO_PLASMOID": {"type": "BOOL", "value": "ON"},
|
|
"NO_FILE_ITEM_ACTION_PLUGIN": {"type": "BOOL", "value": "ON"}
|
|
}
|
|
},
|
|
{
|
|
"name": "qt6",
|
|
"inherits": "default",
|
|
"displayName": "Use Qt 6 (instead of Qt 5)",
|
|
"description": "Same as default but configures use of Qt 6 (only relevant if project uses Qt)",
|
|
"binaryDir": "$env{BUILD_DIR}/${sourceDirName}/default-qt6",
|
|
"cacheVariables": {
|
|
"QT_PACKAGE_PREFIX": {"type": "STRING", "value": "Qt6"},
|
|
"KF_PACKAGE_PREFIX": {"type": "STRING", "value": "KF6"},
|
|
"BUILD_WITH_QT6": {"type": "BOOL", "value": "ON"}
|
|
}
|
|
},
|
|
{
|
|
"name": "ccache",
|
|
"inherits": "default",
|
|
"displayName": "Use ccache",
|
|
"description": "Same as default but uses ccache",
|
|
"cacheVariables": {
|
|
"CMAKE_C_COMPILER_LAUNCHER": {"type": "STRING", "value": "ccache"},
|
|
"CMAKE_CXX_COMPILER_LAUNCHER": {"type": "STRING", "value": "ccache"}
|
|
}
|
|
},
|
|
{
|
|
"name": "devel",
|
|
"inherits": "ccache",
|
|
"displayName": "Generic development config",
|
|
"description": "Development build with testsuite using ccache with many warnings enabled and treated as errors",
|
|
"binaryDir": "$env{BUILD_DIR}/${sourceDirName}/devel",
|
|
"cacheVariables": {
|
|
"ENABLE_DEVEL_DEFAULTS": {"type": "BOOL", "value": "ON"},
|
|
"CONFIGURATION_NAME": {"type": "STRING", "value": "devel"},
|
|
"CONFIGURATION_PACKAGE_SUFFIX": {"type": "STRING", "value": "-devel"},
|
|
"CONFIGURATION_PACKAGE_SUFFIX_QTUTILITIES": {"type": "STRING", "value": "-devel"},
|
|
"CONFIGURATION_PACKAGE_SUFFIX_QTFORKAWESOME": {"type": "STRING", "value": "-devel"},
|
|
"CONFIGURATION_TARGET_SUFFIX": {"type": "STRING", "value": "devel"}
|
|
}
|
|
},
|
|
{
|
|
"name": "devel-qt6",
|
|
"inherits": ["qt6", "devel"],
|
|
"displayName": "Generic development config using Qt 6",
|
|
"description": "Same as devel but configures use of Qt 6 (only relevant if project uses Qt)",
|
|
"binaryDir": "$env{BUILD_DIR}/${sourceDirName}/devel-qt6",
|
|
"cacheVariables": {
|
|
"QT_PACKAGE_PREFIX": {"type": "STRING", "value": "Qt6"},
|
|
"QT_MAJOR_VERSION": {"type": "STRING", "value": "6"},
|
|
"KF_PACKAGE_PREFIX": {"type": "STRING", "value": "KF6"},
|
|
"BUILD_WITH_QT6": {"type": "BOOL", "value": "ON"}
|
|
}
|
|
},
|
|
{
|
|
"name": "debug",
|
|
"inherits": "devel",
|
|
"displayName": "Generic debug build with development config",
|
|
"description": "Same as devel but creates a debug build",
|
|
"binaryDir": "$env{BUILD_DIR}/${sourceDirName}/debug",
|
|
"cacheVariables": {
|
|
"CMAKE_BUILD_TYPE": {"type": "STRING", "value": "Debug"}
|
|
}
|
|
},
|
|
{
|
|
"name": "debug-qt6",
|
|
"inherits": ["debug", "devel-qt6"],
|
|
"displayName": "Generic debug build with development config using Qt 6",
|
|
"description": "Same as devel-qt6 but creates a debug build",
|
|
"binaryDir": "$env{BUILD_DIR}/${sourceDirName}/debug-qt6"
|
|
},
|
|
{
|
|
"name": "debug-kde",
|
|
"inherits": "debug-qt6",
|
|
"displayName": "Generic debug build with development config using custom KDE build",
|
|
"description": "Same as devel but creates a debug build",
|
|
"binaryDir": "$env{BUILD_DIR}/${sourceDirName}/debug-kde",
|
|
"cacheVariables": {
|
|
"CMAKE_FIND_ROOT_PATH": {"type": "PATH", "value": "$env{KDE_INSTALL_DIR}"},
|
|
"CMAKE_INSTALL_PREFIX": {"type": "PATH", "value": "$env{KDE_INSTALL_DIR}"}
|
|
}
|
|
},
|
|
{
|
|
"name": "arch-x86_64-w64-mingw32",
|
|
"inherits": ["no-webview", "no-kde"],
|
|
"displayName": "Target x86_64-w64-mingw32 using Arch Linux's mingw-w64 packaging",
|
|
"description": "Build targeting x86_64-w64-mingw32, paths and flags are specific to Arch Linux's mingw-w64 packaging",
|
|
"binaryDir": "$env{BUILD_DIR}/${sourceDirName}/arch-x86_64-w64-mingw32",
|
|
"toolchainFile": "/usr/share/mingw/toolchain-x86_64-w64-mingw32.cmake",
|
|
"environment": {
|
|
"CROSS_TOOL_PREFIX": "x86_64-w64-mingw32-",
|
|
"CROSS_INSTALL_PREFIX": "/usr/x86_64-w64-mingw32",
|
|
"CPPFLAGS": "-D_FORTIFY_SOURCE=2 -D_GLIBCXX_ASSERTIONS",
|
|
"CFLAGS": "$env{CPPFLAGS} -O2 -pipe -fno-plt -fexceptions --param=ssp-buffer-size=4 -Wformat -Werror=format-security -fcf-protection",
|
|
"CXXFLAGS": "$env{CPPFLAGS} -O2 -pipe -fno-plt -fexceptions --param=ssp-buffer-size=4 -Wformat -Werror=format-security -fcf-protection",
|
|
"LDFLAGS": "-Wl,-O1,--sort-common,--as-needed -fstack-protector",
|
|
"PATH": "$env{CROSS_INSTALL_PREFIX}/bin:$penv{PATH}"
|
|
},
|
|
"cacheVariables": {
|
|
"BUILD_SHARED_LIBS": {"type": "BOOL", "value": "ON"},
|
|
"VERSIONED_MINGW_LIBRARIES": {"type": "BOOL", "value": "ON"},
|
|
"CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES": {"type": "PATH", "value": "$env{CROSS_INSTALL_PREFIX}/include"},
|
|
"CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES": {"type": "PATH", "value": "$env{CROSS_INSTALL_PREFIX}/include"},
|
|
"CMAKE_CROSSCOMPILING_EMULATOR": {"type": "PATH", "value": "/usr/bin/x86_64-w64-mingw32-wine"}
|
|
}
|
|
},
|
|
{
|
|
"name": "arch-x86_64-w64-mingw32-static",
|
|
"inherits": "arch-x86_64-w64-mingw32",
|
|
"displayName": "Target x86_64-w64-mingw32 using Arch Linux's mingw-w64 packaging (static)",
|
|
"description": "Build targeting x86_64-w64-mingw32, paths and flags are specific to Arch Linux's mingw-w64 packaging",
|
|
"binaryDir": "$env{BUILD_DIR}/${sourceDirName}/arch-x86_64-w64-mingw32-static",
|
|
"toolchainFile": "/usr/share/mingw/toolchain-x86_64-w64-mingw32-static.cmake",
|
|
"cacheVariables": {
|
|
"BUILD_SHARED_LIBS": {"type": "BOOL", "value": "OFF"}
|
|
}
|
|
},
|
|
{
|
|
"name": "arch-x86_64-w64-mingw32-qt6",
|
|
"inherits": ["qt6", "arch-x86_64-w64-mingw32"],
|
|
"displayName": "Combination of qt6 and arch-x86_64-w64-mingw32",
|
|
"description": "See description of qt6 and arch-x86_64-w64-mingw32",
|
|
"binaryDir": "$env{BUILD_DIR}/${sourceDirName}/arch-x86_64-w64-mingw32-qt6"
|
|
},
|
|
{
|
|
"name": "arch-x86_64-w64-mingw32-static-qt6",
|
|
"inherits": ["qt6", "arch-x86_64-w64-mingw32-static"],
|
|
"displayName": "Combination of qt6 and arch-x86_64-w64-mingw32-static",
|
|
"description": "See description of qt6 and arch-x86_64-w64-mingw32-static",
|
|
"binaryDir": "$env{BUILD_DIR}/${sourceDirName}/arch-x86_64-w64-mingw32-static-qt6"
|
|
},
|
|
{
|
|
"name": "arch-x86_64-w64-mingw32-devel",
|
|
"inherits": ["devel", "arch-x86_64-w64-mingw32"],
|
|
"displayName": "Combination of devel and arch-x86_64-w64-mingw32",
|
|
"description": "See descriptions of devel and arch-x86_64-w64-mingw32",
|
|
"binaryDir": "$env{BUILD_DIR}/${sourceDirName}/arch-x86_64-w64-mingw32-devel"
|
|
},
|
|
{
|
|
"name": "arch-static-compat",
|
|
"inherits": ["no-webview", "no-kde", "qt6"],
|
|
"displayName": "Target static-compat environment for Arch Linux",
|
|
"description": "Build using static-compat packages for Arch Linux found in my PKGBUILDs repo",
|
|
"binaryDir": "$env{BUILD_DIR}/${sourceDirName}/arch-static-compat",
|
|
"environment": {
|
|
"CROSS_INSTALL_PREFIX": "/usr/static-compat",
|
|
"CC": "$env{CROSS_INSTALL_PREFIX}/bin/gcc",
|
|
"CXX": "$env{CROSS_INSTALL_PREFIX}/bin/g++",
|
|
"CFLAGS": "$penv{CFLAGS} -fPIC -static-libgcc -static-libstdc++",
|
|
"CXXFLAGS": "$penv{CXXFLAGS} -fPIC -static-libgcc -static-libstdc++",
|
|
"LDFLAGS": "$penv{LDFLAGS} -static-libgcc -static-libstdc++",
|
|
"PKG_CONFIG_PATH": "$env{CROSS_INSTALL_PREFIX}/lib/pkgconfig:$env{CROSS_INSTALL_PREFIX}/share/pkgconfig",
|
|
"PKG_CONFIG_SYSROOT_DIR": "$env{CROSS_INSTALL_PREFIX}",
|
|
"PKG_CONFIG_LIBDIR": "$env{CROSS_INSTALL_PREFIX}/lib/pkgconfig:$env{CROSS_INSTALL_PREFIX}/share/pkgconfig",
|
|
"PATH": "$env{CROSS_INSTALL_PREFIX}/bin:$penv{PATH}"
|
|
},
|
|
"cacheVariables": {
|
|
"BUILD_SHARED_LIBS": {"type": "BOOL", "value": "OFF"},
|
|
"CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES": {"type": "PATH", "value": "$env{CROSS_INSTALL_PREFIX}/include"},
|
|
"CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES": {"type": "PATH", "value": "$env{CROSS_INSTALL_PREFIX}/include"},
|
|
"CMAKE_INSTALL_PREFIX": {"type": "PATH", "value": "$env{CROSS_INSTALL_PREFIX}"},
|
|
"CMAKE_FIND_ROOT_PATH": {"type": "PATH", "value": "$env{CROSS_INSTALL_PREFIX}"},
|
|
"CMAKE_DISABLE_FIND_PACKAGE_harfbuzz": {"type": "BOOL", "value": "ON"},
|
|
"Boost_USE_STATIC_RUNTIME": {"type": "BOOL", "value": "ON"},
|
|
"GLIB2_USE_PKG_CONFIG": {"type": "BOOL", "value": "ON"},
|
|
"WAYLAND_USE_PKG_CONFIG": {"type": "BOOL", "value": "ON"}
|
|
}
|
|
},
|
|
{
|
|
"name": "arch-static-compat-devel",
|
|
"inherits": ["devel", "arch-static-compat"],
|
|
"displayName": "Combination of devel and arch-static-compat",
|
|
"description": "See descriptions of devel and arch-static-compat",
|
|
"binaryDir": "$env{BUILD_DIR}/${sourceDirName}/arch-static-compat-devel"
|
|
},
|
|
{
|
|
"name": "win-x64-msvc-static",
|
|
"inherits": ["no-webview", "no-kde", "qt6"],
|
|
"displayName": "Target x64-windows-static on Windows",
|
|
"description": "Build on Windows targeting x64-windows-static using MSVC, Qt 6 (for Qt libs and CMake/Ninja), vcpkg (for other dependencies) and MSYS2 (for Perl, Go, ffmpeg and other tools)",
|
|
"binaryDir": "$env{BUILD_DIR}/${sourceDirName}/win-x64-msvc-static",
|
|
"environment": {
|
|
"INCLUDE": "$env{MSVC_ROOT}/include;$env{MSVC_ROOT}/ATLMFC/include;$env{WIN_KITS_ROOT}/include/10.0.22000.0/ucrt;$env{WIN_KITS_ROOT}//include/10.0.22000.0//um;$env{WIN_KITS_ROOT}//include/10.0.22000.0//shared;$env{WIN_KITS_ROOT}/include/10.0.22000.0//winrt;$env{WIN_KITS_ROOT}/include/10.0.22000.0//cppwinrt",
|
|
"LIB": "$env{MSVC_ROOT}/ATLMFC/lib/x64;$env{MSVC_ROOT}/lib/x64;$env{WIN_KITS_ROOT}/lib/10.0.22000.0/ucrt/x64;$env{WIN_KITS_ROOT}/lib/10.0.22000.0//um/x64",
|
|
"LIBPATH": "$env{MSVC_ROOT}/ATLMFC/lib/x64;$env{MSVC_ROOT}/lib/x64;$env{WIN_KITS_ROOT}/lib/10.0.22000.0/ucrt/x64;$env{WIN_KITS_ROOT}/lib/10.0.22000.0/um/x64"
|
|
},
|
|
"cacheVariables": {
|
|
"BUILD_SHARED_LIBS": {"type": "BOOL", "value": "OFF"},
|
|
"CMAKE_BUILD_TYPE": {"type": "STRING", "value": "Release"},
|
|
"CMAKE_TOOLCHAIN_FILE": {"type": "FILEPATH", "value": "$env{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake"},
|
|
"CMAKE_FIND_ROOT_PATH": {"type": "PATH", "value": "$env{VCPKG_ROOT}/installed/x64-windows-static"},
|
|
"CMAKE_PREFIX_PATH": {"type": "PATH", "value": "$env{QT_ROOT}"},
|
|
"CMAKE_MAKE_PROGRAM": {"type": "FILEPATH", "value": "$env{QT_TOOLS}/Ninja/ninja.exe"},
|
|
"CMAKE_AR_COMPILER": {"type": "FILEPATH", "value": "$env{MSVC_ROOT}/bin/Hostx64/x64/lib.exe"},
|
|
"CMAKE_C_COMPILER": {"type": "FILEPATH", "value": "$env{MSVC_ROOT}/bin/HostX64/x64/cl.exe"},
|
|
"CMAKE_CXX_COMPILER": {"type": "FILEPATH", "value": "$env{MSVC_ROOT}/bin/HostX64/x64/cl.exe"},
|
|
"CMAKE_RC_COMPILER": {"type": "FILEPATH", "value": "$env{WIN_KITS_ROOT}/bin/10.0.22000.0/x64/rc.exe"},
|
|
"CMAKE_LINKER": {"type": "FILEPATH", "value": "$env{MSVC_ROOT}/bin/Hostx64/x64/link.exe"},
|
|
"CMAKE_MT": {"type": "FILEPATH", "value": "$env{WIN_KITS_ROOT}/bin/10.0.22000.0/x64/mt.exe"},
|
|
"CMAKE_MSVC_RUNTIME_LIBRARY": {"type": "STRING", "value": "MultiThreaded$<$<CONFIG:Debug>:Debug>"},
|
|
"CMAKE_CXX_FLAGS_DEBUG": {"type": "STRING", "value": "/MTd /Zi /Ob0 /Od /RTC1"},
|
|
"CMAKE_CXX_FLAGS_RELEASE": {"type": "STRING", "value": "/MT /O2 /Ob2 /DNDEBUG"},
|
|
"CMAKE_CXX_FLAGS_MINSIZEREL": {"type": "STRING", "value": "/MT /O1 /Ob1 /DNDEBUG"},
|
|
"CMAKE_CXX_FLAGS_RELWITHDEBINFO": {"type": "STRING", "value": "/MT /Zi /O2 /Ob1 /DNDEBUG"},
|
|
"VCPKG_TARGET_TRIPLET": {"type": "STRING", "value": "x64-windows-static"},
|
|
"PERL_BIN": {"type": "FILEPATH", "value": "$env{MSYS2_ROOT}/usr/bin/perl.exe"},
|
|
"DOXYGEN_BIN": {"type": "FILEPATH", "value": "$env{MSYS2_ROOT}/mingw64/bin/doxygen.exe"},
|
|
"CLANG_FORMAT_BIN": {"type": "FILEPATH", "value": "$env{MSYS2_ROOT}/mingw64/bin/clang-format.exe"},
|
|
"GO_BIN": {"type": "FILEPATH", "value": "$env{MSYS2_ROOT}/mingw64/bin/go.exe"},
|
|
"FFMPEG_BIN": {"type": "FILEPATH", "value": "$env{MSYS2_ROOT}/mingw64/bin/ffmpeg.exe"},
|
|
"REALPATH_BIN": {"type": "FILEPATH", "value": "$env{MSYS2_ROOT}/usr/bin/realpath.exe"},
|
|
"FORCE_EXTERNAL_ICONV": {"type": "BOOL", "value": "ON"},
|
|
"CPP_UNIT_LIB": {"type": "FILEPATH", "value": "$env{VCPKG_ROOT}/installed/x64-windows-static/lib/cppunit.lib"},
|
|
"CPP_UNIT_INCLUDE_DIR": {"type": "PATH", "value": "$env{VCPKG_ROOT}/installed/x64-windows-static/include"},
|
|
"Vulkan_INCLUDE_DIR": {"type": "PATH", "value": ""},
|
|
"QUICK_GUI": {"type": "BOOL", "value": "OFF"}
|
|
}
|
|
},
|
|
{
|
|
"name": "win-x64-msvc-static-devel",
|
|
"inherits": ["win-x64-msvc-static", "devel"],
|
|
"displayName": "Combination of devel and win-x64-msvc-static",
|
|
"description": "See descriptions of devel and win-x64-msvc-static",
|
|
"binaryDir": "$env{BUILD_DIR}/${sourceDirName}/win-x64-msvc-static-devel",
|
|
"cacheVariables": {
|
|
"CLANG_FORMAT_ENABLED": {"type": "BOOL", "value": "OFF"},
|
|
"CLANG_TIDY_ENABLED": {"type": "BOOL", "value": "OFF"},
|
|
"CMAKE_FORMAT_ENABLED": {"type": "BOOL", "value": "OFF"}
|
|
}
|
|
},
|
|
{
|
|
"name": "win-x64-msvc-static-debug",
|
|
"inherits": ["debug", "win-x64-msvc-static-devel"],
|
|
"displayName": "Combination of debug and win-x64-msvc-static",
|
|
"description": "See descriptions of debug and win-x64-msvc-static",
|
|
"binaryDir": "$env{BUILD_DIR}/${sourceDirName}/win-x64-msvc-static-debug",
|
|
"cacheVariables": {
|
|
"CMAKE_C_COMPILER_LAUNCHER": {"type": "STRING", "value": ""},
|
|
"CMAKE_CXX_COMPILER_LAUNCHER": {"type": "STRING", "value": ""},
|
|
"CPP_UNIT_LIB": {"type": "FILEPATH", "value": "$env{VCPKG_ROOT}/installed/x64-windows-static/debug/lib/cppunitd.lib"}
|
|
}
|
|
}
|
|
],
|
|
"buildPresets": [
|
|
{"name": "default", "configurePreset": "default"},
|
|
{"name": "qt6", "configurePreset": "qt6"},
|
|
{"name": "devel", "configurePreset": "devel"},
|
|
{"name": "devel-qt6", "configurePreset": "devel-qt6"},
|
|
{"name": "debug", "configurePreset": "debug"},
|
|
{"name": "debug-qt6", "configurePreset": "debug-qt6"},
|
|
{"name": "debug-kde", "configurePreset": "debug-kde"},
|
|
{"name": "arch-x86_64-w64-mingw32", "configurePreset": "arch-x86_64-w64-mingw32"},
|
|
{"name": "arch-x86_64-w64-mingw32-static", "configurePreset": "arch-x86_64-w64-mingw32-static"},
|
|
{"name": "arch-x86_64-w64-mingw32-qt6", "configurePreset": "arch-x86_64-w64-mingw32-qt6"},
|
|
{"name": "arch-x86_64-w64-mingw32-static-qt6", "configurePreset": "arch-x86_64-w64-mingw32-static-qt6"},
|
|
{"name": "arch-x86_64-w64-mingw32-devel", "configurePreset": "arch-x86_64-w64-mingw32-devel"},
|
|
{"name": "arch-static-compat", "configurePreset": "arch-static-compat"},
|
|
{"name": "arch-static-compat-devel", "configurePreset": "arch-static-compat-devel"},
|
|
{"name": "win-x64-msvc-static", "configurePreset": "win-x64-msvc-static"},
|
|
{"name": "win-x64-msvc-static-devel", "configurePreset": "win-x64-msvc-static-devel"},
|
|
{"name": "win-x64-msvc-static-debug", "configurePreset": "win-x64-msvc-static-debug"}
|
|
],
|
|
"testPresets": [
|
|
{
|
|
"name": "default",
|
|
"configurePreset": "default",
|
|
"output": {"outputOnFailure": true},
|
|
"execution": {"noTestsAction": "error", "stopOnFailure": true}
|
|
}
|
|
]
|
|
}
|