diff --git a/CMakeLists.txt b/CMakeLists.txt index d7a1511..b7e03ca 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -12,12 +12,10 @@ cmake_minimum_required( VERSION 3.0 ) project( bgfx ) set_property( GLOBAL PROPERTY USE_FOLDERS ON ) -if( APPLE AND NOT IOS ) - set( CMAKE_CXX_FLAGS "-ObjC++ --std=c++14" ) -elseif(UNIX) - set(CMAKE_CXX_STANDARD 14) - set(CMAKE_CXX_STANDARD_REQUIRED ON) -endif() +set(CMAKE_CXX_STANDARD 14) +set(CMAKE_CXX_STANDARD_REQUIRED ON) +set(CMAKE_CXX_EXTENSIONS OFF) + option( BGFX_BUILD_TOOLS "Build bgfx tools." ON ) option( BGFX_BUILD_EXAMPLES "Build bgfx examples." ON ) diff --git a/bgfx b/bgfx index 6e75f9f..b5d8c89 160000 --- a/bgfx +++ b/bgfx @@ -1 +1 @@ -Subproject commit 6e75f9f663d2e97e5bb7f620096995420964b795 +Subproject commit b5d8c89c290289e339925a7aab0ef161dc71a0e3 diff --git a/bimg b/bimg index baffd74..f89b12a 160000 --- a/bimg +++ b/bimg @@ -1 +1 @@ -Subproject commit baffd743b95f09c3b2e06c13e07f43eb052233c9 +Subproject commit f89b12ae25e4d3734549fe6da19c75ed63789742 diff --git a/bx b/bx index 46f7ea7..7a68aba 160000 --- a/bx +++ b/bx @@ -1 +1 @@ -Subproject commit 46f7ea77c1c20f88ca61989d0399d1d614f0a069 +Subproject commit 7a68aba842a0651541be23b32a85dabdafd6bbf3 diff --git a/cmake/3rdparty/astc-codec.cmake b/cmake/3rdparty/astc-codec.cmake new file mode 100644 index 0000000..b168e90 --- /dev/null +++ b/cmake/3rdparty/astc-codec.cmake @@ -0,0 +1,24 @@ +# bgfx.cmake - bgfx building in cmake +# Written in 2017 by Joshua Brookover + +# To the extent possible under law, the author(s) have dedicated all copyright +# and related and neighboring rights to this software to the public domain +# worldwide. This software is distributed without any warranty. + +# You should have received a copy of the CC0 Public Domain Dedication along with +# this software. If not, see . + +if( TARGET astc-codec ) + return() +endif() + +file( + GLOB + ASTC_CODEC_SOURCES + ${BIMG_DIR}/3rdparty/astc-codec/src/decoder/*.cpp + ${BIMG_DIR}/3rdparty/astc-codec/src/decoder/*.h +) + +add_library( astc-codec STATIC ${ASTC_CODEC_SOURCES} ) +target_include_directories( astc-codec PUBLIC ${BIMG_DIR}/3rdparty ${BIMG_DIR}/3rdparty/astc-codec/include ) +set_target_properties( astc-codec PROPERTIES FOLDER "bgfx/3rdparty" ) diff --git a/cmake/bimg.cmake b/cmake/bimg.cmake index a30cd2f..3a5e9fa 100644 --- a/cmake/bimg.cmake +++ b/cmake/bimg.cmake @@ -9,6 +9,7 @@ # this software. If not, see . # Third party libs +include( cmake/3rdparty/astc-codec.cmake ) include( cmake/3rdparty/astc.cmake ) include( cmake/3rdparty/edtaa3.cmake ) include( cmake/3rdparty/etc1.cmake ) @@ -34,7 +35,7 @@ add_library( bimg STATIC ${BIMG_SOURCES} ) target_include_directories( bimg PUBLIC ${BIMG_DIR}/include ) # bimg dependencies -target_link_libraries( bimg bx astc edtaa3 etc1 etc2 iqa squish nvtt pvrtc ) +target_link_libraries( bimg bx astc-codec astc edtaa3 etc1 etc2 iqa squish nvtt pvrtc ) # Put in a "bgfx" folder in Visual Studio set_target_properties( bimg PROPERTIES FOLDER "bgfx" )