WIP: Rewrite with LLGL
This commit is contained in:
parent
002d97ee27
commit
f337ff9f0d
24 changed files with 377 additions and 390 deletions
|
@ -6,20 +6,33 @@ function(add_cigui_example NAME)
|
|||
find_files(EXAMPLE_${NAME}_SOURCES "${NAME}/src" cpp c cxx hpp h hxx inl)
|
||||
add_executable(EXAMPLE_${NAME} ${EXAMPLE_${NAME}_SOURCES})
|
||||
target_link_libraries(EXAMPLE_${NAME} PRIVATE cigui)
|
||||
link_libraries_in_directory(EXAMPLE_${NAME} ${LLGL_LIB_PATH})
|
||||
target_include_directories(EXAMPLE_${NAME} PRIVATE ${LLGL_INCLUDE_PATH})
|
||||
|
||||
set_target_properties(EXAMPLE_${NAME} PROPERTIES OUTPUT_NAME "${NAME}")
|
||||
|
||||
# Copy SFML DLLs to output directory on Windows when building shared
|
||||
if(WIN32 AND CIGUI_BUILD_SHARED)
|
||||
add_custom_command(TARGET EXAMPLE_${NAME} POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
||||
$<TARGET_FILE:sfml-graphics>
|
||||
$<TARGET_FILE:sfml-window>
|
||||
$<TARGET_FILE:sfml-system>
|
||||
$<TARGET_FILE:cigui>
|
||||
$<TARGET_FILE_DIR:EXAMPLE_${NAME}>
|
||||
)
|
||||
endif()
|
||||
|
||||
add_custom_command(TARGET EXAMPLE_${NAME} POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory
|
||||
${LLGL_BIN_PATH}
|
||||
$<TARGET_FILE_DIR:EXAMPLE_${NAME}>
|
||||
COMMENT "Coppied LLGL binaries to example directory"
|
||||
)
|
||||
|
||||
add_custom_command(TARGET EXAMPLE_${NAME} POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/${NAME}/src/shader
|
||||
$<TARGET_FILE_DIR:EXAMPLE_${NAME}>/shader
|
||||
COMMENT "Coppied shaders to example directory"
|
||||
)
|
||||
|
||||
# Copy DLLs to output directory on Windows when building shared
|
||||
if(WIN32 AND CIGUI_BUILD_SHARED)
|
||||
add_custom_command(TARGET EXAMPLE_${NAME} POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
||||
$<TARGET_FILE:cigui>
|
||||
$<TARGET_FILE_DIR:EXAMPLE_${NAME}>
|
||||
)
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
# Basic example
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue