Commit Graph

39 Commits

Author SHA1 Message Date
Charles Giessen
99e51d782e Enable PIC dependent on BUILD_SHARED_LIBS
While vk-bootstrap is a static library, it needs to have PIC enabled
if BUILD_SHARED_LIBS is on so it can work with shared libraries.
2024-03-27 11:32:16 -05:00
Charles Giessen
bc510bc421 Fix VK_BOOTSTRAP_INSTALL description string 2024-02-12 09:48:56 -06:00
Charles Giessen
ae05c97bdb Create Vulkan::Headers if CMake version is too low. 2023-12-14 11:24:51 -07:00
Charles Giessen
767bd1baf2 Fixup Clang on windows support
This commit fixes issues that prevented clang-cl & clang from being distinguished
on windows, resulting in improper command line arguments being used.

CMAKE_CXX_COMPILER_FRONTEND_VARIANT is the proper way to distinguish clang from
clang-cl, which have different command line options.
2023-12-06 14:07:18 -07:00
Charles Giessen
f223c8d5ae Cleanup CMake finding of Vulkan & installation code
Adds extensive integration tests that exercise the various ways of finding
the Vulkan-Headers.

vk-bootstrap should now use the Vulkan-Headers or Vulkan::Headers targets if
they were already defined (such as is the case of FetchContent), and will
look for the VulkanHeaders package and Vulkan package as a fallback, and will
FetchContent Vulkan-Headers directly if that fails.

This should make integration seamless with the various ways vulkan-headers
is acquired.

The vk-bootstrap-vulkan-headers target was dropped in favor of directly
linking to Vulkan-Headers (creating a target by that name if none exists).
2023-12-02 19:49:54 -07:00
Charles Giessen
a1a0aba737 Update C++ minimum to 17 2023-10-30 11:43:57 -06:00
Charles Giessen
be0df09b3a Update CMake minimum to 3.15
The Vulkan-Headers has a minimum of 3.15, and there is no great reason
to stay on such an old CMake version.
2023-10-09 13:24:09 -06:00
Charles Giessen
1ab85e9e55 Run tests in CI scripts
Make use of CTest to manage running tests, and configure the project to
allow Catch2 to work with CTest
2023-10-09 13:24:09 -06:00
Charles Giessen
f6006041c6 Mark vk-bootstrap as static & cleanup CMake
Marks the main vk-bootstrap library as a static library.

Removes unnecessary code, adds a language & description to the project
field.
2023-09-24 18:55:32 -06:00
Dani Camba
125652c9c6 fixed copypasted description of the option 2023-02-15 10:29:42 -07:00
Dani Camba
a5036f2368 add cmake options to hide warnings if is not main project 2023-02-15 10:29:42 -07:00
Charles Giessen
4ae9513ff9 Dont enable tests if building standalone
Previously, tests would always be enabled if the repo was the top
level project, which isn't desireable for users. This alters the logic
to, by default, only enabling tests when its a top level project, but
still allowing users to *not* enable tests by setting VK_BOOTSTRAP_TEST
to off.
2022-08-30 10:42:35 -06:00
Charles Giessen
b87fcf2da2 Add ci action to automate running autogen 2022-02-15 22:06:55 -07:00
Charles Giessen
d2898f822d Update vk-bootstrap to 1.3 2022-02-05 19:09:01 -07:00
Karn Kaul
f839350318 CMake: export vk-bootstrap and dependent targets
Enable upstream scripts to install the vk-boostrap-targets export-set directly.
2022-01-05 13:14:10 -07:00
sean
142986cdb7 Fix: Add VkBootstrapDispatch to includable files 2021-12-09 10:55:43 -07:00
Andreas Pokorny
a394a862bd fix minor typos and duplicate include paths 2021-09-06 15:10:59 -06:00
Charles Giessen
59a8965e15 Revert "Revert "add an option to enable warnings as errors""
This reverts commit 6db8cfba86.
2021-04-18 14:10:06 -06:00
Charles Giessen
6db8cfba86 Revert "add an option to enable warnings as errors"
This reverts commit 6bb00bf694.
2021-04-18 14:08:34 -06:00
SpaceIm
6bb00bf694 add an option to enable warnings as errors 2021-04-16 09:43:29 -06:00
Charles Giessen
4211068f10 cmake: Add VK_BOOTSTRAP_VULKAN_HEADER_DIR build option 2021-03-02 09:11:23 -07:00
Charles Giessen
0c29d98362 cmake: Don't require vulkan in order to build
find_package is used to try to find the Vulkan-Headers, and if they aren't
present, it downloads them with fetch content. This way users don't need
vulkan 'installed' on their system, specifically for windows users.

