Commit Graph

72 Commits

Author SHA1 Message Date
Sandy Carter
95a0a20a01 bimg: Add texturec and cmake macro 2023-01-14 22:10:06 -05:00
Sandy Carter
1c7ef2d48f Add option to add user script
Useful for packagers like pacman and vcpkg to add custom cmake logic
instead of patching code.
2023-01-14 22:10:06 -05:00
Sandy Carter
03951e805c bimg: Restructure bimg*.cmake to be more like bimg*.lua 2023-01-14 22:10:06 -05:00
Sandy Carter
422e7cf0f8 bimg: Move bimg config to its own directory 2023-01-14 22:10:06 -05:00
Sandy Carter
576c2b9694 bx: Add bx.test and bx.bench 2023-01-13 09:12:03 -05:00
Sandy Carter
99537daccd bx: Add bin2c and cmake macro 2023-01-13 09:12:03 -05:00
Sandy Carter
34d0f372b1 bx: Move bx config to its own directory 2023-01-13 09:12:03 -05:00
Sandy Carter
ef8234966e Fix warnings related to CMP0054
The LINUX variable is only available in 3.25+
2023-01-07 22:08:47 -05:00
Sandy Carter
c85f396456 fix formatting for all cmake files 2023-01-07 09:54:59 -05:00
Sandy Carter
471da90712 Add cmake-format config
Improve formatting.
Use Tabs.
Make copyright one whole comment block.
Remove spaces inside of functions and after if.
Remove excessive whitespace.
Add github action to validate formatting.
2023-01-07 09:25:21 -05:00
Sandy Carter
54aaa9103d Add BGFX_CONFIG_DEBUG_ANNOTATION option
Disable for WindowsStore (UWP)
2022-12-03 13:59:05 -05:00
Hyreos
4e42ae2ae0 Prevent the script from trying to install tools that have been disabled
This commit fixes the issue of install failing if you disable any of the tools due to missing targets.
2022-11-20 17:23:21 -03:00
Johannes Schäufele
52feec47f5 bgfx: Add bgfx limits config options 2022-11-04 17:30:48 -04:00
e-erdal
6e23a39de6 Update submodules 2022-10-28 20:36:16 +03:00
Samuel Hellawell
5c54e5f299 Allow to specify which tools to compile
Signed-off-by: Samuel Hellawell <sshellawell@gmail.com>
2022-09-23 04:36:01 +01:00
Sandy Carter
2051444e25 Install bgfxToolUtils even if not building tools
Fixes corner case of cross compiling with tools from host platform
2022-08-24 11:56:03 -04:00
Sandy Carter
01c90714e1 export cmake function for shaderc_compiling
Remove unused add_shader and shaderc
Example usage:
```
shaderc_parse(
  CLI
  ${ARGS_TYPE} ${PLATFORM_I} WERROR
  "$<$<CONFIG:debug>:DEBUG>$<$<CONFIG:relwithdebinfo>:DEBUG>"
  FILE ${SHADER_FILE_ABSOLUTE}
  OUTPUT ${OUTPUT}
  PROFILE ${PROFILE}
  O "$<$<CONFIG:debug>:0>$<$<CONFIG:release>:3>$<$<CONFIG:relwithdebinfo>:3>$<$<CONFIG:minsizerel>:3>"
  VARYINGDEF ${ARGS_VARYING_DEF}
  INCLUDES ${BGFX_SHADER_INCLUDE_PATH}
  BIN2C BIN2C ${SHADER_FILE_NAME_WE}_${PROFILE_EXT}
)
```
2022-08-22 08:57:50 -04:00
Sandy Carter
12b75cc0ad config: Add option to turn on debug output on release 2022-08-07 08:33:26 -04:00
e-erdal
896ab5478c Add __cplusplus for MSVC 2022-06-24 11:42:25 +03:00
Sandy Carter
d725e78f86 bgfx: Add BGFX_MULTITHREADED option 2022-04-10 22:30:07 -04:00
alexandrebeaudet
72bc1cf167 CMake more precise includes path (in order to use some functions externally) 2022-01-07 10:57:18 +01:00
e-erdal
d3260f172c Add definition for BX_CONFIG_DEBUG 2021-10-28 11:06:14 +03:00
e-erdal
cf0d70f7d5 Add tinyexr to build files 2021-07-20 20:15:03 +03:00
e-erdal
4fbe36bace Merge pull request #15 from mattparks/patch-1
Use BGFX_DIR relative path when reading version.
2021-06-26 13:28:09 +03:00
Matthew Albrecht
3441d13ca2 Include cmake/version.cmake after set(BX_DIR). 2021-06-25 16:22:40 +01:00
Matthew Albrecht
4f48f1dfa5 Only include examples when examples or tools are built.
tools/texturev and tools/geometryv depend on example-common.
2021-06-23 22:18:27 -05:00
loanselot1
305a4a3fa2 Remove OVR 2021-05-08 13:34:10 +03:00
Бранимир Караџић
6c15eda963 Merge pull request #2 from bwrsandman/docs
Docs and licences install dir
2021-04-29 11:12:33 -07:00
Sandy Carter
2bd5c200d4 install: if generating shared, only install bgfx 2021-04-29 14:10:05 -04:00
Sandy Carter
970c3d0064 cmake: turn on CMAKE_POSITION_INDEPENDENT_CODE for shared
This prevents an error while linking libbx.a into libbgfx.so on linux
2021-04-29 14:10:05 -04:00
Sandy Carter
7ed9623d5d install: remove README from installed docs
bgfx.cmake's README is not documentation on how to use bgfx.
It is documentation on how to use bgfx.cmake to build, which is already
done once it's installed.
2021-01-30 20:23:24 -05:00
Sandy Carter
18e1ad78d6 install: put license in /usr/share/licences/bgfx 2021-01-30 20:21:55 -05:00
Sandy
22ffa2e003 Add option to build bgfx as shared lib (#79)
Closes #21
2020-06-11 06:19:41 -04:00
Matt Stevens
dbf05e9e9b Fix install readme.md which was changed to README.md (533a39f) (#90) 2020-05-12 11:13:43 -04:00
Sandy
9ff5ad27b1 android: fix ci build (#88) 2020-05-11 22:51:52 -04:00
Sandy
a424f7fecf fix install script when webgpu is not enabled (#87) 2020-05-11 11:43:52 -04:00
Sandy
6736f26db4 3rd party: Add webgpu cmake file (#84) 2020-05-11 04:08:02 -04:00
Matt Stevens
f4748dcc0a Remove BGFX_USE_DEBUG_SUFFIX, should use CMAKE_DEBUG_POSTFIX. (#81) 2020-05-10 22:38:06 -04:00
Matt Stevens
5af95aa5d5 Set bgfx PROJECT_VERSION from bgfx versioning scheme. (#80) 2020-05-10 22:34:20 -04:00
Matt Stevens
d608a1d935 Generate CMake package config files on INSTALL (#82) 2020-05-10 22:24:09 -04:00
pezcode
4264cca1f6 Set OpenGL (ES) minimum version without force-disabling other renderers (#74) 2020-05-04 00:04:03 -04:00
DarkContact
9021a19cf8 Add geometryv tool (#67) 2020-04-28 18:00:52 -04:00
Jonny Paton
d794f9431e Fix compiler flags for mixing objective/c++ in xcode (#68) 2020-01-30 11:20:32 -05:00
Sandy
f23cf9bf17 Add EXPORT to install targets (#59)
Add `EXPORT bgfx-config` with `bgfx::` namespace to auto generate a
`bgfx-config.cmake` file at install time (INSTALL on `visual studio` or `make
install` on MakeFile projects).
The file is for use with `find_package` and installs itself in the
lib directory under `cmake/bgfx/bgfx-config.cmake`.
If installed on a linux system, `find_package` will find this config
file without any configuration.
This config file allows dependent projects to use commands such as
linking with bgfx:
```
find_package(bgfx REQUIRED COMPONENTS bgfx)
target_link_libraries(dependent PUBLIC bgfx::bgfx)
```
or compiling a shader at build time:
```
find_package(bgfx REQUIRED COMPONENTS shaderc)
add_custom_command(OUTPUT compiled_shader.glsl
                   COMMAND
                       bgfx::shaderc
                       -f vs_input_shader.sc
                       -o compiled_shader.glsl
                       --type vertex)
```
2019-09-09 09:33:09 -04:00
Robert D. Blanchet Jr
834ec251e7 More build fixes. 2019-04-24 21:33:26 -05:00
Robert D. Blanchet Jr
c3f52fd76e Fix missing -ObjC flag. 2019-04-24 21:33:26 -05:00
Robert D. Blanchet Jr
8eb363a378 Updating submodules 2019-04-24 21:33:26 -05:00
Julien Hamaide
aeff603539 Option to specify minimum opengl version at compile time 2019-01-24 10:18:06 -06:00
Jonny
eb5bf5bf64 Add iOS support 2019-01-12 22:47:42 -06:00
tjysdsg
9a44462a6f fix issue #31: The body of constexpr function not a return-statement 2018-11-24 15:01:08 -06:00