Major Restructuring
N0ffie switched to mingw (fixing linux warnings)
This commit is contained in:
parent
384c758295
commit
8e0e9ceb7c
26 changed files with 1016 additions and 2921 deletions
26
examples/CMakeLists.txt
Normal file
26
examples/CMakeLists.txt
Normal file
|
@ -0,0 +1,26 @@
|
|||
# Examples CMakeLists.txt
|
||||
cmake_minimum_required(VERSION 3.14)
|
||||
|
||||
# Function to easily add examples
|
||||
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)
|
||||
|
||||
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()
|
||||
endfunction()
|
||||
|
||||
# Basic example
|
||||
add_subdirectory(Full)
|
Loading…
Add table
Add a link
Reference in a new issue