It also changes the tests to load all the necessary function pointers, that
 way we don't need to find the vulkan loader to build the tests.
2021-03-02 09:11:23 -07:00
SpaceIm
55b0e4e4ad add install target 2021-03-01 13:17:09 -07:00
SpaceIm
5109ef1d02 link to the library containing dlopen/dlclose 2021-03-01 13:17:09 -07:00
SpaceIm
ae3eaaf754 vk-boostrap requires C++14 2021-03-01 13:17:09 -07:00
Charles Giessen
812ce2cf0a Dynamically load vulkan instead of statically link.
Make vk-bootstrap capable of loading the vulkan runtime and not need to
link against the library. This improves the usability of vk-bootstrap since
now you don't need the vulkan library on your system to build.

This commit also changes how SystemInfo works so as to allow the dynamic
vulkan loading.
2020-08-10 23:38:26 -06:00
Charles Giessen
5e2b9e6827 Removed submodules, replaced with cmake fetch
This means that only if you ask for tests explicitely will
glfw and Catch2 be gotten, eliminating accidental submodule
recurses.
2020-06-08 17:30:29 -06:00
Piotr Kocia
3cc83cf6f8 Fixed detection of clang++ on windows 2020-05-14 08:21:10 -04:00
Charles Giessen
1daf83f541 Made clang-cl use the right warning flags 2020-05-03 21:54:40 -06:00
Lesley Lai
4483a5ee90 Migrate to Catch2 & CMake file structural change 2020-03-26 10:40:47 -06:00
Lesley Lai
fa772cbeac Create alias cmake target 2020-03-25 12:15:36 -06:00
Charles Giessen
3097f46074 Enabled warnings and fixes the warnings gcc/clang showed. Formatted CMakeLists.txt 2020-03-07 22:58:23 -07:00
Charles Giessen
a4ab8e099d Renamed many InstanceBuilder functions, added SystemInfo struct.
SystemInfo will be the way for users to know what is and isn't available on their system.
Currently, it only has booleans for if validation layers and debug messenger are available,
but more could be added in the future.
2020-03-07 01:46:25 -07:00
Charles Giessen
6933882f63 Got vk-bootstrap compiling on Windows and fixed class/struct inconsistency 2020-02-27 20:58:38 -07:00
Charles Giessen
8734ed18e0 moved triangle.cpp to its own folder, updated readme & license 2020-02-03 20:34:46 -07:00
Charles Giessen
39a3c37465 Fixed up swapchain, added an example based on vulkan-tutorial
Now there is a concise example of the library in use all the way to presenting.

Needs to be rewritten to remove exceptions, but for first pass its good enough.
2020-02-03 16:23:47 -07:00
Charles Giessen
37bc741658 Moved all source code into 2 files
This will make it easier to include in other projects.

Revamped how pNext chains work to no longer cause crashes.
2020-01-31 15:23:22 -07:00
Charles Giessen
155677ec0f Added glfw as git submodule + Catch2
Made the physical device, device, and swapchain builders take the required
parameters as constructor arugments.

Made tests optional using a cmake bool
2020-01-30 01:47:41 -07:00
Charles Giessen
d9ca075c86 First commit of Vk-Bootstrap
Library contains barebones implementations for simplified
	Instance creation
	Physical Device selection
	Device creation
	Swapchain Creation/Recreation

Much of the repo is WIP, and there is little to no testing.
Also, while a single header file is desired for the future, currently
it is structured more like a normal project with .cpp files
2020-01-30 01:20:18 -07:00