CMake: How do I specify the target platform?
1 answer
When calling the command cmake
you can define a generator like Visual Studio 14 2015 Win64 which results in the target x64 platform
cmake -G"Visual Studio 14 2015 Win64" -H%SOURCE_ROOT_DIR% -BC:\build\vs2015\x64\MyProject
If you want to build for x86 on Windows with VS2015 - you would go like this:
cmake -G"Visual Studio 14 2015" -H%SOURCE_ROOT_DIR% -BC:\build\vs2015\x64\MyProject
ARM
cmake -G"Visual Studio 14 2015 ARM" -H%SOURCE_ROOT_DIR% -BC:\build\vs2015\x64\MyProject
Depending on your problem, the CMake toolchain file may help .
+2
source to share