inital, almost working cross-compilation setup with Visual Studio and cmake
This commit is contained in:
102
CMakePresets.json
Normal file
102
CMakePresets.json
Normal file
@@ -0,0 +1,102 @@
|
||||
{
|
||||
"version": 6,
|
||||
"configurePresets": [
|
||||
{
|
||||
"name": "base",
|
||||
"hidden": true,
|
||||
"generator": "Ninja",
|
||||
"binaryDir": "${sourceDir}/out/build/${presetName}",
|
||||
"installDir": "${sourceDir}/out/install/${presetName}",
|
||||
"cacheVariables": {
|
||||
"CMAKE_EXPORT_COMPILE_COMMANDS": "ON"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "windows-base",
|
||||
"hidden": true,
|
||||
"inherits": "base",
|
||||
"cacheVariables": {
|
||||
"CMAKE_C_COMPILER": "cl.exe",
|
||||
"CMAKE_CXX_COMPILER": "cl.exe"
|
||||
},
|
||||
"architecture": {
|
||||
"value": "x64",
|
||||
"strategy": "external"
|
||||
},
|
||||
"condition": {
|
||||
"type": "equals",
|
||||
"lhs": "${hostSystemName}",
|
||||
"rhs": "Windows"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "windows-dev",
|
||||
"displayName": "Windows Development (Dynamic SDL)",
|
||||
"inherits": "windows-base",
|
||||
"cacheVariables": {
|
||||
"CMAKE_BUILD_TYPE": "Debug",
|
||||
"PLATFORM": "windows",
|
||||
"SDL_LINK_TYPE": "dynamic"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "windows-release",
|
||||
"displayName": "Windows Release (Static SDL)",
|
||||
"inherits": "windows-base",
|
||||
"cacheVariables": {
|
||||
"CMAKE_BUILD_TYPE": "Release",
|
||||
"PLATFORM": "windows",
|
||||
"SDL_LINK_TYPE": "static"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "linux-base",
|
||||
"hidden": true,
|
||||
"inherits": "base",
|
||||
"cacheVariables": {
|
||||
"CMAKE_C_COMPILER": "gcc-12",
|
||||
"CMAKE_CXX_COMPILER": "g++-12"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "linux-dev",
|
||||
"displayName": "Linux Development (Dynamic SDL)",
|
||||
"inherits": "linux-base",
|
||||
"cacheVariables": {
|
||||
"CMAKE_BUILD_TYPE": "Debug",
|
||||
"PLATFORM": "linux",
|
||||
"SDL_LINK_TYPE": "dynamic"
|
||||
},
|
||||
"vendor": {
|
||||
"microsoft.com/VisualStudioSettings/CMake/1.0": {
|
||||
"hostOS": ["Linux"]
|
||||
},
|
||||
"microsoft.com/VisualStudioRemoteSettings/CMake/1.0": {
|
||||
"sourceDir": "$env{HOME}/.vs/$ms{projectDirName}",
|
||||
"copySourcesOptions": {
|
||||
"exclusionList": [
|
||||
".vs",
|
||||
"build",
|
||||
"prebuilt/windows"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "linux-release",
|
||||
"displayName": "Linux Release (Static SDL)",
|
||||
"inherits": "linux-dev",
|
||||
"cacheVariables": {
|
||||
"CMAKE_BUILD_TYPE": "Release",
|
||||
"SDL_LINK_TYPE": "static"
|
||||
}
|
||||
}
|
||||
],
|
||||
"buildPresets": [
|
||||
{ "name": "windows-dev", "configurePreset": "windows-dev" },
|
||||
{ "name": "windows-release", "configurePreset": "windows-release" },
|
||||
{ "name": "linux-dev", "configurePreset": "linux-dev" },
|
||||
{ "name": "linux-release", "configurePreset": "linux-release" }
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user