mirror of
https://github.com/bkaradzic/bgfx.cmake.git
synced 2026-02-17 21:12:35 +01:00
Fixed issues with amalgamated builds
This commit is contained in:
@@ -23,7 +23,11 @@ if(BGFX_AMALGAMATED)
|
||||
set_source_files_properties( ${BGFX_SRC} PROPERTIES HEADER_FILE_ONLY ON )
|
||||
endforeach()
|
||||
else()
|
||||
set_source_files_properties( ${BGFX_DIR}/src/amalgamated.cpp PROPERTIES HEADER_FILE_ONLY ON )
|
||||
if(APPLE)
|
||||
set_source_files_properties( ${BGFX_DIR}/src/amalgamated.mm PROPERTIES HEADER_FILE_ONLY ON )
|
||||
else()
|
||||
set_source_files_properties( ${BGFX_DIR}/src/amalgamated.cpp PROPERTIES HEADER_FILE_ONLY ON )
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Create the bgfx target
|
||||
|
||||
@@ -9,15 +9,18 @@
|
||||
# this software. If not, see <http://creativecommons.org/publicdomain/zero/1.0/>.
|
||||
|
||||
add_library( bgfx-vertexdecl INTERFACE )
|
||||
target_sources( bgfx-vertexdecl INTERFACE ${BGFX_DIR}/src/vertexdecl.cpp )
|
||||
file( WRITE ${CMAKE_CURRENT_BINARY_DIR}/generated/vertexdecl.cpp "#include \"${BGFX_DIR}/src/vertexdecl.cpp\"" )
|
||||
target_sources( bgfx-vertexdecl INTERFACE ${CMAKE_CURRENT_BINARY_DIR}/generated/vertexdecl.cpp )
|
||||
target_include_directories( bgfx-vertexdecl INTERFACE ${BGFX_DIR}/include )
|
||||
|
||||
add_library( bgfx-shader-spirv INTERFACE )
|
||||
target_sources( bgfx-shader-spirv INTERFACE ${BGFX_DIR}/src/shader_spirv.cpp )
|
||||
file( WRITE ${CMAKE_CURRENT_BINARY_DIR}/generated/shader_spirv.cpp "#include \"${BGFX_DIR}/src/shader_spirv.cpp\"" )
|
||||
target_sources( bgfx-shader-spirv INTERFACE ${CMAKE_CURRENT_BINARY_DIR}/generated/shader_spirv.cpp )
|
||||
target_include_directories( bgfx-shader-spirv INTERFACE ${BGFX_DIR}/include )
|
||||
|
||||
add_library( bgfx-bounds INTERFACE )
|
||||
target_sources( bgfx-bounds INTERFACE ${BGFX_DIR}/examples/common/bounds.cpp )
|
||||
file( WRITE ${CMAKE_CURRENT_BINARY_DIR}/generated/bounds.cpp "#include \"${BGFX_DIR}/examples/common/bounds.cpp\"" )
|
||||
target_sources( bgfx-bounds INTERFACE ${CMAKE_CURRENT_BINARY_DIR}/generated/bounds.cpp )
|
||||
target_include_directories( bgfx-bounds INTERFACE ${BGFX_DIR}/include )
|
||||
target_include_directories( bgfx-bounds INTERFACE ${BGFX_DIR}/examples/common )
|
||||
|
||||
|
||||
Reference in New Issue
Block a user