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
All checks were successful
pyrite-dev/milsko/pipeline/head This commit looks good
This commit is contained in:
parent
6bb72c224b
commit
82999d716a
10 changed files with 456 additions and 318 deletions
|
|
@ -1 +1,7 @@
|
|||
add_subdirectory(basic)
|
||||
if(${MW_TRY_OPENGL})
|
||||
add_subdirectory(gldemos)
|
||||
endif()
|
||||
if(${MW_TRY_VULKAN})
|
||||
add_subdirectory(vkdemos)
|
||||
endif()
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
27
examples/gldemos/CMakeLists.txt
Normal file
27
examples/gldemos/CMakeLists.txt
Normal 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()
|
||||
22
examples/vkdemos/CMakeLists.txt
Normal file
22
examples/vkdemos/CMakeLists.txt
Normal 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()
|
||||
Loading…
Add table
Add a link
Reference in a new issue