From 7848f5b87c533aa8fd185355683432a9a1f58e98 Mon Sep 17 00:00:00 2001 From: Hesam Date: Mon, 18 May 2020 02:51:32 +0430 Subject: [PATCH 1/2] Adding support for Visual Studio Code Added VS Code workspace files to Cinder and all of the samples. Updated Cmake guide to introduce VS Code as a free cross-platform IDE solution and how to use it along with cmakeTools and cppTools extensions --- docs/htmlsrc/guides/cmake/cmake.html | 25 +++++++++++++++++++ proj/cmake/Cinder.code-workspace | 11 ++++++++ .../proj/cmake/ArcballDemo.code-workspace | 12 +++++++++ .../proj/cmake/BasicApp.code-workspace | 12 +++++++++ .../cmake/BasicAppMultiWindow.code-workspace | 12 +++++++++ .../proj/cmake/BezierPath.code-workspace | 12 +++++++++ .../cmake/BezierPathIteration.code-workspace | 12 +++++++++ .../proj/cmake/CairoBasic.code-workspace | 12 +++++++++ .../proj/cmake/CameraPersp.code-workspace | 12 +++++++++ .../proj/cmake/CaptureBasic.code-workspace | 12 +++++++++ .../proj/cmake/CaptureCube.code-workspace | 12 +++++++++ .../proj/cmake/ClipboardBasic.code-workspace | 12 +++++++++ .../Compass/proj/cmake/Compass.code-workspace | 12 +++++++++ .../proj/cmake/Earthquake.code-workspace | 12 +++++++++ .../proj/cmake/EaseGallery.code-workspace | 12 +++++++++ .../Extrude/proj/cmake/Extrude.code-workspace | 12 +++++++++ .../proj/cmake/FallingGears.code-workspace | 12 +++++++++ .../FlickrTestMultithreaded.code-workspace | 12 +++++++++ .../proj/cmake/FontSample.code-workspace | 12 +++++++++ .../proj/cmake/FrustumCulling.code-workspace | 12 +++++++++ .../proj/cmake/Geometry.code-workspace | 12 +++++++++ .../proj/cmake/ImageFileBasic.code-workspace | 12 +++++++++ .../cmake/ImageHeightField.code-workspace | 12 +++++++++ .../proj/cmake/Kaleidoscope.code-workspace | 12 +++++++++ .../proj/cmake/LocationManager.code-workspace | 12 +++++++++ .../Logging/proj/cmake/Logging.code-workspace | 12 +++++++++ .../proj/cmake/MandelbrotGLSL.code-workspace | 12 +++++++++ .../proj/cmake/MotionBasic.code-workspace | 12 +++++++++ .../proj/cmake/MultiTouchBasic.code-workspace | 12 +++++++++ .../proj/cmake/ParamsBasic.code-workspace | 12 +++++++++ .../proj/cmake/Picking3D.code-workspace | 12 +++++++++ .../proj/cmake/QuaternionAccum.code-workspace | 12 +++++++++ .../cmake/QuickTimeAdvanced.code-workspace | 12 +++++++++ .../cmake/QuickTimeAvfWriter.code-workspace | 12 +++++++++ .../proj/cmake/QuickTimeBasic.code-workspace | 12 +++++++++ .../cmake/QuickTimeIteration.code-workspace | 12 +++++++++ .../proj/cmake/RDiffusion.code-workspace | 12 +++++++++ .../proj/cmake/Renderer2dBasic.code-workspace | 12 +++++++++ .../proj/cmake/SaveImage.code-workspace | 12 +++++++++ .../cmake/SerialCommunication.code-workspace | 12 +++++++++ .../StereoscopicRendering.code-workspace | 12 +++++++++ .../proj/cmake/SurfaceBasic.code-workspace | 12 +++++++++ .../TextBox/proj/cmake/TextBox.code-workspace | 12 +++++++++ .../proj/cmake/TextTest.code-workspace | 12 +++++++++ .../proj/cmake/TextureFont.code-workspace | 12 +++++++++ .../proj/cmake/Triangulation.code-workspace | 12 +++++++++ .../Tubular/proj/cmake/Tubular.code-workspace | 12 +++++++++ .../proj/cmake/VoronoiGpu.code-workspace | 12 +++++++++ .../proj/cmake/Wisteria.code-workspace | 12 +++++++++ .../proj/cmake/BufferPlayer.code-workspace | 12 +++++++++ .../proj/cmake/DelayFeedback.code-workspace | 12 +++++++++ .../proj/cmake/InputAnalyzer.code-workspace | 12 +++++++++ .../cmake/MultichannelOutput.code-workspace | 12 +++++++++ .../proj/cmake/NodeAdvanced.code-workspace | 12 +++++++++ .../proj/cmake/NodeBasic.code-workspace | 12 +++++++++ .../proj/cmake/NodeSubclassing.code-workspace | 12 +++++++++ .../proj/cmake/VoiceBasic.code-workspace | 12 +++++++++ .../cmake/VoiceBasicProcessing.code-workspace | 12 +++++++++ .../proj/cmake/ClothSimulation.code-workspace | 12 +++++++++ .../Cube/proj/cmake/Cube.code-workspace | 12 +++++++++ .../proj/cmake/CubeMapping.code-workspace | 12 +++++++++ .../proj/cmake/DeferredShading.code-workspace | 12 +++++++++ .../DeferredShadingAdvanced.code-workspace | 12 +++++++++ .../cmake/DynamicCubeMapping.code-workspace | 12 +++++++++ .../proj/cmake/FboBasic.code-workspace | 12 +++++++++ .../FboMultipleRenderTargets.code-workspace | 12 +++++++++ .../cmake/GeometryShaderBasic.code-workspace | 12 +++++++++ .../cmake/HighDynamicRange.code-workspace | 12 +++++++++ .../proj/cmake/ImmediateMode.code-workspace | 12 +++++++++ .../cmake/InstancedTeapots.code-workspace | 12 +++++++++ .../proj/cmake/CMakeLists.txt | 19 ++++++++++++++ .../cmake/LevelOfDetailBasic.code-workspace | 12 +++++++++ .../LevelOfDetailIndirect.code-workspace | 12 +++++++++ .../MipMap/proj/cmake/MipMap.code-workspace | 12 +++++++++ .../proj/cmake/MotionBlurFbo.code-workspace | 12 +++++++++ .../MotionBlurVelocityBuffer.code-workspace | 12 +++++++++ .../NVidiaComputeParticles.code-workspace | 12 +++++++++ .../proj/cmake/NormalMapping.code-workspace | 12 +++++++++ .../cmake/NormalMappingBasic.code-workspace | 12 +++++++++ .../proj/cmake/NvidiaMulticast.code-workspace | 12 +++++++++ .../proj/cmake/ObjLoader.code-workspace | 12 +++++++++ .../proj/cmake/PBOReadBack.code-workspace | 12 +++++++++ .../cmake/ParticleSphereCPU.code-workspace | 12 +++++++++ .../cmake/ParticleSphereCS.code-workspace | 12 +++++++++ .../cmake/ParticleSphereGPU.code-workspace | 12 +++++++++ .../proj/cmake/ParticlesBasic.code-workspace | 12 +++++++++ .../proj/cmake/PickingFBO.code-workspace | 12 +++++++++ .../cmake/PostProcessingAA.code-workspace | 12 +++++++++ .../proj/cmake/ShadowMapping.code-workspace | 12 +++++++++ .../cmake/ShadowMappingBasic.code-workspace | 12 +++++++++ .../cmake/StencilReflection.code-workspace | 12 +++++++++ .../proj/cmake/SuperformulaGPU.code-workspace | 12 +++++++++ .../cmake/TessellationBasic.code-workspace | 12 +++++++++ .../cmake/TessellationBezier.code-workspace | 12 +++++++++ ...sformFeedbackSmokeParticles.code-workspace | 12 +++++++++ .../VboMesh/proj/cmake/VboMesh.code-workspace | 12 +++++++++ .../proj/cmake/AnimatedReveal.code-workspace | 12 +++++++++ .../EuroMap/proj/cmake/EuroMap.code-workspace | 12 +++++++++ .../cmake/GoodNightMorning.code-workspace | 12 +++++++++ .../proj/cmake/SimpleViewer.code-workspace | 12 +++++++++ .../cmake/BasicAppendTween.code-workspace | 12 +++++++++ .../proj/cmake/BasicTween.code-workspace | 12 +++++++++ .../proj/cmake/CustomCallback.code-workspace | 12 +++++++++ .../proj/cmake/CustomLerp.code-workspace | 12 +++++++++ .../proj/cmake/DragTween.code-workspace | 12 +++++++++ .../proj/cmake/ImageAccordion.code-workspace | 12 +++++++++ .../proj/cmake/PaletteBrowser.code-workspace | 12 +++++++++ .../proj/cmake/TextInputTween.code-workspace | 12 +++++++++ .../cmake/VisualDictionary.code-workspace | 12 +++++++++ .../proj/cmake/perlinTest.code-workspace | 12 +++++++++ .../proj/cmake/slerpBasic.code-workspace | 12 +++++++++ 111 files changed, 1351 insertions(+) create mode 100644 proj/cmake/Cinder.code-workspace create mode 100644 samples/ArcballDemo/proj/cmake/ArcballDemo.code-workspace create mode 100644 samples/BasicApp/proj/cmake/BasicApp.code-workspace create mode 100644 samples/BasicAppMultiWindow/proj/cmake/BasicAppMultiWindow.code-workspace create mode 100644 samples/BezierPath/proj/cmake/BezierPath.code-workspace create mode 100644 samples/BezierPathIteration/proj/cmake/BezierPathIteration.code-workspace create mode 100644 samples/CairoBasic/proj/cmake/CairoBasic.code-workspace create mode 100644 samples/CameraPersp/proj/cmake/CameraPersp.code-workspace create mode 100644 samples/CaptureBasic/proj/cmake/CaptureBasic.code-workspace create mode 100644 samples/CaptureCube/proj/cmake/CaptureCube.code-workspace create mode 100644 samples/ClipboardBasic/proj/cmake/ClipboardBasic.code-workspace create mode 100644 samples/Compass/proj/cmake/Compass.code-workspace create mode 100644 samples/Earthquake/proj/cmake/Earthquake.code-workspace create mode 100644 samples/EaseGallery/proj/cmake/EaseGallery.code-workspace create mode 100644 samples/Extrude/proj/cmake/Extrude.code-workspace create mode 100644 samples/FallingGears/proj/cmake/FallingGears.code-workspace create mode 100644 samples/FlickrTestMultithreaded/proj/cmake/FlickrTestMultithreaded.code-workspace create mode 100644 samples/FontSample/proj/cmake/FontSample.code-workspace create mode 100644 samples/FrustumCulling/proj/cmake/FrustumCulling.code-workspace create mode 100644 samples/Geometry/proj/cmake/Geometry.code-workspace create mode 100644 samples/ImageFileBasic/proj/cmake/ImageFileBasic.code-workspace create mode 100644 samples/ImageHeightField/proj/cmake/ImageHeightField.code-workspace create mode 100644 samples/Kaleidoscope/proj/cmake/Kaleidoscope.code-workspace create mode 100644 samples/LocationManager/proj/cmake/LocationManager.code-workspace create mode 100644 samples/Logging/proj/cmake/Logging.code-workspace create mode 100644 samples/MandelbrotGLSL/proj/cmake/MandelbrotGLSL.code-workspace create mode 100644 samples/MotionBasic/proj/cmake/MotionBasic.code-workspace create mode 100644 samples/MultiTouchBasic/proj/cmake/MultiTouchBasic.code-workspace create mode 100644 samples/ParamsBasic/proj/cmake/ParamsBasic.code-workspace create mode 100644 samples/Picking3D/proj/cmake/Picking3D.code-workspace create mode 100644 samples/QuaternionAccum/proj/cmake/QuaternionAccum.code-workspace create mode 100644 samples/QuickTimeAdvanced/proj/cmake/QuickTimeAdvanced.code-workspace create mode 100644 samples/QuickTimeAvfWriter/proj/cmake/QuickTimeAvfWriter.code-workspace create mode 100644 samples/QuickTimeBasic/proj/cmake/QuickTimeBasic.code-workspace create mode 100644 samples/QuickTimeIteration/proj/cmake/QuickTimeIteration.code-workspace create mode 100644 samples/RDiffusion/proj/cmake/RDiffusion.code-workspace create mode 100644 samples/Renderer2dBasic/proj/cmake/Renderer2dBasic.code-workspace create mode 100644 samples/SaveImage/proj/cmake/SaveImage.code-workspace create mode 100644 samples/SerialCommunication/proj/cmake/SerialCommunication.code-workspace create mode 100644 samples/StereoscopicRendering/proj/cmake/StereoscopicRendering.code-workspace create mode 100644 samples/SurfaceBasic/proj/cmake/SurfaceBasic.code-workspace create mode 100644 samples/TextBox/proj/cmake/TextBox.code-workspace create mode 100644 samples/TextTest/proj/cmake/TextTest.code-workspace create mode 100644 samples/TextureFont/proj/cmake/TextureFont.code-workspace create mode 100644 samples/Triangulation/proj/cmake/Triangulation.code-workspace create mode 100644 samples/Tubular/proj/cmake/Tubular.code-workspace create mode 100644 samples/VoronoiGpu/proj/cmake/VoronoiGpu.code-workspace create mode 100644 samples/Wisteria/proj/cmake/Wisteria.code-workspace create mode 100644 samples/_audio/BufferPlayer/proj/cmake/BufferPlayer.code-workspace create mode 100644 samples/_audio/DelayFeedback/proj/cmake/DelayFeedback.code-workspace create mode 100644 samples/_audio/InputAnalyzer/proj/cmake/InputAnalyzer.code-workspace create mode 100644 samples/_audio/MultichannelOutput/proj/cmake/MultichannelOutput.code-workspace create mode 100644 samples/_audio/NodeAdvanced/proj/cmake/NodeAdvanced.code-workspace create mode 100644 samples/_audio/NodeBasic/proj/cmake/NodeBasic.code-workspace create mode 100644 samples/_audio/NodeSubclassing/proj/cmake/NodeSubclassing.code-workspace create mode 100644 samples/_audio/VoiceBasic/proj/cmake/VoiceBasic.code-workspace create mode 100644 samples/_audio/VoiceBasicProcessing/proj/cmake/VoiceBasicProcessing.code-workspace create mode 100644 samples/_opengl/ClothSimulation/proj/cmake/ClothSimulation.code-workspace create mode 100644 samples/_opengl/Cube/proj/cmake/Cube.code-workspace create mode 100644 samples/_opengl/CubeMapping/proj/cmake/CubeMapping.code-workspace create mode 100644 samples/_opengl/DeferredShading/proj/cmake/DeferredShading.code-workspace create mode 100644 samples/_opengl/DeferredShadingAdvanced/proj/cmake/DeferredShadingAdvanced.code-workspace create mode 100644 samples/_opengl/DynamicCubeMapping/proj/cmake/DynamicCubeMapping.code-workspace create mode 100644 samples/_opengl/FboBasic/proj/cmake/FboBasic.code-workspace create mode 100644 samples/_opengl/FboMultipleRenderTargets/proj/cmake/FboMultipleRenderTargets.code-workspace create mode 100644 samples/_opengl/GeometryShaderBasic/proj/cmake/GeometryShaderBasic.code-workspace create mode 100644 samples/_opengl/HighDynamicRange/proj/cmake/HighDynamicRange.code-workspace create mode 100644 samples/_opengl/ImmediateMode/proj/cmake/ImmediateMode.code-workspace create mode 100644 samples/_opengl/InstancedTeapots/proj/cmake/InstancedTeapots.code-workspace create mode 100644 samples/_opengl/LevelOfDetailBasic/proj/cmake/CMakeLists.txt create mode 100644 samples/_opengl/LevelOfDetailBasic/proj/cmake/LevelOfDetailBasic.code-workspace create mode 100644 samples/_opengl/LevelOfDetailIndirect/proj/cmake/LevelOfDetailIndirect.code-workspace create mode 100644 samples/_opengl/MipMap/proj/cmake/MipMap.code-workspace create mode 100644 samples/_opengl/MotionBlurFbo/proj/cmake/MotionBlurFbo.code-workspace create mode 100644 samples/_opengl/MotionBlurVelocityBuffer/proj/cmake/MotionBlurVelocityBuffer.code-workspace create mode 100644 samples/_opengl/NVidiaComputeParticles/proj/cmake/NVidiaComputeParticles.code-workspace create mode 100644 samples/_opengl/NormalMapping/proj/cmake/NormalMapping.code-workspace create mode 100644 samples/_opengl/NormalMappingBasic/proj/cmake/NormalMappingBasic.code-workspace create mode 100644 samples/_opengl/NvidiaMulticast/proj/cmake/NvidiaMulticast.code-workspace create mode 100644 samples/_opengl/ObjLoader/proj/cmake/ObjLoader.code-workspace create mode 100644 samples/_opengl/PBOReadBack/proj/cmake/PBOReadBack.code-workspace create mode 100644 samples/_opengl/ParticleSphereCPU/proj/cmake/ParticleSphereCPU.code-workspace create mode 100644 samples/_opengl/ParticleSphereCS/proj/cmake/ParticleSphereCS.code-workspace create mode 100644 samples/_opengl/ParticleSphereGPU/proj/cmake/ParticleSphereGPU.code-workspace create mode 100644 samples/_opengl/ParticlesBasic/proj/cmake/ParticlesBasic.code-workspace create mode 100644 samples/_opengl/PickingFBO/proj/cmake/PickingFBO.code-workspace create mode 100644 samples/_opengl/PostProcessingAA/proj/cmake/PostProcessingAA.code-workspace create mode 100644 samples/_opengl/ShadowMapping/proj/cmake/ShadowMapping.code-workspace create mode 100644 samples/_opengl/ShadowMappingBasic/proj/cmake/ShadowMappingBasic.code-workspace create mode 100644 samples/_opengl/StencilReflection/proj/cmake/StencilReflection.code-workspace create mode 100644 samples/_opengl/SuperformulaGPU/proj/cmake/SuperformulaGPU.code-workspace create mode 100644 samples/_opengl/TessellationBasic/proj/cmake/TessellationBasic.code-workspace create mode 100644 samples/_opengl/TessellationBezier/proj/cmake/TessellationBezier.code-workspace create mode 100644 samples/_opengl/TransformFeedbackSmokeParticles/proj/cmake/TransformFeedbackSmokeParticles.code-workspace create mode 100644 samples/_opengl/VboMesh/proj/cmake/VboMesh.code-workspace create mode 100644 samples/_svg/AnimatedReveal/proj/cmake/AnimatedReveal.code-workspace create mode 100644 samples/_svg/EuroMap/proj/cmake/EuroMap.code-workspace create mode 100644 samples/_svg/GoodNightMorning/proj/cmake/GoodNightMorning.code-workspace create mode 100644 samples/_svg/SimpleViewer/proj/cmake/SimpleViewer.code-workspace create mode 100644 samples/_timeline/BasicAppendTween/proj/cmake/BasicAppendTween.code-workspace create mode 100644 samples/_timeline/BasicTween/proj/cmake/BasicTween.code-workspace create mode 100644 samples/_timeline/CustomCallback/proj/cmake/CustomCallback.code-workspace create mode 100644 samples/_timeline/CustomLerp/proj/cmake/CustomLerp.code-workspace create mode 100644 samples/_timeline/DragTween/proj/cmake/DragTween.code-workspace create mode 100644 samples/_timeline/ImageAccordion/proj/cmake/ImageAccordion.code-workspace create mode 100644 samples/_timeline/PaletteBrowser/proj/cmake/PaletteBrowser.code-workspace create mode 100644 samples/_timeline/TextInputTween/proj/cmake/TextInputTween.code-workspace create mode 100644 samples/_timeline/VisualDictionary/proj/cmake/VisualDictionary.code-workspace create mode 100644 samples/perlinTest/proj/cmake/perlinTest.code-workspace create mode 100644 samples/slerpBasic/proj/cmake/slerpBasic.code-workspace diff --git a/docs/htmlsrc/guides/cmake/cmake.html b/docs/htmlsrc/guides/cmake/cmake.html index 7b458fbdbb..f45e321ede 100644 --- a/docs/htmlsrc/guides/cmake/cmake.html +++ b/docs/htmlsrc/guides/cmake/cmake.html @@ -23,6 +23,11 @@

