Skip to content

Commit

Permalink
Merge pull request #156 from bkaradzic/temp
Browse files Browse the repository at this point in the history
Update Submodules
  • Loading branch information
exdal authored Oct 28, 2022
2 parents 74e4a3f + 9d3bc4f commit 089b388
Show file tree
Hide file tree
Showing 9 changed files with 37 additions and 39 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ if( BGFX_INSTALL )
INCLUDES DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}"
)
if( NOT BGFX_LIBRARY_TYPE MATCHES "SHARED" )
install( TARGETS bimg bx astc-codec astc edtaa3 etc1 etc2 iqa squish nvtt pvrtc tinyexr
install( TARGETS bimg bx astc-encoder edtaa3 etc1 etc2 iqa squish nvtt pvrtc tinyexr
EXPORT "${TARGETS_EXPORT_NAME}"
LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}"
Expand Down
2 changes: 1 addition & 1 deletion bgfx
Submodule bgfx updated 577 files
2 changes: 1 addition & 1 deletion bimg
Submodule bimg updated 196 files
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,21 @@
# You should have received a copy of the CC0 Public Domain Dedication along with
# this software. If not, see <http://creativecommons.org/publicdomain/zero/1.0/>.

if( TARGET astc-codec )
if( TARGET astc-encoder )
return()
endif()

file(
GLOB
ASTC_CODEC_SOURCES
${BIMG_DIR}/3rdparty/astc-codec/src/decoder/*.cc
${BIMG_DIR}/3rdparty/astc-codec/src/decoder/*.h
ASTC_ENCODER_SOURCES
${BIMG_DIR}/3rdparty/astc-encoder/source/*.cpp
${BIMG_DIR}/3rdparty/astc-encoder/include/*.h
)

add_library( astc-codec STATIC ${ASTC_CODEC_SOURCES} )
target_include_directories( astc-codec
add_library( astc-encoder STATIC ${ASTC_ENCODER_SOURCES} )
target_include_directories( astc-encoder
PUBLIC
$<BUILD_INTERFACE:${BIMG_DIR}/3rdparty>
$<BUILD_INTERFACE:${BIMG_DIR}/3rdparty/astc-codec>
$<BUILD_INTERFACE:${BIMG_DIR}/3rdparty/astc-codec/include> )
set_target_properties( astc-codec PROPERTIES FOLDER "bgfx/3rdparty" )
$<BUILD_INTERFACE:${BIMG_DIR}/3rdparty/astc-encoder>
$<BUILD_INTERFACE:${BIMG_DIR}/3rdparty/astc-encoder/include> )
set_target_properties( astc-encoder PROPERTIES FOLDER "bgfx/3rdparty" )
19 changes: 0 additions & 19 deletions cmake/3rdparty/astc.cmake

This file was deleted.

15 changes: 14 additions & 1 deletion cmake/bgfx.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,24 @@ target_compile_definitions(bgfx
"BGFX_CONFIG_MULTITHREADED=$<BOOL:${BGFX_CONFIG_MULTITHREADED}>"
)

# directx-headers
set (DIRECTX_HEADERS)
if (UNIX AND NOT APPLE AND NOT EMSCRIPTEN AND NOT ANDROID) # Only Linux
set (DIRECTX_HEADERS
${BGFX_DIR}/3rdparty/directx-headers/include/directx
${BGFX_DIR}/3rdparty/directx-headers/include
${BGFX_DIR}/3rdparty/directx-headers/include/wsl/stubs )
elseif (WIN32) # Only Windows
set (DIRECTX_HEADERS
${BGFX_DIR}/3rdparty/directx-headers/include/directx
${BGFX_DIR}/3rdparty/directx-headers/include )
endif()

# Includes
target_include_directories( bgfx
PRIVATE
${DIRECTX_HEADERS}
${BGFX_DIR}/3rdparty
${BGFX_DIR}/3rdparty/dxsdk/include
${BGFX_DIR}/3rdparty/khronos
PUBLIC
$<BUILD_INTERFACE:${BGFX_DIR}/include>
Expand Down
5 changes: 2 additions & 3 deletions cmake/bimg.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@
# this software. If not, see <http://creativecommons.org/publicdomain/zero/1.0/>.

# Third party libs
include( ${CMAKE_CURRENT_LIST_DIR}/3rdparty/astc-codec.cmake )
include( ${CMAKE_CURRENT_LIST_DIR}/3rdparty/astc.cmake )
include( ${CMAKE_CURRENT_LIST_DIR}/3rdparty/astc-encoder.cmake )
include( ${CMAKE_CURRENT_LIST_DIR}/3rdparty/edtaa3.cmake )
include( ${CMAKE_CURRENT_LIST_DIR}/3rdparty/etc1.cmake )
include( ${CMAKE_CURRENT_LIST_DIR}/3rdparty/etc2.cmake )
Expand Down Expand Up @@ -39,7 +38,7 @@ target_include_directories( bimg
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>)

# bimg dependencies
target_link_libraries( bimg PUBLIC bx PRIVATE astc-codec astc edtaa3 etc1 etc2 iqa squish nvtt pvrtc tinyexr )
target_link_libraries( bimg PUBLIC bx PRIVATE astc-encoder edtaa3 etc1 etc2 iqa squish nvtt pvrtc tinyexr )

# Put in a "bgfx" folder in Visual Studio
set_target_properties( bimg PROPERTIES FOLDER "bgfx" )
11 changes: 8 additions & 3 deletions cmake/bx.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,16 @@ elseif( WIN32 )
PUBLIC
$<BUILD_INTERFACE:${BX_DIR}/include/compat/msvc>
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/compat/msvc> )
elseif( APPLE )
elseif( APPLE ) # APPLE is technically UNIX... ORDERING MATTERS!
target_include_directories( bx
PUBLIC
$<BUILD_INTERFACE:${BX_DIR}/include/compat/osx>
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/compat/osx> )
elseif ( UNIX )
target_include_directories( bx
PUBLIC
$<BUILD_INTERFACE:${BX_DIR}/include/compat/osx>
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/compat/osx> )
$<BUILD_INTERFACE:${BX_DIR}/include/compat/linux>
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/compat/linux> )
endif()

# All configurations
Expand Down

0 comments on commit 089b388

Please sign in to comment.