mirror of
https://github.com/bkaradzic/bgfx.cmake.git
synced 2026-02-17 21:12:35 +01:00
Added custom targets "examples" and "tools"
This commit is contained in:
@@ -112,6 +112,7 @@ function( add_example ARG_NAME )
|
||||
if( MSVC )
|
||||
set_target_properties( example-${ARG_NAME} PROPERTIES LINK_FLAGS "/ENTRY:\"mainCRTStartup\"" )
|
||||
endif()
|
||||
add_dependencies( examples example-${ARG_NAME} )
|
||||
endif()
|
||||
|
||||
# Configure shaders
|
||||
@@ -126,6 +127,9 @@ function( add_example ARG_NAME )
|
||||
set_target_properties( example-${ARG_NAME} PROPERTIES FOLDER "bgfx/examples" )
|
||||
endfunction()
|
||||
|
||||
# Build all examples target
|
||||
add_custom_target( examples )
|
||||
|
||||
# Add common library for examples
|
||||
add_example(
|
||||
common
|
||||
|
||||
@@ -8,5 +8,7 @@
|
||||
# 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/>.
|
||||
|
||||
add_custom_target( tools )
|
||||
|
||||
include( cmake/tools/geometryc.cmake )
|
||||
include( cmake/tools/shaderc.cmake )
|
||||
|
||||
@@ -17,3 +17,4 @@ add_executable( geometryc ${BGFX_DIR}/tools/geometryc/geometryc.cpp )
|
||||
target_compile_definitions( geometryc PRIVATE "-D_CRT_SECURE_NO_WARNINGS" )
|
||||
set_target_properties( geometryc PROPERTIES FOLDER "bgfx/tools" )
|
||||
target_link_libraries( geometryc bx bgfx-bounds bgfx-vertexdecl forsyth-too ib-compress )
|
||||
add_dependencies( tools geometryc )
|
||||
|
||||
@@ -17,6 +17,7 @@ add_executable( shaderc ${BGFX_DIR}/tools/shaderc/shaderc.cpp ${BGFX_DIR}/tools/
|
||||
target_compile_definitions( shaderc PRIVATE "-D_CRT_SECURE_NO_WARNINGS" )
|
||||
set_target_properties( shaderc PROPERTIES FOLDER "bgfx/tools" )
|
||||
target_link_libraries( shaderc bx bgfx-vertexdecl fcpp glsl-optimizer )
|
||||
add_dependencies( tools shaderc )
|
||||
|
||||
function( add_shader ARG_FILE )
|
||||
# Parse arguments
|
||||
|
||||
Reference in New Issue
Block a user