ThingWorx Edge C SDK > Porting to Another Platform > Defining the Chosen OS
  
Defining the Chosen OS
Building with CMake
With CMake, you can build for a variety of operating systems. CMake automatically detects the native operating system and chooses the appropriate build tools.
If you would like to manually specify an IDE within the native operating system, see the CMake documentation for the list of supported generators.
If you would like to cross compile, see the CMake documentation on how to set up cross compiling with a specified toolchain. Some cross-compiling examples exist as the PLATFORM option in CMakeLists.txt file, but the required cross-compile tools must be downloaded separately from the ThingWorx C SDK.
If a new porting section is created, you need to add the section to the Compiler and Linker section of the CMakeLists.txt file. See the examples provided in the distribution bundle for the C SDK (each example has subdirectories for osx, linux, and win).