You can use CMake to generate project files for specific IDEs. Use cmake --help to see available generators for your platform.
Windows (Visual Studio)
To create Visual Studio solution (.sln) and project files (.vcxproj), use the -G flag.
For 64-bit applications:
Use the Win64 generator (e.g., Visual Studio 14 2015 Win64).
Using the cl compiler directly (NMake):
cmake -G "NMake Makefiles" -DCMAKE_BUILD_TYPE:string="Release" -DBUILD_SHARED_LIBS:bool=on -DCMAKE_INSTALL_PREFIX:path="%USERPROFILE%" -DCMAKE_LIBRARY_PATH:path="%USERPROFILE%" -DCMAKE_INCLUDE_PATH:path="%USERPROFILE%\include" ..
MacOS
If the build fails on MacOS, try adding the following flag to your CMake command:
-DCMAKE_OSX_ARCHITECTURES:STRING=i386
# Example for Visual Studio 14 2015 64-bit
cmake -G "Visual Studio 14 2015 Win64" -DCMAKE_BUILD_TYPE:string="Release" -DBUILD_SHARED_LIBS:bool=on -DCMAKE_INSTALL_PREFIX:path="%USERPROFILE%" -DCMAKE_LIBRARY_PATH:path="%USERPROFILE%" -DCMAKE_INCLUDE_PATH:path="%USERPROFILE%\include" ..