Table of Contents

  • Running a Cinder sample directly from Cinder's main project.
  • +
  • Using Visual Studio Code to build libcinder and your application +
  • Structure of Cinder's CMake Files

    When done, you can configure and build the library and its samples using Ctrl+P + Cmake:Configure command along with the blue footer in VS Code. We encourage everyone to learn more about the Cmake Tools to be able to find their way around better. Here is a nice intro with notes about Kit selection, configuration and building.

    Custom configuration arguments using VS Code when building libcinder

    -

    When the workspace is opened, navigate to the root and find the .vs-code folder using the explorer pane of VS Code and open the settings.json file in the editor. Add or modify arguments in to cmake.configureSettings to have them passed to Cmake when configuring the project. By the default you will find BUILD_SHARED_LIBS:off which means that static libraries will be built. To find more about these possible arguments you can check the CmakeCache.txt in the build folder on root after the first configuration.

    +

    When the workspace is opened, go to File->Preferences->Settings, then select the Workspace tab, search for Cmake: Configure Settings and select Edit in settings.json. The workspace file opens up in the editor. Add or modify arguments in to cmake.configureSettings to have them passed to Cmake when configuring the project. You can also do this by directly editing the workspace file from the begining. By default you will find BUILD_SHARED_LIBS:off which means that static libraries will be built. To find more about these possible arguments you can check the CmakeCache.txt in the build folder on root after the first configuration.

    There’s no need to pass arguments about build type (i.e Debug, Release etc.) because VS Code gives access to those using the blue footer.

    Custom code formatting via .clang-format

    If you needed to change the formatting rules of the C++ extension, you can use the C_CPP:Clang_format_fallback Style settings. As a sample you can use this parameter to follow Cinder’s contribution guidelines: