Compare commits

...

32 Commits

Author SHA1 Message Date
dependabot[bot]
38de01cd8a build(deps): bump the submodules group with 2 updates (#214)
* build(deps): bump the submodules group with 2 updates

Bumps the submodules group with 2 updates: [bgfx](https://github.com/bkaradzic/bgfx) and [bx](https://github.com/bkaradzic/bx).


Updates `bgfx` from `e2c5b1d` to `8b6a6bd`
- [Commits](e2c5b1d3e1...8b6a6bdf0e)

Updates `bx` from `96748d9` to `198cd12`
- [Commits](96748d9a58...198cd120e4)

---
updated-dependencies:
- dependency-name: bgfx
  dependency-type: direct:production
  dependency-group: submodules
- dependency-name: bx
  dependency-type: direct:production
  dependency-group: submodules
...

Signed-off-by: dependabot[bot] <support@github.com>

* Update to c++17

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Sandy <bwrsandman@gmail.com>
2023-08-01 14:36:58 -04:00
Sandy Carter
560dcb227e always run _bgfx_crosscompile_use_host_tool 2023-07-15 20:05:35 -04:00
Sandy Carter
b3dae62c95 Don't fail if installed from build without tools 2023-07-15 20:05:35 -04:00
Sandy Carter
a1a7828ab0 Fix the way headers are installed
Fix missing bx headers when compiling SHARED
Fix compat and tinystl being installed in include root
Move submodule specific installs to their respecive config files.
2023-07-14 23:28:00 -04:00
Sandy
11810052be Add missing ARRAY_NAME to bin2c example 2023-07-14 15:42:10 -04:00
dependabot[bot]
688224d5f0 build(deps): bump the submodules group with 2 updates
Bumps the submodules group with 2 updates: [bgfx](https://github.com/bkaradzic/bgfx) and [bx](https://github.com/bkaradzic/bx).


Updates `bgfx` from `e7e75e4` to `e2c5b1d`
- [Commits](e7e75e4bff...e2c5b1d3e1)

Updates `bx` from `7ac95d5` to `96748d9`
- [Commits](7ac95d5131...96748d9a58)

---
updated-dependencies:
- dependency-name: bgfx
  dependency-type: direct:production
  dependency-group: submodules
- dependency-name: bx
  dependency-type: direct:production
  dependency-group: submodules
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-06 21:26:04 -04:00
Sandy Carter
3c1f8bac82 add @bwrsandman as default reviewer 2023-07-06 20:26:35 -04:00
Sandy Carter
ec52497189 dependabot: Add groups, a beta feature 2023-07-06 20:15:50 -04:00
Sandy Carter
1925f436e7 dependabot: Add groups, a beta feature 2023-07-06 20:14:42 -04:00
Sandy Carter
b208d0c37b release: Fix typo in file directory 2023-06-11 09:09:45 -04:00
Sandy Carter
b5041def8e release: Isolate source from binaries 2023-06-11 08:29:30 -04:00
Sandy Carter
29b62260f6 Improve release archive names and structure 2023-06-11 08:11:49 -04:00
Sandy Carter
4cfb204f26 Use commas to separate artefacts 2023-06-11 07:25:09 -04:00
Sandy Carter
715b2a2c67 Debug artifact location 2023-06-11 06:26:34 -04:00
Sandy Carter
9d8213645b Fix artifact grepping 2023-06-11 05:40:26 -04:00
Sandy Carter
376cdd9205 fix typo in linux 2023-06-11 05:00:01 -04:00
Sandy Carter
9ad4a8a69a Compress repo folder 2023-06-11 04:19:43 -04:00
Sandy Carter
398b09ef17 Fix tar exclusion 2023-06-10 22:27:17 -04:00
Sandy Carter
0fc04361c8 fix directory 2023-06-10 21:46:04 -04:00
Sandy Carter
f5afee9379 Add built binaries to assets 2023-06-10 21:45:02 -04:00
Sandy Carter
16ae1476f0 Zip submodules 2023-06-10 20:55:21 -04:00
Sandy Carter
c2eb5368fa Auto generate release notes 2023-06-10 20:39:51 -04:00
Sandy Carter
86fa198254 Fix set output deprecation 2023-06-10 20:04:57 -04:00
Sandy Carter
84f51c4f0f update checkout action 2023-06-10 20:01:12 -04:00
Sandy Carter
fab7c74fa9 Release using submodules 2023-06-10 19:56:13 -04:00
Sandy Carter
b520b4686c Use ncipollo/release-action to release version
actions/create-release is no longer maintained
2023-06-10 19:16:59 -04:00
dependabot[bot]
dd8b8db87b build(deps): bump bgfx from 2902951 to e7e75e4 (#203) 2023-06-09 21:13:16 +00:00
dependabot[bot]
cbb7c340ba build(deps): bump bx from c5593ad to 7ac95d5
Bumps [bx](https://github.com/bkaradzic/bx) from `c5593ad` to `7ac95d5`.
- [Commits](c5593ad749...7ac95d5131)

---
updated-dependencies:
- dependency-name: bx
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-09 16:36:09 -04:00
dependabot[bot]
2a53415f03 build(deps): bump bgfx from 538c9a0 to 2902951 (#196) 2023-05-12 16:44:15 +00:00
Hristo Stamenov
7d89f8ee50 Fix setting the outputs correctly after the for loop since it was overriding the value for each shader. 2023-05-12 12:00:45 -04:00
Hristo Stamenov
487fa0c63b Refactored the conditions a bit 2023-05-02 00:55:01 -04:00
Hristo Iliev
9670cf4f43 Improvments on the shader compiler utility
The custom command didn't recognize bgfx::shaderc and the generator expression seems bettter. I also added an include option since it might be important to be able to define those.

Added changes to each of the cmake files to make sure bgfx:: is defined

Also add an output variable name parameter.

Co-Authored-By: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-05-02 00:55:01 -04:00
20 changed files with 796 additions and 676 deletions

1
.github/CODEOWNERS vendored Normal file
View File

@@ -0,0 +1 @@
* @bwrsandman

View File

@@ -4,3 +4,8 @@ updates:
directory: "/"
schedule:
interval: "monthly"
groups:
# Name of the group
submodules:
patterns:
- "*"

View File

@@ -17,7 +17,7 @@ jobs:
env:
CMAKE_VERSION: 3.10.2
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Install Linux dependencies
@@ -57,7 +57,7 @@ jobs:
CC: ${{ matrix.cc }}
CXX: ${{ matrix.cxx }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Install Linux dependencies
@@ -94,7 +94,7 @@ jobs:
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Install Linux dependencies

View File

@@ -18,7 +18,7 @@ jobs:
sha: ${{ steps.version.outputs.sha }}
tag: ${{ steps.version.outputs.tag }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
submodules: recursive
fetch-depth: 0
@@ -29,9 +29,9 @@ jobs:
BGFX_CMAKE_REVISION=$(git rev-list HEAD --count)
SHA=$(cd bgfx && git rev-parse HEAD)
TAG="v1.${API_VERSION}.${BGFX_REVISION}-${BGFX_CMAKE_REVISION}"
echo "::set-output name=revision::${BGFX_REVISION}"
echo "::set-output name=sha::${SHA}"
echo "::set-output name=tag::${TAG}"
echo "revision=${BGFX_REVISION}" >> $GITHUB_OUTPUT
echo "sha=${SHA}" >> $GITHUB_OUTPUT
echo "tag=${TAG}" >> $GITHUB_OUTPUT
build:
name: ${{ matrix.os }}
@@ -51,7 +51,7 @@ jobs:
CMAKE_INSTALL_DIR: ${{ github.workspace }}/install/
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Install Linux dependencies
@@ -75,12 +75,12 @@ jobs:
# Run CMake to generate project files
- name: Generate project files
run: |
cmake -B "${{ env.CMAKE_BUILD_DIR }}" -DCMAKE_INSTALL_PREFIX="${{ env.CMAKE_INSTALL_DIR }}" -DCMAKE_DEBUG_POSTFIX=d -DBGFX_BUILD_EXAMPLES=OFF -DBGFX_BUILD_TOOLS=ON -DBGFX_INSTALL=ON -DBGFX_AMALGAMATED=ON -DCMAKE_BUILD_TYPE=Release
cmake -B "${{ env.CMAKE_BUILD_DIR }}" "-DCMAKE_INSTALL_PREFIX=${{ env.CMAKE_INSTALL_DIR }}" -DCMAKE_DEBUG_POSTFIX=d -DBGFX_BUILD_EXAMPLES=OFF -DBGFX_BUILD_TOOLS=ON -DBGFX_INSTALL=ON -DBGFX_AMALGAMATED=ON -DCMAKE_BUILD_TYPE=Release
# Build the install targets
- name: Build
run: |
cmake --build "${{ env.CMAKE_BUILD_DIR }}" --target install --config Release
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
with:
name: ${{ matrix.os }}
path: ${{ github.workspace }}/install/
@@ -90,11 +90,89 @@ jobs:
runs-on: ubuntu-latest
needs: [ version, build ]
if: github.repository == 'bkaradzic/bgfx.cmake' && github.event_name == 'push'
permissions:
contents: write
steps:
- name: Create Release
uses: actions/create-release@v1
- uses: actions/checkout@v3
with:
tag_name: ${{ needs.version.outputs.tag }}
release_name: ${{ needs.version.outputs.tag }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
submodules: recursive
fetch-depth: 0
path: src/bgfx.cmake
- run: |
find src/bgfx.cmake -name ".git*" -exec rm -rf {} +
find src/bgfx.cmake -name ".editorconfig" -delete
rm src/bgfx.cmake/.cmake-format.py
- uses: actions/download-artifact@v3
with:
name: windows-latest
path: ${{ github.workspace }}/install/windows/bgfx.cmake
- uses: actions/download-artifact@v3
with:
name: ubuntu-latest
path: ${{ github.workspace }}/install/linux/bgfx.cmake
- uses: actions/download-artifact@v3
with:
name: macos-latest
path: ${{ github.workspace }}/install/macos/bgfx.cmake
- name: Create Source Zip
uses: thedoctor0/zip-release@0.7.1
with:
type: 'zip'
filename: 'bgfx.cmake.${{ needs.version.outputs.tag }}.zip'
directory: 'src'
path: 'bgfx.cmake'
- name: Create Source Tar
uses: thedoctor0/zip-release@0.7.1
with:
type: 'tar'
filename: 'bgfx.cmake.${{ needs.version.outputs.tag }}.tar.gz'
directory: 'src'
path: 'bgfx.cmake'
- name: Create Windows Zip
uses: thedoctor0/zip-release@0.7.1
with:
type: 'zip'
filename: 'bgfx.cmake.binary.windows.${{ needs.version.outputs.tag }}.zip'
directory: 'install/windows'
path: 'bgfx.cmake'
- name: Create Windows Tar
uses: thedoctor0/zip-release@0.7.1
with:
type: 'tar'
filename: 'bgfx.cmake.binary.windows.${{ needs.version.outputs.tag }}.tar.gz'
directory: 'install/windows'
path: 'bgfx.cmake'
- name: Create Linux Zip
uses: thedoctor0/zip-release@0.7.1
with:
type: 'zip'
filename: 'bgfx.cmake.binary.linux.${{ needs.version.outputs.tag }}.zip'
directory: 'install/linux'
path: 'bgfx.cmake'
- name: Create Linux Tar
uses: thedoctor0/zip-release@0.7.1
with:
type: 'tar'
filename: 'bgfx.cmake.binary.linux.${{ needs.version.outputs.tag }}.tar.gz'
directory: 'install/linux'
path: 'bgfx.cmake'
- name: Create MacOS Zip
uses: thedoctor0/zip-release@0.7.1
with:
type: 'zip'
filename: 'bgfx.cmake.binary.macos.${{ needs.version.outputs.tag }}.zip'
directory: 'install/macos'
path: 'bgfx.cmake'
- name: Create MacOS Tar
uses: thedoctor0/zip-release@0.7.1
with:
type: 'tar'
filename: 'bgfx.cmake.binary.macos.${{ needs.version.outputs.tag }}.tar.gz'
directory: 'install/macos'
path: 'bgfx.cmake'
- name: Create Release
uses: ncipollo/release-action@v1
with:
tag: ${{ needs.version.outputs.tag }}
artifacts: "src/bgfx.cmake.${{ needs.version.outputs.tag }}.zip,src/bgfx.cmake.${{ needs.version.outputs.tag }}.tar.gz,install/*/*.${{ needs.version.outputs.tag }}.zip,install/*/*.${{ needs.version.outputs.tag }}.tar.gz"
generateReleaseNotes: true

View File

@@ -13,7 +13,7 @@ project(bgfx)
cmake_policy(SET CMP0054 NEW)
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
@@ -160,18 +160,6 @@ if(BGFX_INSTALL)
install(FILES ${BGFX_DIR}/LICENSE DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/licences/${PROJECT_NAME})
# install headers (this should be done as a target probably... ^)
install(DIRECTORY ${BX_DIR}/include/bx ${BX_DIR}/include/compat ${BX_DIR}/include/tinystl
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}"
)
install(DIRECTORY ${BIMG_DIR}/include/bimg DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}")
install(DIRECTORY ${BGFX_DIR}/include/bgfx DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}")
# header required for shader compilation
install(FILES ${BGFX_DIR}/src/bgfx_shader.sh ${BGFX_DIR}/src/bgfx_compute.sh
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/bgfx"
)
# install tools
if(BGFX_CMAKE_USER_SCRIPT)
install(FILES ${BGFX_CMAKE_USER_SCRIPT} DESTINATION "${config_install_dir}")

View File

@@ -48,8 +48,9 @@ Adding these `INPUT_FILE` as source files to a target will run `bin2c` at build
#### Examples: Generating an image as a header
```cmake
bgfx_compile_binary_to_header(
INPUT_FILE image.png
INPUT_FILE ${CMAKE_CURRENT_SOURCE_DIR}/image.png
OUTPUT_FILE ${CMAKE_BINARY_DIR}/include/generated/images/image.png.h
ARRAY_NAME image_bytes
)
add_library(myLib image.png)
target_include_directories(myLib ${CMAKE_BINARY_DIR}/include/generated/images)
@@ -58,6 +59,7 @@ target_include_directories(myLib ${CMAKE_BINARY_DIR}/include/generated/images)
```cpp
// main.cpp
#include <image.png.h>
// You now have access to a static const uint8_t or char array named image_bytes
```
### `bgfx_compile_texture`

2
bgfx

Submodule bgfx updated: 538c9a05eb...8b6a6bdf0e

2
bimg

Submodule bimg updated: 7afa241925...ec02df824a

2
bx

Submodule bx updated: 4e67e34c4b...198cd120e4

View File

@@ -9,28 +9,26 @@ list(GET BGFX_INCLUDE_PATH 0 BGFX_INCLUDE_PATH_1) # bgfx::bgfx exports include d
set(BGFX_SHADER_INCLUDE_PATH ${BGFX_INCLUDE_PATH_1}/bgfx)
# If cross compiling, we need a host-compatible version of shaderc to compile shaders
if(@CMAKE_CROSSCOMPILING@)
macro(_bgfx_crosscompile_use_host_tool TOOL_NAME)
if(NOT TARGET bgfx::${TOOL_NAME})
find_program(
${TOOL_NAME}_EXECUTABLE REQUIRED
NAMES bgfx-${TOOL_NAME} ${TOOL_NAME}
PATHS /usr/bin #
${CMAKE_CURRENT_SOURCE_DIR}/vcpkg/packages/bgfx_x64-linux/tools/bgfx
${CMAKE_CURRENT_SOURCE_DIR}/vcpkg/packages/bgfx_x64-windows/tools/bgfx
${CMAKE_CURRENT_SOURCE_DIR}/vcpkg/packages/bgfx_x64-osx/tools/bgfx
)
add_executable(bgfx::${TOOL_NAME} IMPORTED)
set_target_properties(bgfx::${TOOL_NAME} PROPERTIES IMPORTED_LOCATION "${${TOOL_NAME}_EXECUTABLE}")
endif()
endmacro()
macro(_bgfx_crosscompile_use_host_tool TOOL_NAME)
if(NOT TARGET bgfx::${TOOL_NAME})
find_program(
${TOOL_NAME}_EXECUTABLE
NAMES bgfx-${TOOL_NAME} ${TOOL_NAME}
PATHS /usr/bin #
${CMAKE_CURRENT_SOURCE_DIR}/vcpkg/packages/bgfx_x64-linux/tools/bgfx
${CMAKE_CURRENT_SOURCE_DIR}/vcpkg/packages/bgfx_x64-windows/tools/bgfx
${CMAKE_CURRENT_SOURCE_DIR}/vcpkg/packages/bgfx_x64-osx/tools/bgfx
)
add_executable(bgfx::${TOOL_NAME} IMPORTED)
set_target_properties(bgfx::${TOOL_NAME} PROPERTIES IMPORTED_LOCATION "${${TOOL_NAME}_EXECUTABLE}")
endif()
endmacro()
_bgfx_crosscompile_use_host_tool(bin2c)
_bgfx_crosscompile_use_host_tool(texturec)
_bgfx_crosscompile_use_host_tool(shaderc)
_bgfx_crosscompile_use_host_tool(texturev)
_bgfx_crosscompile_use_host_tool(geometryv)
endif()
_bgfx_crosscompile_use_host_tool(bin2c)
_bgfx_crosscompile_use_host_tool(texturec)
_bgfx_crosscompile_use_host_tool(shaderc)
_bgfx_crosscompile_use_host_tool(texturev)
_bgfx_crosscompile_use_host_tool(geometryv)
include("${CMAKE_CURRENT_LIST_DIR}/bgfxToolUtils.cmake")
check_required_components("@PROJECT_NAME@")

View File

@@ -12,9 +12,6 @@ include(bgfx.cmake)
include(3rdparty/meshoptimizer.cmake)
include(3rdparty/dear-imgui.cmake)
include(shared.cmake)
include(examples.cmake)
if(BGFX_BUILD_TOOLS_TEXTURE)
include(texturev.cmake)
endif()
@@ -31,3 +28,6 @@ if(BGFX_BUILD_TOOLS_SHADER)
include(3rdparty/webgpu.cmake)
include(shaderc.cmake)
endif()
include(shared.cmake)
include(examples.cmake)

View File

@@ -217,4 +217,11 @@ if(BGFX_INSTALL)
INCLUDES
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}"
)
install(DIRECTORY ${BGFX_DIR}/include/bgfx DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}")
# header required for shader compilation
install(FILES ${BGFX_DIR}/src/bgfx_shader.sh ${BGFX_DIR}/src/bgfx_compute.sh
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/bgfx"
)
endif()

View File

@@ -105,7 +105,7 @@ function(add_bgfx_shader FILE FOLDER)
foreach(OUT ${OUTPUTS})
list(APPEND OUTPUT_FILES ${${OUT}_OUTPUT})
list(APPEND COMMANDS COMMAND "$<TARGET_FILE:shaderc>" ${${OUT}})
list(APPEND COMMANDS COMMAND "bgfx::shaderc" ${${OUT}})
get_filename_component(OUT_DIR ${${OUT}_OUTPUT} DIRECTORY)
file(MAKE_DIRECTORY ${OUT_DIR})
endforeach()

View File

@@ -27,8 +27,11 @@ set_target_properties(
OUTPUT_NAME ${BGFX_TOOLS_PREFIX}geometryc #
)
if(BGFX_BUILD_TOOLS_GEOMETRY AND BGFX_CUSTOM_TARGETS)
add_dependencies(tools geometryc)
if(BGFX_BUILD_TOOLS_GEOMETRY)
add_executable(bgfx::geometryc ALIAS geometryc)
if(BGFX_CUSTOM_TARGETS)
add_dependencies(tools geometryc)
endif()
endif()
if(IOS)

View File

@@ -50,8 +50,11 @@ set_target_properties(
OUTPUT_NAME ${BGFX_TOOLS_PREFIX}shaderc #
)
if(BGFX_BUILD_TOOLS_SHADER AND BGFX_CUSTOM_TARGETS)
add_dependencies(tools shaderc)
if(BGFX_BUILD_TOOLS_SHADER)
add_executable(bgfx::shaderc ALIAS shaderc)
if(BGFX_CUSTOM_TARGETS)
add_dependencies(tools shaderc)
endif()
endif()
if(ANDROID)

File diff suppressed because it is too large Load Diff

View File

@@ -43,7 +43,7 @@ target_link_libraries(
${MINIZ_LIBRARIES} #
)
if(BGFX_INSTALL AND NOT BGFX_LIBRARY_TYPE MATCHES "SHARED")
if(BGFX_INSTALL)
install(
TARGETS bimg
EXPORT "${TARGETS_EXPORT_NAME}"
@@ -53,4 +53,5 @@ if(BGFX_INSTALL AND NOT BGFX_LIBRARY_TYPE MATCHES "SHARED")
INCLUDES
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}"
)
install(DIRECTORY ${BIMG_DIR}/include/bimg DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}")
endif()

View File

@@ -22,8 +22,11 @@ set_target_properties(
OUTPUT_NAME ${BGFX_TOOLS_PREFIX}texturec #
)
if(BGFX_BUILD_TOOLS_TEXTURE AND BGFX_CUSTOM_TARGETS)
add_dependencies(tools texturec)
if(BGFX_BUILD_TOOLS_TEXTURE)
add_executable(bgfx::texturec ALIAS texturec)
if(BGFX_CUSTOM_TARGETS)
add_dependencies(tools texturec)
endif()
endif()
if(ANDROID)

View File

@@ -22,8 +22,11 @@ set_target_properties(
OUTPUT_NAME ${BGFX_TOOLS_PREFIX}bin2c #
)
if(BGFX_BUILD_TOOLS_BIN2C AND BGFX_CUSTOM_TARGETS)
add_dependencies(tools bin2c)
if(BGFX_BUILD_TOOLS_BIN2C)
add_executable(bgfx::bin2c ALIAS bin2c)
if(BGFX_CUSTOM_TARGETS)
add_dependencies(tools bin2c)
endif()
endif()
if(ANDROID)

View File

@@ -81,7 +81,7 @@ target_include_directories(
$<BUILD_INTERFACE:${BX_DIR}/3rdparty> #
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}> #
$<BUILD_INTERFACE:${BX_DIR}/include/compat/${BX_COMPAT_PLATFORM}> #
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/compat/${BX_COMPAT_PLATFORM}> #
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/bx/compat/${BX_COMPAT_PLATFORM}> #
)
# All configurations
@@ -121,14 +121,18 @@ endif()
# Put in a "bgfx" folder in Visual Studio
set_target_properties(bx PROPERTIES FOLDER "bgfx")
if(NOT BGFX_LIBRARY_TYPE MATCHES "SHARED")
if(BGFX_INSTALL)
install(
TARGETS bx
EXPORT "${TARGETS_EXPORT_NAME}"
LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}"
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}"
INCLUDES
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}"
)
# We will make sure tinystl and compat are not installed in /usr/include
install(DIRECTORY "${BX_DIR}/include/bx" DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}")
install(DIRECTORY "${BX_DIR}/include/compat/${BX_COMPAT_PLATFORM}"
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/bx/compat"
)
install(DIRECTORY "${BX_DIR}/include/tinystl" DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/bx")
endif()