Added using toolchain files in CMakeSetting.json

This commit is contained in:
Patrix
2022-06-13 17:12:48 +02:00
parent 415ea9f95f
commit 35017f9527
3 changed files with 34 additions and 4 deletions

View File

@@ -10,7 +10,7 @@
"buildCommandArgs": "", "buildCommandArgs": "",
"ctestCommandArgs": "", "ctestCommandArgs": "",
"inheritEnvironments": [ "msvc_x86" ], "inheritEnvironments": [ "msvc_x86" ],
"variables": [] "cmakeToolchain": "windows-x86.cmake"
}, },
{ {
"name": "x86-Release", "name": "x86-Release",
@@ -22,7 +22,31 @@
"buildCommandArgs": "", "buildCommandArgs": "",
"ctestCommandArgs": "", "ctestCommandArgs": "",
"inheritEnvironments": [ "msvc_x86" ], "inheritEnvironments": [ "msvc_x86" ],
"variables": [] "cmakeToolchain": "windows-x86.cmake"
},
{
"name": "x64-Debug",
"generator": "Ninja",
"configurationType": "Debug",
"buildRoot": "${projectDir}\\out\\build\\${name}",
"installRoot": "${projectDir}\\out\\install\\${name}",
"cmakeCommandArgs": "",
"buildCommandArgs": "",
"ctestCommandArgs": "",
"inheritEnvironments": [ "msvc_x64_x64" ],
"cmakeToolchain": "windows-x64.cmake"
},
{
"name": "x64-Release",
"generator": "Ninja",
"configurationType": "RelWithDebInfo",
"buildRoot": "${projectDir}\\out\\build\\${name}",
"installRoot": "${projectDir}\\out\\install\\${name}",
"cmakeCommandArgs": "",
"buildCommandArgs": "",
"ctestCommandArgs": "",
"inheritEnvironments": [ "msvc_x64_x64" ],
"cmakeToolchain": "windows-x64.cmake"
} }
] ]
} }

View File

@@ -3,7 +3,10 @@
# specify the target system properties # specify the target system properties
set(CMAKE_SYSTEM_NAME Windows) set(CMAKE_SYSTEM_NAME Windows)
set(CMAKE_GENERATOR_PLATFORM x64 CACHE INTERNAL "")
if (CMAKE_GENERATOR MATCHES "Visual Studio*")
set(CMAKE_GENERATOR_PLATFORM x64 CACHE INTERNAL "")
endif()
# specify shared library suffix # specify shared library suffix
set(SHARED_LIBRARY_SUFFIX ${CMAKE_GENERATOR_PLATFORM}) set(SHARED_LIBRARY_SUFFIX ${CMAKE_GENERATOR_PLATFORM})

View File

@@ -3,7 +3,10 @@
# specify the target system properties # specify the target system properties
set(CMAKE_SYSTEM_NAME Windows) set(CMAKE_SYSTEM_NAME Windows)
set(CMAKE_GENERATOR_PLATFORM Win32 CACHE INTERNAL "")
if (CMAKE_GENERATOR MATCHES "Visual Studio*")
set(CMAKE_GENERATOR_PLATFORM Win32 CACHE INTERNAL "")
endif()
# specify shared library suffix # specify shared library suffix
set(SHARED_LIBRARY_SUFFIX "x86") set(SHARED_LIBRARY_SUFFIX "x86")