-
Notifications
You must be signed in to change notification settings - Fork 66
Building using CMake (Windows & Linux)
Iotivity also supports a cross platform CMake build system. CMake works by interpreting the instructions within the CMakeScript.txt files and generating a build system using this information. On Linux, a Makefile-based build system is generated by default, while on Windows it generates Visual Studio projects.
To initially set up the CMake build system, run the following commands:
mkdir build
cd build
cmake ../
On Linux, you build using make
, while on Windows you must open the generated .vcxproj files using Visual Studio, and then build it using the GUI.
You can configure the way Iotivity is built by modifying the CMake Cache Variables. These are found in build/CMakeCache.txt
. All variables that control Iotivity have the "OC_" prefix.
For instance, if you want to disable security, you must open build/CMakeCache.txt
in a text editor, search for OC_SECURITY_ENABLED
and then change its assigned value to OFF
. The next time the project is built, security will be disabled throughout all applications.