apple: move all event stuff into callback system, fix cmake support for apple, add gl/vk examples to cmake
All checks were successful
pyrite-dev/milsko/pipeline/head This commit looks good

This commit is contained in:
IoI_xD 2026-03-25 17:49:28 -07:00
commit 82999d716a
10 changed files with 456 additions and 318 deletions

View file

@ -1 +1,7 @@
add_subdirectory(basic)
if(${MW_TRY_OPENGL})
add_subdirectory(gldemos)
endif()
if(${MW_TRY_VULKAN})
add_subdirectory(vkdemos)
endif()

View file

@ -6,7 +6,7 @@ file(
foreach(PATH IN LISTS EXAMPLES_BASIC_SOURCES)
get_filename_component(TARGET ${PATH} NAME_WE)
add_executable(${TARGET} ${PATH})
add_executable(${TARGET} WIN32 MACOSX_BUNDLE ${PATH})
target_link_libraries(
${TARGET}
PRIVATE

View file

@ -0,0 +1,27 @@
file(
GLOB
EXAMPLES_GL_SOURCES
*.c
)
find_package(OpenGL)
foreach(PATH IN LISTS EXAMPLES_GL_SOURCES)
get_filename_component(TARGET ${PATH} NAME_WE)
if(${TARGET} STREQUAL "glutlayer")
continue()
endif()
add_executable(${TARGET} WIN32 MACOSX_BUNDLE ${PATH})
target_link_libraries(
${TARGET}
PRIVATE
Mw
OpenGL::GL
)
if(NOT CMAKE_SYSTEM_NAME STREQUAL "Windows")
target_link_libraries(
${TARGET}
PRIVATE
m
)
endif()
endforeach()

View file

@ -0,0 +1,22 @@
file(
GLOB
EXAMPLES_VULKAN_SOURCES
*.c
)
foreach(PATH IN LISTS EXAMPLES_VULKAN_SOURCES)
get_filename_component(TARGET ${PATH} NAME_WE)
add_executable(${TARGET} WIN32 MACOSX_BUNDLE ${PATH})
target_link_libraries(
${TARGET}
PRIVATE
Mw
)
if(NOT CMAKE_SYSTEM_NAME STREQUAL "Windows")
target_link_libraries(
${TARGET}
PRIVATE
m
)
endif()
endforeach()