-
Notifications
You must be signed in to change notification settings - Fork 80
Visual Studio/Ninja Multi-Config Build workflow branch from 109a4f4 #298
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 5 commits
c59a56e
6fd7883
d8640f4
19a620b
aa83dc8
867b810
c7ea7d2
7e49123
295716f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| cmake_minimum_required (VERSION 3.29) | ||
|
|
||
| project (VulkanTutorialRoot) | ||
| # This is to allow the CMakeLists.txt files in attachments/ to be accessed from root level | ||
| # Use command: cmake -S . -B build to configure from root level | ||
| # Then use command: cmake --build build to build from root level | ||
| # This will generate the build files in the build/ directory | ||
| # The build files will reference the source files in the attachments/ directory | ||
| # No need to change or delete any lines in attachments/ CMakeLists.txt files | ||
| # You can still build from attachments/ directory if needed | ||
| # Just navigate to attachments/ and run cmake and build commands as usual | ||
| add_subdirectory(attachments) | ||
|
|
||
| # Any other subdirectories can be added here | ||
| # Need to be carefull using CMAKE_SOURCE_DIR is points to the root level CMakeLists.txt | ||
| # Use CMAKE_CURRENT_SOURCE_DIR to point to the current directory instead | ||
| # For Simple Vulkan Engine project please uncomment the following line | ||
| # add_subdirectory(attachments/simple_engine) | ||
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't you just be able to cmake -S attachments -B build from the root level and achieve the same thing?
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi gpx1000
Yes, you can do that too. The idea here is to be able to cmake from root and from attachments directory or any decent directory if it is having CMakeLists.txt. But if you select to cmake from root it will be going into massive configuration stage for all projects under the root. But in cmake build stage I think I will go with selecting the target more than cmake all targets for time saving. Anyway, my recommendation will not break anything except just the notes I provided below.
Here is commands from the root directory
cmake -S attachments -B attachments/build/msvc -DCMAKE_TOOLCHAIN_FILE="$env:VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake" -DVCPKG_MANIFEST_DIR="./"
OR from attachments directory cmake -S . -B build/msvc -DCMAKE_TOOLCHAIN_FILE="$env:VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake" -DVCPKG_MANIFEST_DIR="../"
Also if you want to use root CMakeLists.txt
cmake -S . -B build/msvc -DCMAKE_TOOLCHAIN_FILE="$env:VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake"