Skip to content

Commit a390aa6

Browse files
committed
Expand CMake setup with actual examples
Add template setup Move CMake section
1 parent ffb4a49 commit a390aa6

1 file changed

Lines changed: 25 additions & 15 deletions

File tree

en/02_Development_environment.adoc

Lines changed: 25 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -278,21 +278,6 @@ image::/images/library_directory.png[]
278278

279279
Tinyobjloader can be installed with vcpkg like so: vcpkg install tinyobjloader
280280

281-
=== Setting up Visual Studio
282-
283-
==== Setting up a CMake project
284-
285-
Now that you have installed all the dependencies, we can set up a basic
286-
CMake project for Vulkan and write a little bit of code to make sure that
287-
everything works.
288-
289-
We will assume that you already have some basic experience with CMake, like
290-
how variables and rules work. If not, you can get up to speed very quickly with https://cmake.org/cmake/help/book/mastering-cmake/cmake/Help/guide/tutorial/[this tutorial].
291-
292-
You can now use the code from any of the following chapters found in the `attachment` folder as a template for your Vulkan projects. Make a copy, rename it to something like `HelloTriangle` and remove all the code in `main.cpp`.
293-
294-
Congratulations, you're all set for xref:03_Drawing_a_triangle/00_Setup/00_Base_code.adoc[playing with Vulkan]!
295-
296281
== Linux
297282

298283
These instructions will be aimed at Ubuntu, Fedora and Arch Linux users, but
@@ -515,3 +500,28 @@ You are now all set for xref:03_Drawing_a_triangle/00_Setup/00_Base_code.adoc[th
515500
== Android
516501

517502
Vulkan is a first-class API on Android and widely supported. But using it differs in several key areas from window management to build systems. So while the basic chapters focus on desktop platforms, the tutorial also has a xref:14_Android.adoc[dedicated chapter] that walks you through setting up your development environment and getting the tutorial code up-and-running on Android.
503+
504+
== Setting up a CMake project
505+
506+
Now that you have installed all the dependencies, we can set up a basic
507+
CMake project for Vulkan and write a little bit of code to make sure that
508+
everything works.
509+
510+
We will assume that you already have some basic experience with CMake, like
511+
how variables and rules work. If not, you can get up to speed very quickly with https://cmake.org/cmake/help/book/mastering-cmake/cmake/Help/guide/tutorial/[this tutorial].
512+
513+
The `attachment\template` folder contains a CMake template that you can use to create a project file in the `build` folder for your IDE of choice. Use this as a starting point to work along the tutorial:
514+
515+
----
516+
cd attachments\template
517+
cmake -B build -S . -DCMAKE_TOOLCHAIN_FILE=[path\to\vcpkg]\scripts\buildsystems\vcpkg.cmake
518+
----
519+
520+
Alternatively you can do the same in the `attachments` folder, which will create a project with all chapters from the tutorial:
521+
522+
----
523+
cd attachments
524+
cmake -B build -S . -DCMAKE_TOOLCHAIN_FILE=[path\to\vcpkg]\scripts\buildsystems\vcpkg.cmake
525+
----
526+
527+
Congratulations, you're all set for xref:03_Drawing_a_triangle/00_Setup/00_Base_code.adoc[playing with Vulkan]!

0 commit comments

Comments
 (0)