milsko/examples/basic/CMakeLists.txt

26 lines
472 B
Text
Raw Normal View History

file(
2026-04-15 21:41:16 -07:00
GLOB
EXAMPLES_BASIC_SOURCES
*.c
)
foreach(PATH IN LISTS EXAMPLES_BASIC_SOURCES)
2026-04-15 21:41:16 -07:00
get_filename_component(TARGET ${PATH} NAME_WE)
if(CMAKE_SYSTEM_NAME MATCHES Retro)
add_application(${TARGET} ${PATH})
else()
add_executable(${TARGET} MACOSX_BUNDLE ${PATH})
endif()
target_link_libraries(
${TARGET}
PRIVATE
Mw
)
if(NOT CMAKE_SYSTEM_NAME STREQUAL "Windows")
target_link_libraries(
${TARGET}
PRIVATE
m
)
endif()
endforeach()